:root {
  --background: #141414;
  --background-elevated: #18191a;
  --surface: rgba(224, 238, 238, 0.045);
  --surface-strong: rgba(224, 238, 238, 0.07);
  --surface-solid: #1a1b1c;
  --foreground: #e0eeee;
  --foreground-strong: #ffffff;
  --foreground-soft: rgba(224, 238, 238, 0.72);
  --foreground-muted: rgba(224, 238, 238, 0.54);
  --foreground-faint: rgba(224, 238, 238, 0.34);
  --border: rgba(224, 238, 238, 0.1);
  --border-strong: rgba(224, 238, 238, 0.18);
  --cyan: #63f6f8;
  --blue: #5fbcee;
  --green: #67d98e;
  --amber: #f4c36a;
  --red: #ff7676;
  --radius: 8px;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.26);
  --font-ui: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

a {
  color: inherit;
  text-decoration: none;
}

.dashboardScreen {
  position: relative;
  min-height: 100svh;
  color: var(--foreground);
  background:
    linear-gradient(180deg, rgba(224, 238, 238, 0.02) 0%, rgba(224, 238, 238, 0) 20%),
    linear-gradient(135deg, #141414 0%, #151718 48%, #101112 100%);
  overflow-x: hidden;
  isolation: isolate;
}

.dashboardGlow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(99, 246, 248, 0.06), transparent 30%, rgba(95, 188, 238, 0.045) 70%, transparent),
    linear-gradient(180deg, rgba(224, 238, 238, 0.018), transparent 220px);
}

.dashboardHeader,
.workspaceFrame,
.loginShell {
  width: min(calc(100% - 72px), 1528px);
  margin: 0 auto;
}

.dashboardHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(18px);
}

.dashboardHeaderInner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  width: min(calc(100% - 72px), 1528px);
  min-height: 78px;
  margin: 0 auto;
}

.topBarBrand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brandSignature {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--foreground-strong);
  white-space: nowrap;
}

