@charset "UTF-8";
:root {
  --bg:#f4f6fa;
  --surface:#fff;
  --text:#172339;
  --muted:#778397;
  --border:#e5eaf1;
  --brand:#0d998b;
  --brand-soft:#e8f7f4;
  --nav:#0c1728;
  --nav-muted:#8494ab;
  --danger:#b74444;
  --warning:#a8791c;
  --shadow:0 7px 24px #13243b07;
  --radius:14px;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
  font-size:14px
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  outline-offset:4px
}
button {
  cursor:pointer
}
a {
  color:var(--brand)
}
button:disabled {
  cursor:wait;
  opacity:.55
}
button:focus-visible,a:focus-visible {
  outline:3px solid #29c4b0
}
input,select,textarea {
  width:100%;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  border-radius:8px;
  padding:11px 12px;
  outline:0;
  min-height:41px
}
input:focus,select:focus,textarea:focus {
  border-color:var(--brand);
  box-shadow:0 0 0 3px #12b6a415
}
input[type=checkbox] {
  width:17px;
  min-height:17px;
  height:17px;
  accent-color:var(--brand);
  flex-shrink:0
}
textarea {
  resize:vertical;
  min-height:100px
}
input[type=password] {
  letter-spacing:.04em
}
label {
  font-size:12px;
  font-weight:600;
  color:var(--text);
  display:block;
  margin-bottom:7px
}
h1,h2,h3,h4,p {
  margin:0
}
h1 {
  font-size:29px;
  letter-spacing:-.8px;
  font-weight:650
}
h2 {
  font-size:19px;
  letter-spacing:-.3px
}
h3 {
  font-size:15px;
  font-weight:650
}
p {
  line-height:1.6
}
small {
  font-size:11px
}
.muted {
  color:var(--muted)
}
.caption {
  font-size:12px;
  color:var(--muted);
  line-height:1.55
}
.eyebrow {
  font-size:10px;
  letter-spacing:1.8px;
  font-weight:700;
  text-transform:uppercase;
  color:var(--brand);
  margin-bottom:9px
}
.mono {
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:12px
}
.icon {
  width:19px;
  height:19px;
  display:inline-block;
  vertical-align:middle;
  flex-shrink:0;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round
}
.icon-lg {
  width:25px;
  height:25px
}
.brand-symbol {
  display:grid;
  place-items:center;
  width:37px;
  height:37px;
  background:#16b6a4;
  border-radius:10px;
  font-size:24px;
  font-weight:850;
  color:#fff
}
.brand {
  display:flex;
  align-items:center;
  gap:11px
}
.brand strong {
  font-size:23px;
  letter-spacing:1px
}
.brand span {
  font-size:10px;
  display:block;
  letter-spacing:1.8px;
  color:var(--nav-muted);
  margin-top:3px
}
.brand .brand-symbol {
  font-size:25px;
  letter-spacing:-4px;
  padding-right:4px
}
.btn {
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  border-radius:8px;
  padding:10px 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:600;
  font-size:12px;
  min-height:39px;
  white-space:nowrap;
  transition:background .15s
}
.btn:hover {
  background:var(--bg)
}
.btn-primary {
  background:var(--brand);
  border-color:var(--brand);
  color:#fff
}
.btn-primary:hover {
  background:#087f74
}
.btn-soft {
  background:var(--brand-soft);
  border-color:transparent;
  color:var(--brand)
}
.btn-ghost {
  background:transparent;
  border-color:transparent
}
.btn-danger {
  color:var(--danger);
  border-color:#e6b9b9
}
.btn-sm {
  padding:7px 10px;
  min-height:32px
}
.icon-btn {
  width:34px;
  height:34px;
  border:1px solid var(--border);
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--surface);
  color:var(--muted)
}
.icon-btn:hover {
  color:var(--brand);
  background:var(--brand-soft)
}
.pill {
  font-size:10px;
  font-weight:650;
  border-radius:6px;
  padding:5px 8px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:var(--brand-soft);
  color:var(--brand);
  white-space:nowrap
}
.pill-neutral {
  color:var(--muted);
  background:var(--bg)
}
.pill-warning {
  background:#fff6df;
  color:var(--warning)
}
.pill-danger {
  background:#fceced;
  color:var(--danger)
}
.status-dot {
  width:6px;
  height:6px;
  background:currentColor;
  border-radius:50%;
  display:inline-block
}
.flex {
  display:flex;
  align-items:center;
  gap:12px
}
.between {
  justify-content:space-between
}
.wrap {
  flex-wrap:wrap
}
.gap-sm {
  gap:6px
}
.stack {
  display:flex;
  flex-direction:column;
  gap:16px
}
.grid2 {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px
}
.grid3 {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px
}
.span2 {
  grid-column:span 2
}
.w-full {
  width:100%
}
.mt {
  margin-top:20px
}
.mt-sm {
  margin-top:10px
}
.mb {
  margin-bottom:20px
}
.mb-sm {
  margin-bottom:10px
}
.right {
  text-align:right
}
.row-divider {
  border-top:1px solid var(--border);
  padding-top:17px;
  margin-top:17px
}
.boot {
  min-height:100vh;
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:center;
  justify-content:center;
  color:var(--muted)
}
.layout {
  display:grid;
  grid-template-columns:236px minmax(0,1fr);
  min-height:100vh
}
.sidebar {
  background:var(--nav);
  color:#fff;
  position:fixed;
  inset:0 auto 0 0;
  width:236px;
  display:flex;
  flex-direction:column;
  padding:29px 18px 18px;
  z-index:30;
  border-right:1px solid #ffffff0c
}
.sidebar .brand {
  padding:0 12px 26px
}
.sidebar nav {
  overflow-y:auto;
  flex:1
}
.nav-group {
  font-size:9px;
  font-weight:700;
  letter-spacing:1.8px;
  color:#687b95;
  margin:22px 14px 10px
}
.nav-item {
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 14px;
  width:100%;
  background:transparent;
  border:0;
  color:#9cadc4;
  font-size:12px;
  text-align:left;
  border-radius:8px;
  margin:3px 0
}
.nav-item:hover {
  background:#ffffff07;
  color:#fff
}
.nav-item.active {
  color:#70dbc9;
  background:#103630;
  border:1px solid #1b4941;
  padding:11px 13px
}
.nav-item .nav-badge {
  margin-left:auto;
  font-size:8px;
  letter-spacing:.8px;
  background:#17aa8d22;
  color:#71d8c9;
  padding:4px 5px;
  border-radius:4px
}
.sidebar-bottom {
  margin-top:15px;
  border-top:1px solid #ffffff0b;
  padding-top:16px
}
.sidebar-footnote {
  font-size:10px;
  color:#677b97;
  padding:10px 14px
}
.profile-btn {
  display:flex;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  color:white;
  text-align:left;
  width:100%;
  padding:9px;
  border-radius:9px
}
.profile-btn:hover {
  background:#ffffff06
}
.avatar {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#23403f;
  color:#8be1d2;
  font-size:11px;
  font-weight:700;
  flex-shrink:0
}
.profile-name {
  font-size:11px;
  font-weight:650;
  max-width:130px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.profile-role {
  font-size:9px;
  color:var(--nav-muted);
  margin-top:4px
}
.main-shell {
  grid-column:2;
  min-width:0
}
.topbar {
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 34px;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  gap:20px
}
.breadcrumb {
  font-size:11px;
  color:var(--muted)
}
.breadcrumb strong {
  color:var(--text);
  font-weight:600
}
.breadcrumb b {
  font-weight:400;
  padding:0 10px;
  color:#c3cad5
}
.search-top {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:11px;
  color:var(--muted);
  background:var(--bg);
  border:1px solid var(--border);
  padding:9px 11px;
  border-radius:7px;
  width:230px;
  cursor:pointer
}
.key-hint {
  margin-left:auto;
  font-size:9px;
  padding:2px 5px;
  border:1px solid var(--border);
  border-radius:4px
}
.top-tools {
  display:flex;
  align-items:center;
  gap:12px
}
.top-date {
  font-size:11px;
  color:var(--muted);
  white-space:nowrap
}
.mobile-menu {
  display:none
}
.page {
  padding:31px 34px 44px;
  max-width:1720px;
  margin:0 auto;
  animation:appear .2s ease
}
.page-heading {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  margin-bottom:27px
}
.page-heading p {
  margin-top:7px;
  font-size:12px;
  color:var(--muted)
}
.source-select {
  min-width:195px;
  max-width:275px;
  font-size:11px;
  min-height:38px;
  padding:9px 32px 9px 12px
}
.demo-banner {
  display:flex;
  align-items:center;
  gap:9px;
  color:#92701c;
  background:#fff8e8;
  border:1px solid #f3e6c8;
  border-radius:9px;
  padding:10px 13px;
  font-size:11px;
  margin-bottom:23px
}
.demo-banner strong {
  font-weight:650
}
.card {
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:21px;
  min-width:0
}
.card-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:20px
}
.card-head .caption {
  margin-top:4px
}
.stats-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:17px;
  margin-bottom:24px
}
.stat {
  padding:19px 21px
}
.stat-icon {
  width:33px;
  height:33px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:var(--brand-soft);
  color:var(--brand)
}
.stat-label {
  font-size:11px;
  color:var(--muted);
  font-weight:500
}
.stat-value {
  font-size:31px;
  font-weight:650;
  letter-spacing:-.8px;
  margin:17px 0 5px;
  font-variant-numeric:tabular-nums
}
.stat-note {
  font-size:10px;
  color:var(--muted)
}
.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:26px 0 14px;
  gap:15px
}
.section-heading .caption {
  margin-top:5px
}
.overview-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 286px;
  gap:20px
}
.analytics-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:19px
}
.dashboard-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:19px
}
.dashboard-grid .kpi-card {
  padding:22px
}
.kpi-number {
  font-size:34px;
  font-weight:650;
  letter-spacing:-1px;
  line-height:1.3;
  margin:17px 0 8px;
  overflow-wrap:anywhere;
  font-variant-numeric:tabular-nums
}
.ai-card {
  background:linear-gradient(145deg,#102c3b,#142037);
  color:#fff;
  border:1px solid #294152;
  box-shadow:0 6px 24px #0c17280d
}
.ai-card .caption {
  color:#96afbc
}
.ai-orb {
  width:49px;
  height:49px;
  border:1px solid #329a8b66;
  background:linear-gradient(120deg,#3bc8ab25,#379bdf20);
  border-radius:13px;
  display:grid;
  place-items:center;
  color:#80e0ca;
  margin:3px 0 24px
}
.ai-card h2 {
  font-size:21px;
  line-height:1.3
}
.ai-card .btn {
  margin-top:24px
}
.ai-card .micro {
  font-size:9px;
  color:#83a39f;
  margin-top:14px
}
.mini-list {
  display:flex;
  flex-direction:column;
  gap:19px;
  margin-top:8px
}
.mini-list-item {
  display:flex;
  align-items:center;
  gap:10px
}
.mini-list-item .icon {
  color:var(--brand)
}
.mini-list-item strong {
  font-size:11px;
  display:block
}
.mini-list-item small {
  display:block;
  color:var(--muted);
  margin-top:5px
}
.dashboard-card {
  display:flex;
  flex-direction:column;
  min-height:188px
}
.dashboard-card .dashboard-icon {
  width:38px;
  height:38px;
  border-radius:9px;
  display:grid;
  place-items:center;
  background:#edf3fb;
  color:#5e85b4;
  margin-bottom:17px
}
.dashboard-card h3 {
  font-size:14px;
  line-height:1.4
}
.dashboard-card .caption {
  margin-top:7px;
  flex:1
}
.dashboard-card-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:18px;
  gap:8px
}
.chart-svg {
  display:block;
  width:100%;
  height:auto;
  min-height:180px
}
.chart-svg text {
  font-family:inherit;
  font-size:12px;
  fill:var(--muted)
}
.compact-result .chart-svg text {
  font-size:20px
}
.chart-grid {
  stroke:var(--border);
  stroke-dasharray:3 4
}
.chart-legend {
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
  margin:13px 0 0
}
.legend-item {
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:10px
}
.legend-0 {
  color:#15a897
}
.legend-1 {
  color:#6199cf
}
.legend-2 {
  color:#b993db
}
.legend-3 {
  color:#dfb064
}
.legend-4 {
  color:#7b93a7
}
.legend-5 {
  color:#de8e8d
}
.legend-6 {
  color:#73b78b
}
.legend-7 {
  color:#8cbbca
}
.chart-caption {
  font-size:9px;
  color:var(--muted);
  margin-top:13px;
  display:flex;
  justify-content:space-between;
  gap:8px
}
.table-wrap {
  overflow-x:auto;
  width:100%
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:11px
}
th {
  color:var(--muted);
  font-size:10px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.6px;
  background:var(--bg);
  padding:12px 13px;
  border-bottom:1px solid var(--border);
  white-space:nowrap
}
td {
  padding:13px;
  border-bottom:1px solid var(--border);
  max-width:400px;
  overflow-wrap:anywhere;
  line-height:1.5
}
tr:last-child td {
  border-bottom:0
}
tbody tr:hover {
  background:#17aa9503
}
.table-sort {
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
  padding:0
}
.table-pagination {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-top:13px;
  font-size:10px;
  color:var(--muted)
}
.table-actions {
  display:flex;
  gap:6px;
  justify-content:flex-end
}
.empty {
  padding:53px 20px;
  text-align:center;
  color:var(--muted)
}
.empty .icon {
  width:38px;
  height:38px;
  color:#aebbc9;
  margin-bottom:16px
}
.empty h3 {
  color:var(--text);
  margin-bottom:8px
}
.empty p {
  font-size:12px;
  max-width:490px;
  margin:0 auto 18px
}
.loading {
  padding:50px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  color:var(--muted);
  font-size:12px
}
.spinner {
  width:18px;
  height:18px;
  border:2px solid var(--border);
  border-top-color:var(--brand);
  border-radius:50%;
  animation:spin .8s linear infinite
}
.notice {
  padding:12px 14px;
  border-radius:9px;
  background:var(--brand-soft);
  color:var(--brand);
  font-size:11px;
  line-height:1.6
}
.notice-warning {
  background:#fff7e6;
  color:#967123
}
.notice-error {
  background:#fceeee;
  color:var(--danger)
}
.query-layout {
  display:grid;
  grid-template-columns:285px minmax(0,1fr);
  gap:21px;
  align-items:start
}
.builder {
  position:sticky;
  top:20px;
  padding:21px
}
.builder-section {
  padding-top:18px;
  margin-top:18px;
  border-top:1px solid var(--border)
}
.builder-title {
  font-size:11px;
  font-weight:650;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:11px
}
.check-list {
  display:flex;
  flex-direction:column;
  gap:9px;
  max-height:190px;
  overflow:auto
}
.check {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:400;
  margin:0;
  cursor:pointer;
  line-height:1.4
}
.check-list label {
  padding:1px 0
}
.check-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.check-grid .check {
  padding:9px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:7px
}
.filter-row {
  padding:12px;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--bg);
  margin-bottom:10px
}
.filter-row select,.filter-row input {
  font-size:11px;
  padding:8px;
  min-height:34px
}
.filter-row .filter-top {
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:7px
}
.filter-row .icon-btn {
  width:26px;
  height:26px;
  flex-shrink:0
}
.filter-row label {
  margin-top:7px
}
.filter-row .filter-bottom {
  display:grid;
  grid-template-columns:90px 1fr;
  gap:7px
}
.result-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:18px
}
.segment {
  display:inline-flex;
  background:var(--bg);
  padding:3px;
  border-radius:8px;
  gap:3px
}
.segment button {
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:10px;
  padding:7px 11px;
  border-radius:6px
}
.segment button.active {
  background:var(--surface);
  color:var(--text);
  box-shadow:0 2px 5px #0a1a2a0b
}
.query-meta {
  display:flex;
  gap:13px;
  flex-wrap:wrap;
  margin-top:14px;
  font-size:10px;
  color:var(--muted)
}
details {
  font-size:11px;
  color:var(--muted)
}
summary {
  cursor:pointer;
  line-height:1.6
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  background:var(--bg);
  border:1px solid var(--border);
  padding:15px;
  border-radius:8px;
  font-size:11px;
  line-height:1.6;
  color:var(--text);
  max-height:450px;
  overflow:auto
}
.catalog-card {
  padding:0;
  overflow:hidden
}
.catalog-head {
  padding:22px;
  border-bottom:1px solid var(--border)
}
.catalog-body {
  padding:21px
}
.field-tag {
  border:1px solid var(--border);
  border-radius:6px;
  font-size:10px;
  padding:5px 8px;
  background:var(--bg);
  color:var(--muted);
  display:inline-block;
  margin:3px 4px 3px 0
}
.metric-tag {
  background:var(--brand-soft);
  border-color:#d5ede7;
  color:var(--brand)
}
.chat-layout {
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:20px;
  min-height:620px
}
.chat-aside {
  padding:22px;
  display:flex;
  flex-direction:column
}
.chat-aside .caption {
  margin-top:8px
}
.chat-hint {
  padding:13px;
  background:var(--bg);
  border-radius:8px;
  margin-top:20px;
  color:var(--muted);
  font-size:11px;
  line-height:1.8
}
.chat-main {
  display:flex;
  flex-direction:column;
  min-width:0
}
.chat-messages {
  display:flex;
  flex-direction:column;
  gap:20px;
  flex:1;
  max-height:650px;
  overflow:auto;
  padding:8px 4px 20px
}
.chat-welcome {
  padding:47px 24px;
  text-align:center
}
.chat-welcome .ai-orb {
  margin:0 auto 20px;
  color:var(--brand);
  background:var(--brand-soft)
}
.chat-welcome h2 {
  font-size:25px
}
.chat-welcome p {
  margin:11px auto 22px;
  color:var(--muted);
  font-size:12px;
  max-width:510px
}
.suggestions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  max-width:530px;
  margin:0 auto
}
.suggestion {
  padding:15px;
  text-align:left;
  border:1px solid var(--border);
  border-radius:9px;
  background:var(--surface);
  color:var(--text);
  font-size:11px;
  line-height:1.5
}
.suggestion:hover {
  border-color:var(--brand)
}
.chat-question {
  max-width:85%;
  align-self:flex-end;
  background:#e4f1ee;
  color:#25594f;
  border-radius:13px 13px 3px 13px;
  padding:14px 18px;
  white-space:pre-wrap;
  font-size:12px;
  line-height:1.7
}
.chat-answer {
  display:flex;
  align-items:flex-start;
  gap:12px;
  max-width:100%;
  min-width:0
}
.chat-answer .avatar {
  background:var(--brand-soft);
  border-radius:10px;
  color:var(--brand)
}
.chat-answer-content {
  min-width:0;
  flex:1
}
.chat-answer-text {
  line-height:1.8;
  font-size:12px;
  white-space:pre-wrap;
  padding:5px 0 15px
}
.chat-result {
  padding:18px;
  margin-top:4px
}
.chat-composer {
  display:flex;
  gap:10px;
  background:var(--surface);
  border:1px solid var(--border);
  padding:12px;
  border-radius:12px;
  align-items:center;
  box-shadow:var(--shadow)
}
.chat-composer textarea {
  border:0;
  box-shadow:none;
  min-height:43px;
  max-height:160px;
  padding:11px 10px;
  font-size:12px;
  resize:none
}
.chat-composer button {
  height:40px
}
.chat-disclaimer {
  text-align:center;
  font-size:9px;
  color:var(--muted);
  margin-top:10px
}
.role-card {
  display:flex;
  flex-direction:column;
  gap:13px
}
.role-card .caption {
  flex:1
}
.source-card .source-logo {
  height:42px;
  width:42px;
  border-radius:11px;
  background:#e9f1fc;
  color:#587fac;
  display:grid;
  place-items:center;
  font-size:13px;
  font-weight:700
}
.source-card .source-logo.fabric {
  background:var(--brand-soft);
  color:var(--brand)
}
.source-card .source-logo.demo {
  background:#f6eee1;
  color:#a88a4f
}
.source-info {
  font-size:11px;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:14px
}
.module-card {
  display:flex;
  gap:18px;
  align-items:flex-start
}
.module-icon {
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:10px;
  color:var(--brand);
  background:var(--brand-soft)
}
.module-body {
  flex:1
}
.switch {
  width:39px;
  height:23px;
  border-radius:20px;
  background:#cbd4df;
  border:0;
  padding:3px;
  display:flex;
  align-items:center;
  flex-shrink:0
}
.switch:before {
  content:"";
  height:17px;
  width:17px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px #0002
}
.switch.on {
  background:var(--brand);
  justify-content:flex-end
}
.audit-filters {
  display:grid;
  grid-template-columns:2fr 2fr 1fr auto;
  gap:12px;
  align-items:end;
  margin-bottom:20px
}
.editor-component {
  padding:17px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface);
  display:flex;
  align-items:center;
  gap:13px
}
.editor-component .component-icon {
  width:40px;
  height:40px;
  background:var(--brand-soft);
  color:var(--brand);
  border-radius:9px;
  display:grid;
  place-items:center
}
.editor-component .component-info {
  flex:1
}
.add-component {
  border:1px dashed #a7cfc8;
  background:var(--brand-soft);
  color:var(--brand);
  border-radius:11px;
  padding:21px;
  font-size:12px;
  display:flex;
  gap:9px;
  align-items:center;
  justify-content:center;
  width:100%
}
.module-deps {
  font-size:10px;
  margin-top:10px;
  color:var(--muted)
}
.login {
  display:grid;
  grid-template-columns:1.08fr 1fr;
  min-height:100vh
}
.login-visual {
  position:relative;
  background:var(--nav);
  color:#fff;
  padding:48px 58px;
  display:flex;
  flex-direction:column;
  overflow:hidden
}
.login-visual:before {
  content:"";
  position:absolute;
  width:630px;
  height:630px;
  background:radial-gradient(circle,#1bb2a114,transparent 65%);
  border:1px solid #51ccaf12;
  border-radius:50%;
  right:-190px;
  bottom:-120px
}
.login-visual:after {
  content:"";
  position:absolute;
  inset:0;
  background-image:linear-gradient(#ffffff02 1px,transparent 1px),linear-gradient(90deg,#ffffff02 1px,transparent 1px);
  background-size:42px 42px;
  pointer-events:none
}
.login-copy {
  position:relative;
  z-index:1;
  margin:auto 0;
  padding:60px 0
}
.login-copy h1 {
  font-size:45px;
  line-height:1.22;
  max-width:460px;
  font-weight:600;
  letter-spacing:-1.4px
}
.login-copy h1 span {
  color:#6bddc5
}
.login-copy p {
  color:#93a4b9;
  max-width:390px;
  font-size:13px;
  line-height:1.85;
  margin-top:21px
}
.login-features {
  display:flex;
  gap:22px;
  margin-top:35px;
  flex-wrap:wrap
}
.login-features span {
  display:flex;
  gap:7px;
  align-items:center;
  color:#a0b9bf;
  font-size:10px
}
.login-mini-chart {
  border:1px solid #ffffff0b;
  background:#132135bb;
  border-radius:14px;
  padding:25px;
  max-width:460px;
  margin-top:42px;
  box-shadow:0 14px 40px #0001
}
.login-mini-chart svg {
  width:100%;
  height:90px;
  display:block
}
.login-mini-title {
  font-size:10px;
  letter-spacing:1px;
  color:#8eabc2;
  margin-bottom:22px
}
.login-visual-footer {
  font-size:9px;
  letter-spacing:.6px;
  color:#60748f;
  position:relative;
  z-index:1
}
.login-form-area {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:50px;
  background:var(--surface)
}
.login-form-card {
  width:100%;
  max-width:365px
}
.login-form-card h2 {
  font-size:28px;
  letter-spacing:-.7px
}
.login-form-card p {
  font-size:12px;
  color:var(--muted);
  margin:12px 0 27px
}
.login-form-card .field {
  margin-top:20px
}
.login-form-card button[type=submit] {
  width:100%;
  margin-top:25px;
  height:45px
}
.login-form-card .login-security {
  border-top:1px solid var(--border);
  margin-top:30px;
  padding-top:21px;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:10px;
  color:var(--muted)
}
.login-form-card .eyebrow {
  margin-bottom:15px
}
.form-error {
  color:var(--danger);
  font-size:11px;
  line-height:1.6;
  margin-top:15px
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:17px
}
.field {
  min-width:0
}
.field-help {
  font-size:10px;
  color:var(--muted);
  line-height:1.6;
  margin-top:6px
}
.modal-backdrop {
  position:fixed;
  inset:0;
  background:#09172799;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  backdrop-filter:blur(4px)
}
.modal {
  width:100%;
  max-width:650px;
  max-height:91vh;
  overflow-y:auto;
  background:var(--surface);
  border-radius:16px;
  box-shadow:0 25px 100px #0003
}
.modal-lg {
  max-width:900px
}
.modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:23px 25px;
  border-bottom:1px solid var(--border)
}
.modal-header h2 {
  font-size:19px
}
.modal-body {
  padding:24px 25px
}
.modal-footer {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:24px;
  padding-top:19px;
  border-top:1px solid var(--border)
}
.search-result {
  padding:14px 0;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  background:transparent;
  border:0;
  text-align:left;
  color:var(--text)
}
.search-result .caption {
  display:block;
  margin-top:4px
}
.permissions-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.permission-check {
  border:1px solid var(--border);
  padding:12px;
  display:flex;
  align-items:flex-start;
  gap:9px;
  border-radius:8px;
  margin:0;
  font-size:11px;
  font-weight:400;
  line-height:1.6
}
.permission-check input {
  margin-top:1px
}
.gate {
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:35px;
  background:var(--bg)
}
.gate-card {
  max-width:530px;
  width:100%;
  padding:35px
}
.gate-card .brand {
  margin-bottom:33px
}
.gate-card h2 {
  font-size:24px;
  margin-bottom:12px
}
.recovery-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin:20px 0
}
.recovery-grid code {
  padding:11px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:7px;
  text-align:center;
  font-size:12px
}
.secret-key {
  overflow-wrap:anywhere;
  font-size:16px;
  letter-spacing:2px
}
.modal .builder {
  position:static;
  box-shadow:none;
  border:0;
  padding:0
}
.modal .builder-section:first-child {
  margin:0;
  padding:0;
  border:0
}
.component-form-layout {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:23px
}
.component-form-layout .check-list {
  max-height:190px
}
.mobile-overlay {
  display:none
}
#toast {
  position:fixed;
  right:28px;
  bottom:25px;
  background:#173b36;
  color:#e1fff4;
  border:1px solid #2d685e;
  border-radius:10px;
  box-shadow:0 9px 25px #0002;
  padding:14px 20px;
  z-index:150;
  max-width:430px;
  font-size:12px;
  line-height:1.6;
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  transition:.2s
}
#toast.show {
  opacity:1;
  transform:translateY(0)
}
#toast.error {
  background:#6a2f31;
  border-color:#934c4f;
  color:#ffe7e7
}
.hidden,[hidden] {
  display:none!important
}
.truncate {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.full-width {
  grid-column:1 / -1
}
.toolbar {
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap
}
.count-badge {
  background:var(--bg);
  color:var(--muted);
  padding:5px 8px;
  border:1px solid var(--border);
  border-radius:7px;
  font-size:10px
}
.page-footer {
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-top:1px solid var(--border);
  padding-top:18px;
  margin-top:35px;
  font-size:9px;
  color:var(--muted)
}
.text-body {
  font-size:12px;
  line-height:1.7
}
.preview-note {
  font-size:10px;
  color:var(--muted);
  margin-top:8px
}
.mobile-close {
  display:none
}
body.dark {
  --bg:#101b2b;
  --surface:#162338;
  --text:#dbe4f0;
  --muted:#8c9fb8;
  --border:#27384e;
  --brand:#45c9b1;
  --brand-soft:#1a3b3a;
  --shadow:0 7px 24px #0001
}
.dark .demo-banner,.dark .notice-warning {
  background:#382f1f;
  color:#d1b47c;
  border-color:#584c30
}
.dark .pill-warning {
  background:#382f1f;
  color:#d1b47c
}
.dark .pill-danger,.dark .notice-error {
  background:#402a34;
  color:#e9a1ab
}
.dark .btn-primary {
  color:#102d29;
  background:#40bca5;
  border-color:#40bca5
}
.dark .btn-primary:hover {
  background:#55ccb6
}
.dark .dashboard-icon {
  background:#263650;
  color:#8facd8
}
.dark .chat-question {
  background:#22433f;
  color:#bce6dc
}
.dark .source-card .source-logo {
  background:#243b57;
  color:#94badf
}
.dark .metric-tag {
  border-color:#264e47
}
.dark .field-tag {
  background:#1d2f44
}
.dark .metric-tag {
  background:#1a3b3a
}
.dark .login-form-area {
  background:var(--surface)
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
@keyframes appear {
  from {
    opacity:.5;
    transform:translateY(4px)
  }
  to {
    opacity:1;
    transform:translateY(0)
  }
}
@media(min-width:1600px) {
  .page {
    padding:38px 48px 48px
  }
  .topbar {
    padding:0 48px
  }
  .overview-grid {
    grid-template-columns:minmax(0,1fr) 330px
  }
}
@media(max-width:1200px) {
  .topbar {
    padding:0 25px
  }
  .page {
    padding:27px 25px
  }
  .overview-grid {
    grid-template-columns:1fr
  }
  .overview-side {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px
  }
  .grid3 {
    grid-template-columns:1fr 1fr
  }
  .source-select {
    min-width:170px
  }
  .search-top {
    width:180px
  }
  .top-date {
    display:none
  }
  .query-layout {
    grid-template-columns:250px minmax(0,1fr)
  }
  .chat-layout {
    grid-template-columns:205px minmax(0,1fr)
  }
}
@media(max-width:1000px) {
  .layout {
    grid-template-columns:205px minmax(0,1fr)
  }
  .sidebar {
    width:205px;
    padding:25px 12px 14px
  }
  .sidebar .brand {
    padding-left:12px
  }
  .stats-grid {
    grid-template-columns:repeat(2,1fr)
  }
  .page-heading {
    flex-wrap:wrap
  }
  .query-layout {
    grid-template-columns:1fr
  }
  .builder {
    position:static
  }
  .builder .check-list {
    max-height:140px
  }
  .builder-form-columns {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px
  }
  .chat-layout {
    grid-template-columns:1fr
  }
  .chat-aside {
    display:none
  }
  .login-visual {
    padding:40px
  }
  .login-copy h1 {
    font-size:37px
  }
  .login-features {
    gap:15px
  }
  .login-form-area {
    padding:35px
  }
  .audit-filters {
    grid-template-columns:1fr 1fr
  }
  .topbar {
    height:68px
  }
  .search-top {
    width:auto
  }
  .key-hint {
    display:none
  }
}
@media(max-width:760px) {
  h1 {
    font-size:25px
  }
  .layout {
    display:block
  }
  .main-shell {
    width:100%
  }
  .sidebar {
    transform:translateX(-100%);
    transition:.2s;
    width:236px
  }
  .sidebar.open {
    transform:translateX(0)
  }
  .mobile-overlay.open {
    display:block;
    position:fixed;
    inset:0;
    background:#0c172899;
    z-index:29
  }
  .mobile-menu,.mobile-close {
    display:inline-flex
  }
  .topbar {
    padding:0 18px;
    gap:8px;
    height:64px
  }
  .breadcrumb {
    font-size:10px
  }
  .breadcrumb b {
    padding:0 5px
  }
  .breadcrumb .breadcrumb-home {
    display:none
  }
  .search-top {
    display:none
  }
  .top-tools {
    gap:7px
  }
  .page {
    padding:23px 18px
  }
  .page-heading {
    gap:15px;
    margin-bottom:21px
  }
  .page-heading .toolbar {
    width:100%
  }
  .source-select {
    max-width:none;
    flex:1
  }
  .stats-grid {
    gap:12px;
    margin-bottom:18px
  }
  .stat {
    padding:17px
  }
  .stat-value {
    font-size:28px;
    margin-top:15px
  }
  .stat-label {
    font-size:10px
  }
  .stat-icon {
    width:28px;
    height:28px
  }
  .grid2,.grid3,.analytics-grid,.dashboard-grid,.overview-side,.form-grid,.permissions-grid,.component-form-layout {
    grid-template-columns:1fr
  }
  .span2 {
    grid-column:auto
  }
  .card {
    padding:18px
  }
  .overview-grid {
    gap:16px
  }
  .section-heading {
    align-items:flex-start
  }
  .section-heading h2 {
    font-size:16px
  }
  .query-layout {
    gap:15px
  }
  .builder-form-columns {
    display:block
  }
  .result-top {
    flex-wrap:wrap
  }
  .chat-welcome {
    padding:30px 0
  }
  .suggestions {
    grid-template-columns:1fr
  }
  .chat-question {
    max-width:94%
  }
  .chat-layout {
    min-height:530px
  }
  .chat-messages {
    max-height:620px
  }
  .chat-composer {
    padding:7px
  }
  .login {
    grid-template-columns:1fr
  }
  .login-visual {
    display:none
  }
  .login-form-area {
    min-height:100vh;
    padding:35px 27px
  }
  .login-form-card:before {
    content:"MPS AI Analytics";
    display:block;
    color:var(--brand);
    font-size:16px;
    font-weight:750;
    letter-spacing:1px;
    margin-bottom:50px
  }
  .modal-backdrop {
    padding:13px
  }
  .modal-header {
    padding:19px
  }
  .modal-body {
    padding:19px
  }
  .modal {
    max-height:94vh
  }
  .gate {
    padding:20px
  }
  .gate-card {
    padding:25px
  }
  .page-footer {
    font-size:8px
  }
  .audit-filters {
    grid-template-columns:1fr
  }
  .demo-banner {
    font-size:10px;
    line-height:1.7;
    align-items:flex-start
  }
  td {
    padding:12px 9px
  }
  th {
    padding:11px 9px
  }
  .chart-svg {
    min-height:165px
  }
  .kpi-number {
    font-size:29px
  }
  .card-head {
    align-items:flex-start
  }
  .form-grid .full-width {
    grid-column:auto
  }
  .check-grid {
    grid-template-columns:1fr
  }
  .toolbar .btn {
    flex-shrink:0
  }
  #toast {
    left:18px;
    right:18px;
    bottom:18px;
    max-width:none
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important
  }
}