.brandMonogram {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(99, 246, 248, 0.38);
  border-radius: 4px;
  background: rgba(99, 246, 248, 0.08);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.brandName {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.brandDomain {
  color: var(--cyan);
}

.topBarNav {
  display: inline-flex;
  justify-self: center;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.03);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.topBarNav::-webkit-scrollbar {
  display: none;
}

.topBarLink {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--foreground-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.topBarLink:hover,
.topBarLinkActive {
  color: var(--foreground-strong);
  background: rgba(99, 246, 248, 0.1);
}

.topBarLinkActive {
  box-shadow: inset 0 0 0 1px rgba(99, 246, 248, 0.2);
}

.topBarMeta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.topBarUser {
  display: grid;
  gap: 2px;
  min-width: 96px;
  text-align: right;
}

.topBarUserValue {
  overflow: hidden;
  color: var(--foreground-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topBarUserLabel,
.subsectionLabel,
.statLabel,
.fieldLabel,
.metricKey {
  color: var(--foreground-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topBarActionGroup {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.primaryButton,
.secondaryButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: 100%;
  padding: 0 15px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.primaryButton {
  border: 1px solid rgba(99, 246, 248, 0.72);
  background: var(--cyan);
  color: #101112;
}

.primaryButton:hover {
  border-color: var(--foreground-strong);
  background: #8dfcff;
}

.secondaryButton {
  border: 1px solid var(--border);
  background: rgba(224, 238, 238, 0.035);
  color: var(--foreground);
}

.secondaryButton:hover {
  border-color: rgba(99, 246, 248, 0.32);
  background: rgba(99, 246, 248, 0.08);
  color: var(--foreground-strong);
}

.dangerButton {
  border-color: rgba(255, 118, 118, 0.36);
  background: rgba(255, 118, 118, 0.07);
  color: #ffd0d0;
}

.dangerButton:hover {
  border-color: rgba(255, 118, 118, 0.62);
  background: rgba(255, 118, 118, 0.12);
  color: #ffe8e8;
}

.tableActionButton {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.headerButton {
  min-height: 34px;
  padding-inline: 12px;
}

.workspaceFrame {
  display: grid;
  gap: 18px;
  padding-top: clamp(24px, 3vw, 34px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

.workspaceFrameWide {
  gap: 22px;
}

.pageHeader {
  display: grid;
  gap: 22px;
  padding-bottom: 6px;
}

.pageTitle {
  margin: 10px 0 0;
  color: var(--foreground-strong);
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pageDescription {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--foreground-soft);
  font-size: 15px;
  line-height: 1.55;
}

.metricBadge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(99, 246, 248, 0.18);
  border-radius: 999px;
  background: rgba(99, 246, 248, 0.07);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.statCard {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.035);
}

.statValue {
  display: block;
  margin-top: 10px;
  color: var(--foreground-strong);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.workspaceLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.38fr);
  gap: 18px;
  align-items: start;
}

.workspaceMain,
.sideColumn {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.panelCard {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(224, 238, 238, 0.052), rgba(224, 238, 238, 0.034)),
    var(--background-elevated);
  box-shadow: var(--shadow);
}

.panelCardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.sectionTitle {
  margin: 6px 0 0;
  color: var(--foreground-strong);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workSectionsPanel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.workSectionsPanel .panelCardHeader {
  margin-bottom: 0;
}

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

.workSectionCard {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(224, 238, 238, 0.052), rgba(224, 238, 238, 0.032)),
    var(--background-elevated);
}

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

.workSectionCard h3 {
  margin: 0;
  overflow: hidden;
  color: var(--foreground-strong);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.workSectionCard p {
  min-height: 40px;
  margin: 0;
  color: var(--foreground-soft);
  font-size: 13px;
  line-height: 1.45;
}

.workLinkList {
  display: grid;
  gap: 7px;
}

.workLink {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.03);
  color: var(--foreground);
}

.workLink:hover {
  border-color: rgba(99, 246, 248, 0.32);
  background: rgba(99, 246, 248, 0.07);
}

.workLinkStatic {
  cursor: default;
}

.workLinkStatic:hover {
  border-color: var(--border);
  background: rgba(224, 238, 238, 0.03);
}

.workLink span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workLink small,
.workLinkMore {
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.workLinkMore {
  padding: 4px 2px 0;
}

.workSectionButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  border: 1px solid rgba(99, 246, 248, 0.24);
  border-radius: var(--radius);
  background: rgba(99, 246, 248, 0.08);
  color: var(--foreground-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.workSectionButton:hover,
.workSectionButtonActive {
  border-color: rgba(99, 246, 248, 0.64);
  background: rgba(99, 246, 248, 0.16);
  color: var(--cyan);
}

.botFullPage {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.botFullHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding-bottom: 4px;
}

.botFullHeading {
  min-width: 0;
}

.botFullTitle {
  margin: 10px 0 0;
  color: var(--foreground-strong);
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0;
  text-transform: uppercase;
}

.botFullActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.botPageTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.028);
  width: fit-content;
  max-width: 100%;
}

.botFullLoading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.04);
  color: var(--foreground-soft);
}

.botPageStack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.sectionTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sectionTab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.035);
  color: var(--foreground-soft);
  font-size: 13px;
  font-weight: 700;
}

.sectionTab:hover,
.sectionTabActive {
  border-color: rgba(99, 246, 248, 0.38);
  background: rgba(99, 246, 248, 0.1);
  color: var(--foreground-strong);
}

.summaryStrip,
.configurationStrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.summaryMetric,
.metricLine {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.03);
}

.summaryMetric span,
.metricLine span {
  display: block;
  overflow: hidden;
  color: var(--foreground-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.summaryMetric strong,
.metricLine strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--foreground-strong);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.configurationStripInBlock {
  padding: 14px;
}

.chatDetailHeader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.025);
}

.chatDetailTitle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chatDetailTitle .entityCell strong {
  font-size: 18px;
}

.chatDetailActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detailBackButton {
  flex: 0 0 auto;
}

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

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

.dataBlock {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.025);
}

.dataBlockWide {
  grid-column: 1 / -1;
}

.dataBlockHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.dataBlockHeader h3 {
  margin: 0;
  overflow: hidden;
  color: var(--foreground-strong);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dataTableWrap {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 0 0 var(--radius) var(--radius);
}

.dataTable {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.dataTable th,
.dataTable td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.dataTable tr:last-child td {
  border-bottom: 0;
}

.dataTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #191a1b;
  color: var(--foreground-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.dataTable td {
  color: var(--foreground-soft);
  font-size: 13px;
  line-height: 1.35;
}

.dataTable tbody tr {
  transition: background-color 0.16s ease;
}

.dataTable tbody tr:hover {
  background: rgba(99, 246, 248, 0.045);
}

.lineChart {
  display: grid;
  gap: 12px;
  min-height: 306px;
  padding: 14px;
}

.lineChartSvg {
  display: block;
  width: 100%;
  height: 222px;
}

.chartGridLine {
  stroke: rgba(224, 238, 238, 0.12);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
}

.chartLine {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chartLineCyan {
  stroke: var(--cyan);
  background: var(--cyan);
}

.chartLineBlue {
  stroke: var(--blue);
  background: var(--blue);
}

.chartLineRed {
  stroke: var(--red);
  background: var(--red);
}

.chartLineAmber {
  stroke: var(--amber);
  background: var(--amber);
}

.chartLegend,
.chartAxis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chartLegend {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.chartLegend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--foreground-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.chartLegend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.chartAxis {
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1.2;
}

.chartAxis strong {
  color: var(--foreground-strong);
  font-size: 13px;
}

.groupAnalyticsCard {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.groupAnalyticsCard .lineChart {
  min-height: 218px;
  padding: 0;
}

.groupAnalyticsCard .lineChartSvg {
  height: 138px;
}

.groupAnalyticsMeta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.groupAnalyticsMeta .entityLink {
  flex: 1 1 auto;
}

.barChart,
.metricBars {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.barChartRow {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.barChartRowLink {
  padding: 2px;
  border-radius: var(--radius);
}

.barChartRowLink:hover {
  background: rgba(99, 246, 248, 0.06);
}

.barChartLabel,
.metricBarHead {
  min-width: 0;
}

.barChartLabel strong,
.metricBarHead span {
  display: block;
  overflow: hidden;
  color: var(--foreground-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barChartLabel span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.barTrack {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.08);
}

.barFill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(99, 246, 248, 0.82), rgba(95, 188, 238, 0.92));
}

.barFill-cyan {
  background: var(--cyan);
}

.barFill-blue {
  background: var(--blue);
}

.barFill-amber {
  background: var(--amber);
}

.barFill-red {
  background: var(--red);
}

.barFill-green {
  background: var(--green);
}

.barFill-slate {
  background: rgba(224, 238, 238, 0.48);
}

.barValue {
  color: var(--foreground-strong);
  font-size: 13px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.metricBarRow {
  display: grid;
  gap: 8px;
}

.metricBarHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metricBarHead strong {
  color: var(--foreground-strong);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.entityCell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.entityLink {
  display: block;
  min-width: 0;
  border-radius: 6px;
}

.entityLink:hover .entityCell strong {
  color: var(--cyan);
}

.entityCell strong {
  overflow: hidden;
  color: var(--foreground-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entityCell small,
.mutedText {
  overflow: hidden;
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.statusPill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.04);
  color: var(--foreground-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

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

.statusPill-good {
  border-color: rgba(103, 217, 142, 0.32);
  background: rgba(103, 217, 142, 0.1);
  color: var(--green);
}

.statusPill-info {
  border-color: rgba(95, 188, 238, 0.32);
  background: rgba(95, 188, 238, 0.1);
  color: var(--blue);
}

.statusPill-warn {
  border-color: rgba(244, 195, 106, 0.34);
  background: rgba(244, 195, 106, 0.1);
  color: var(--amber);
}

.statusPill-bad {
  border-color: rgba(255, 118, 118, 0.36);
  background: rgba(255, 118, 118, 0.1);
  color: var(--red);
}

.statusPill-muted {
  color: var(--foreground-muted);
}

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

.chipListWide {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.025);
}

.dataChip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.035);
  color: var(--foreground-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.admissionAccessEditor {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.admissionAccessActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admissionAccessActions .primaryButton,
.admissionAccessActions .secondaryButton {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 12px;
}

.inlineLoading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground-soft);
}

.loaderSmall {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(224, 238, 238, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.tableWrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.permissionTable {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.permissionTable th,
.permissionTable td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.permissionTable tr:last-child td {
  border-bottom: 0;
}

.permissionTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #191a1b;
  color: var(--foreground-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.permissionTable td strong,
.roleItem strong,
.userItem strong,
.selectedUser strong {
  display: block;
  color: var(--foreground-strong);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.permissionTable td small {
  display: block;
  margin-top: 4px;
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1.25;
}

.permissionTable td:not(:first-child),
.permissionTable th:not(:first-child) {
  width: 112px;
  text-align: center;
}

.createRoleForm {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 8px;
  width: min(100%, 420px);
}

.field,
.permissionEditor,
.userEditor,
.selectedUser {
  display: grid;
  gap: 8px;
}

.fieldInput {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: 0;
  background: rgba(20, 20, 20, 0.72);
  color: var(--foreground-strong);
}

.fieldInput::placeholder {
  color: var(--foreground-faint);
}

.fieldInput:focus,
button:focus-visible,
a:focus-visible {
  border-color: rgba(99, 246, 248, 0.48);
  outline: 3px solid rgba(99, 246, 248, 0.16);
  outline-offset: 1px;
}

.accessWorkspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.roleRail,
.userList {
  display: grid;
  max-height: 610px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.roleItem,
.userItem {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  text-align: left;
}

.roleItem:last-child,
.userItem:last-child {
  border-bottom: 0;
}

.roleItem span,
.userItem span,
.selectedUser span {
  overflow: hidden;
  color: var(--foreground-muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roleItem:hover,
.userItem:hover {
  background: rgba(224, 238, 238, 0.035);
}

.roleItemActive,
.userItemActive {
  background: rgba(99, 246, 248, 0.09);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.editorToolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.saveButton {
  min-width: 140px;
}

.responsibilityPanel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(99, 246, 248, 0.055);
}

.responsibilityCopy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.responsibilityCopy strong {
  overflow: hidden;
  color: var(--foreground-strong);
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responsibilityCopy span:last-child {
  color: var(--foreground-soft);
  font-size: 13px;
}

.scopeProgress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.08);
}

.scopeProgress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.responsibilityActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.advancedMatrix {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.028);
}

.advancedMatrix summary {
  min-height: 46px;
  padding: 14px;
  color: var(--foreground-strong);
  font-weight: 700;
  list-style-position: inside;
  cursor: pointer;
}

.advancedMatrix .tableWrap {
  margin: 0 14px 14px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(224, 238, 238, 0.035);
  color: var(--foreground-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.toggleOn {
  border-color: rgba(99, 246, 248, 0.5);
  background: rgba(99, 246, 248, 0.14);
  color: var(--cyan);
}

.usersPanel {
  position: sticky;
  top: 96px;
}

.usersWorkspace {
  display: grid;
  gap: 14px;
}

.userList {
  max-height: 285px;
}

.selectedUser {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--border);
}

.checkboxGrid {
  display: grid;
  gap: 0;
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.checkboxRow {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  color: var(--foreground-soft);
}

.checkboxRow:last-child {
  border-bottom: 0;
}

.checkboxRow:hover {
  background: rgba(224, 238, 238, 0.03);
}

.checkboxRow input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cyan);
}

.checkboxRow span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice,
.emptyState {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(224, 238, 238, 0.045);
}

.notice {
  padding: 12px 14px;
  color: var(--foreground);
}

.noticeError {
  border-color: rgba(255, 118, 118, 0.35);
  background: rgba(255, 118, 118, 0.08);
  color: #ffd0d0;
}

.emptyState {
  margin: 0;
  padding: 14px;
  color: var(--foreground-muted);
}

.loginShell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 32px 0;
}

.statePanel,
.panel-loading {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(224, 238, 238, 0.06), rgba(224, 238, 238, 0.035)),
    var(--background-elevated);
  box-shadow: var(--shadow);
  text-align: center;
}

.stateBrand .brandMonogram {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.stateBrand .brandName {
  font-size: 19px;
}

.statePanel h1 {
  margin: 0;
  color: var(--foreground-strong);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.statePanel p,
.panel-loading {
  color: var(--foreground-soft);
}

.panelLoginPanel {
  justify-items: stretch;
  text-align: left;
}

.panelLoginPanel .stateBrand,
.panelLoginPanel h1 {
  justify-self: center;
}

.panelLoginForm {
  display: grid;
  gap: 14px;
  width: 100%;
}

.panelLoginButton {
  width: 100%;
}

.panelLoginErrors {
  width: 100%;
}

.loader,
.panel-loading__mark {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(224, 238, 238, 0.14);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.panel-loading {
  margin: 16vh auto 0;
}

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

@media (max-width: 1240px) {
  .dashboardHeaderInner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .topBarMeta {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-bottom: 14px;
  }

  .topBarNav {
    justify-self: end;
  }

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

  .usersPanel {
    position: static;
  }
}

@media (max-width: 920px) {
  .dashboardHeaderInner,
  .workspaceFrame,
  .loginShell {
    width: min(calc(100% - 32px), 1528px);
  }

  .dashboardHeaderInner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 0;
  }

  .topBarBrand,
  .topBarNav,
  .topBarMeta {
    justify-self: stretch;
  }

  .topBarNav {
    justify-content: flex-start;
  }

  .topBarMeta {
    align-items: flex-start;
  }

  .topBarUser {
    text-align: left;
  }

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

  .roleRail {
    max-height: 260px;
  }

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

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

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

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .topBarMeta {
    display: grid;
    gap: 10px;
  }

  .topBarActionGroup {
    justify-content: stretch;
  }

  .topBarActionGroup .headerButton {
    flex: 1 1 120px;
  }

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

  .panelCard {
    padding: 14px;
  }

  .panelCardHeader,
  .editorToolbar,
  .responsibilityPanel {
    grid-template-columns: 1fr;
  }

  .panelCardHeader {
    display: grid;
  }

  .botFullHeader {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .chatDetailHeader,
  .chatDetailTitle {
    grid-template-columns: 1fr;
  }

  .chatDetailHeader {
    display: grid;
  }

  .chatDetailTitle {
    display: grid;
  }

  .chatDetailActions,
  .chatDetailActions .primaryButton,
  .detailBackButton {
    width: 100%;
  }

  .botFullActions {
    justify-content: stretch;
  }

  .botFullActions .primaryButton,
  .botFullActions .secondaryButton {
    flex: 1 1 130px;
  }

  .botPageTabs {
    width: 100%;
    border-radius: var(--radius);
  }

  .botPageTabs .sectionTab {
    flex: 1 1 130px;
    justify-content: center;
    text-align: center;
  }

  .dataBlockHeader {
    display: grid;
  }

  .lineChart {
    min-height: 250px;
  }

  .lineChartSvg {
    height: 166px;
  }

  .barChartRow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .barValue {
    text-align: left;
  }

  .createRoleForm {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .saveButton,
  .createRoleForm .primaryButton,
  .responsibilityActions .primaryButton,
  .responsibilityActions .secondaryButton,
  .userEditor .primaryButton {
    width: 100%;
  }

  .workSectionCard p {
    min-height: 0;
  }
}

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

  .pageTitle {
    font-size: 30px;
  }

  .primaryButton,
  .secondaryButton {
    white-space: normal;
  }

}
