:root {
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff6ff;
  --navy: #0b1739;
  --navy-soft: #172554;
  --text: #172033;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f6f8fc;
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --warning: #d97706;
  --warning-soft: #fff7ed;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --purple: #7c3aed;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --radius: 14px;
  --sidebar: 248px;
  --global-header: 68px;
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .24);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1739 0%, #101d45 100%);
  color: #dbeafe;
  z-index: 40;
}

.brand {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  box-shadow: 0 8px 20px rgba(59,130,246,.3);
}

.brand-mark svg { width: 22px; height: 22px; }
.brand-title { color: #fff; font-weight: 650; font-size: 15px; letter-spacing: .01em; }
.brand-subtitle { color: #8fa8d8; font-size: 11px; margin-top: 1px; }

.nav-scroll { flex: 1; overflow: auto; padding: 18px 14px; }
.nav-section + .nav-section { margin-top: 22px; }
.nav-label {
  color: #7289b5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  padding: 0 12px 8px;
}

.nav-item {
  position: relative;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  color: #c3d1ed;
  background: transparent;
  transition: background-color .2s ease, color .2s ease;
  text-align: left;
}

.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(59,130,246,.24); }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }
.nav-item .external-mark { width: 13px; height: 13px; margin-left: auto; opacity: .55; }
.nav-item .badge-count { margin-left: auto; }

.sidebar-status {
  margin: 0 14px 16px;
  padding: 13px 14px;
  border-radius: 11px;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.07);
}

.system-live { display: flex; align-items: center; gap: 8px; color: #e2e8f0; font-size: 12px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; border: 1px solid #bbf7d0; box-shadow: none; }
.system-caption { color: #8298c1; font-size: 11px; margin-top: 6px; }

.main { min-height: 100vh; margin-left: var(--sidebar); }

.topbar {
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumb strong { color: var(--text); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted-strong);
  transition: background-color .2s, color .2s, border-color .2s;
}
.icon-button:hover { color: var(--primary); border-color: #bfdbfe; background: var(--primary-soft); }
.icon-button svg { width: 17px; height: 17px; }
.user-chip { display: flex; align-items: center; gap: 9px; margin-left: 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #dbeafe; color: #1e40af; font-weight: 700; font-size: 12px; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); }

.content { padding: 26px 30px 44px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title { margin: 0; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.page-desc { color: var(--muted); margin: 7px 0 0; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  background: #fff;
  color: #334155;
  font-weight: 550;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { border-color: #bfdbfe; background: #f8fbff; color: var(--primary); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 6px 14px rgba(37,99,235,.16); }
.btn-primary:hover { color: #fff; background: var(--primary-strong); border-color: var(--primary-strong); }
.btn-danger { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15,23,42,.02);
}
.stat-card::after { display:none; }
.stat-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--stat-color, var(--primary)); background: var(--stat-tint, #eff6ff); }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { margin-top: 13px; font-size: 28px; font-weight: 700; line-height: 1; position: relative; z-index: 1; }
.stat-foot { margin-top: 9px; color: var(--muted); font-size: 12px; position: relative; z-index: 1; }
.up { color: var(--success); }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15,23,42,.025);
}
.panel-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 15px; font-weight: 650; }
.panel-subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; }
.panel-body { padding: 18px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box { position: relative; min-width: 240px; }
.search-box svg { position: absolute; width: 16px; height: 16px; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input, .select { height: 38px; padding: 0 11px; }
.search-box .input { padding-left: 34px; }
.textarea { min-height: 92px; padding: 10px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.select { min-width: 126px; color: #334155; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; background: #f8fafc; padding: 12px 14px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 14px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
tbody tr { transition: background-color .18s; }
tbody tr:hover { background: #fafcff; }
tbody tr:last-child td { border-bottom: 0; }
.row-title { font-weight: 600; color: #1e293b; }
.row-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.model-cell { display: flex; align-items: center; gap: 10px; }
.model-logo { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 750; }

.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.status::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-running { color: #2563eb; background: #eff6ff; }
.status-success { color: #15803d; background: #ecfdf3; }
.status-queued { color: #b45309; background: #fff7ed; }
.status-draft { color: #64748b; background: #f1f5f9; }
.status-failed { color: #dc2626; background: #fef2f2; }

.progress { width: 112px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #e8eef7; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 5px; }
.action-link { border: 0; background: transparent; color: var(--primary); padding: 4px 6px; font-size: 13px; border-radius: 6px; }
.action-link:hover { background: var(--primary-soft); }

.notice { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid #bfdbfe; border-radius: 11px; background: #eff6ff; color: #1e3a8a; }
.notice svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.notice-title { font-weight: 650; }
.notice-text { font-size: 12px; margin-top: 2px; color: #3b5f9a; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.quick-card:hover { border-color: #bfdbfe; background: #fbfdff; box-shadow: var(--shadow); }
.quick-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.quick-icon svg { width: 19px; height: 19px; }
.quick-title { margin-top: 13px; font-weight: 650; }
.quick-text { margin-top: 4px; color: var(--muted); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 18px; }
.metric-row { display: grid; grid-template-columns: 150px minmax(0,1fr) 52px; align-items: center; gap: 12px; margin: 14px 0; }
.metric-label { color: var(--muted-strong); }
.metric-bar { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.metric-bar > span { display: block; height: 100%; background: linear-gradient(90deg,#2563eb,#60a5fa); border-radius: inherit; }
.metric-value { font-weight: 650; text-align: right; }

.wizard-shell { max-width: 1080px; margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); margin-bottom: 22px; }
.step { position: relative; display: flex; align-items: center; gap: 10px; color: var(--muted); }
.step:not(:last-child)::after { content:""; position:absolute; left: 42px; right: 12px; top: 16px; height: 1px; background: #dbe3ef; z-index: 0; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: #fff; border: 1px solid #cbd5e1; color: var(--muted); font-weight: 650; position: relative; z-index: 1; }
.step.active, .step.done { color: var(--text); }
.step.active .step-dot { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 5px #eff6ff; }
.step.done .step-dot { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.step-text { background: var(--canvas); padding-right: 12px; position: relative; z-index: 1; font-weight: 550; }

.form-section { padding: 22px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.section-title { font-size: 15px; font-weight: 650; margin-bottom: 4px; }
.section-hint { color: var(--muted); font-size: 12px; margin-bottom: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.field label { display: block; font-weight: 570; margin-bottom: 7px; color: #334155; }
.required::after { content:" *"; color: var(--danger); }
.field-hint { color: var(--muted); font-size: 11px; margin-top: 6px; }
.span-2 { grid-column: 1 / -1; }

.choice-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.choice-card { position: relative; border: 1px solid #dbe3ed; border-radius: 11px; padding: 15px; cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.choice-card:hover { border-color: #93c5fd; }
.choice-card.selected { border-color: var(--primary); background: #f8fbff; box-shadow: 0 0 0 2px rgba(37,99,235,.08); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-title { display: flex; align-items: center; gap: 9px; font-weight: 650; }
.choice-title svg { width: 18px; height: 18px; color: var(--primary); }
.choice-desc { margin-top: 7px; color: var(--muted); font-size: 12px; }
.choice-recommend { display: inline-flex; margin-top: 9px; padding: 2px 7px; border-radius: 999px; color: #1d4ed8; background: #dbeafe; font-size: 10px; font-weight: 600; }

.model-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.model-option { display: flex; align-items: center; gap: 11px; border: 1px solid #dbe3ed; border-radius: 11px; padding: 13px; cursor: pointer; }
.model-option.selected { border-color: var(--primary); background: #f8fbff; box-shadow: 0 0 0 2px rgba(37,99,235,.08); }
.model-option input { position:absolute; opacity:0; }
.model-meta strong { display:block; font-size: 13px; }
.model-meta span { color:var(--muted); font-size:11px; }

.advanced-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; border:0; background:transparent; padding:0; color:#334155; font-weight:600; }
.advanced-toggle svg { width:17px; height:17px; transition:transform .2s; }
.advanced-toggle.open svg { transform:rotate(180deg); }
.advanced-content { display:none; margin-top:16px; }
.advanced-content.open { display:block; }

.wizard-actions { display:flex; align-items:center; justify-content:space-between; padding:16px 22px; border-top:1px solid var(--line); background:#fbfcfe; border-radius:0 0 var(--radius) var(--radius); }

.dataset-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.dataset-card { border:1px solid var(--line); border-radius:12px; padding:17px; background:#fff; transition:border-color .2s, box-shadow .2s; }
.dataset-card:hover { border-color:#bfdbfe; box-shadow:var(--shadow); }
.dataset-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.file-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:10px; background:#eff6ff; color:#2563eb; }
.file-icon svg { width:20px; height:20px; }
.dataset-name { margin-top:12px; font-weight:650; }
.dataset-desc { color:var(--muted); font-size:12px; min-height:38px; margin-top:5px; }
.dataset-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding-top:13px; margin-top:13px; border-top:1px solid #edf1f6; }
.mini-label { color:var(--muted); font-size:10px; }
.mini-value { font-size:12px; font-weight:600; margin-top:2px; }
.quality { display:flex; align-items:center; gap:5px; color:#15803d; }

.detail-hero { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:18px; margin-bottom:18px; }
.task-summary { padding:22px; }
.task-id { color:var(--muted); font-size:12px; margin-top:5px; }
.big-progress { margin-top:22px; }
.big-progress .progress-track { height:10px; }
.big-progress-head { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:9px; }
.big-progress-value { font-size:26px; font-weight:700; color:var(--primary); }
.timeline { padding:18px; }
.timeline-item { position:relative; display:flex; gap:11px; padding-bottom:17px; }
.timeline-item:last-child { padding-bottom:0; }
.timeline-item:not(:last-child)::after { content:""; position:absolute; left:7px; top:18px; bottom:2px; width:1px; background:#dbe3ed; }
.timeline-dot { width:15px; height:15px; border-radius:50%; border:4px solid #dbeafe; background:#2563eb; flex:0 0 auto; margin-top:2px; z-index:1; }
.timeline-dot.muted { background:#cbd5e1; border-color:#f1f5f9; }
.timeline-title { font-size:12px; font-weight:600; }
.timeline-time { color:var(--muted); font-size:11px; margin-top:2px; }

.chart-card { padding:18px; }
.chart-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.chart-legend { display:flex; gap:14px; color:var(--muted); font-size:11px; }
.legend-item { display:flex; align-items:center; gap:5px; }
.legend-line { width:14px; height:3px; border-radius:2px; background:#2563eb; }
.legend-line.alt { background:#8b5cf6; }
.chart { width:100%; height:250px; display:block; }
.chart-grid { stroke:#e8edf4; stroke-width:1; }
.chart-label { fill:#94a3b8; font-size:10px; }
.chart-primary { fill:none; stroke:#2563eb; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.chart-secondary { fill:none; stroke:#8b5cf6; stroke-width:2.5; stroke-dasharray:6 5; stroke-linecap:round; stroke-linejoin:round; }
.chart-area { fill:url(#areaGradient); opacity:.16; }

.config-list { display:grid; grid-template-columns:repeat(2,1fr); gap:0 22px; }
.config-item { display:flex; justify-content:space-between; gap:15px; padding:11px 0; border-bottom:1px solid #edf1f6; }
.config-key { color:var(--muted); }
.config-value { text-align:right; font-weight:550; }

.eval-hero { display:grid; grid-template-columns:1fr 70px 1fr; gap:16px; align-items:stretch; }
.compare-card { border:1px solid var(--line); border-radius:13px; padding:19px; background:#fff; }
.compare-card.highlight { border-color:#93c5fd; box-shadow:0 0 0 3px #eff6ff; }
.compare-label { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.score { font-size:34px; line-height:1; font-weight:720; margin:19px 0 6px; }
.score small { font-size:14px; color:var(--muted); font-weight:500; }
.vs { display:grid; place-items:center; color:#94a3b8; font-size:12px; font-weight:700; }
.vs span { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:#eef2f7; }

.improvement { display:inline-flex; align-items:center; gap:4px; color:#15803d; background:#ecfdf3; padding:4px 8px; border-radius:999px; font-size:11px; font-weight:600; }
.sample-box { border:1px solid var(--line); border-radius:11px; overflow:hidden; }
.sample-prompt { padding:13px 15px; background:#f8fafc; border-bottom:1px solid var(--line); font-weight:570; }
.sample-answers { display:grid; grid-template-columns:1fr 1fr; }
.sample-answer { padding:15px; min-height:132px; }
.sample-answer + .sample-answer { border-left:1px solid var(--line); background:#fbfdff; }
.answer-label { color:var(--muted); font-size:11px; font-weight:600; margin-bottom:7px; }
.answer-text { font-size:13px; color:#334155; }

.model-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.artifact-card { border:1px solid var(--line); border-radius:13px; background:#fff; padding:18px; transition:border-color .2s, box-shadow .2s; }
.artifact-card:hover { border-color:#bfdbfe; box-shadow:var(--shadow); }
.artifact-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.artifact-title { display:flex; align-items:center; gap:11px; }
.artifact-actions { display:flex; gap:8px; margin-top:17px; }
.artifact-actions .btn { flex:1; }
.tag-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.tag { padding:3px 7px; border-radius:6px; color:#475569; background:#f1f5f9; font-size:10px; }
.artifact-info { display:grid; grid-template-columns:repeat(2,1fr); gap:11px; margin-top:15px; }

.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; background:rgba(15,23,42,.44); backdrop-filter:blur(3px); }
.modal { width:min(560px,100%); max-height:calc(100vh - 40px); overflow:auto; border-radius:15px; background:#fff; box-shadow:0 24px 70px rgba(15,23,42,.22); }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:17px 20px; border-bottom:1px solid var(--line); }
.modal-title { font-size:16px; font-weight:650; }
.modal-body { padding:20px; }
.modal-actions { display:flex; justify-content:flex-end; gap:9px; padding:14px 20px; border-top:1px solid var(--line); background:#fbfcfe; }
.upload-zone { border:1.5px dashed #93c5fd; border-radius:12px; padding:28px; text-align:center; background:#f8fbff; cursor:pointer; transition:background-color .2s,border-color .2s; }
.upload-zone:hover { background:#eff6ff; border-color:#60a5fa; }
.upload-zone svg { width:32px; height:32px; color:#2563eb; }
.upload-title { font-weight:620; margin-top:9px; }
.upload-hint { color:var(--muted); font-size:11px; margin-top:5px; }

.empty { padding:54px 20px; text-align:center; color:var(--muted); }
.empty svg { width:38px; height:38px; color:#94a3b8; margin-bottom:10px; }
.pagination { display:flex; align-items:center; justify-content:space-between; padding:13px 16px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.page-buttons { display:flex; gap:5px; }
.page-button { width:30px; height:30px; border-radius:7px; border:1px solid var(--line); background:#fff; color:var(--muted-strong); }
.page-button.active { background:var(--primary); color:#fff; border-color:var(--primary); }

.toast { position:fixed; right:24px; bottom:24px; z-index:200; max-width:380px; padding:12px 16px; border-radius:10px; color:#fff; background:#0f172a; box-shadow:0 15px 40px rgba(15,23,42,.2); transform:translateY(24px); opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; }
.toast.show { opacity:1; transform:translateY(0); }

.api-tabs { display:flex; gap:4px; margin:-2px 0 18px; padding:4px; border:1px solid var(--line); border-radius:11px; background:#f8fafc; width:max-content; max-width:100%; overflow-x:auto; }
.api-tab { flex:none; padding:8px 15px; border:0; border-radius:8px; color:#64748b; background:transparent; font-size:12px; font-weight:600; cursor:pointer; }
.api-tab:hover { color:#1e40af; background:#eff6ff; }
.api-tab.active { color:#1d4ed8; background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.08); }
.api-live { align-items:center; margin-bottom:18px; }
.api-live .live-dot { flex:none; width:10px; height:10px; }
.stat-unit { font-size:15px; color:var(--muted); font-weight:600; }
.api-chart { display:block; width:100%; height:auto; min-height:230px; }
.api-ranking { display:flex; align-items:center; gap:12px; padding:11px 0; }
.api-ranking + .api-ranking { border-top:1px solid #edf1f6; }
.rank-index { display:grid; place-items:center; flex:none; width:26px; height:26px; border-radius:7px; background:#eff6ff; color:#2563eb; font-weight:700; font-size:11px; }
.rank-main { flex:1; min-width:0; }
.rank-head { display:flex; justify-content:space-between; gap:12px; margin-bottom:7px; font-size:12px; }
.rank-head span { color:var(--muted); }
.masked-key, .model-alias, .request-id { display:inline-block; padding:4px 7px; border:1px solid #dbe4ef; border-radius:6px; color:#334155; background:#f8fafc; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; }
.model-alias { color:#1d4ed8; background:#eff6ff; border-color:#bfdbfe; }
.request-id { padding:2px 5px; }
.api-quota { width:120px; }
.route-flow { display:flex; align-items:center; justify-content:center; gap:13px; min-height:85px; }
.route-flow span { padding:10px 13px; border:1px solid #bfdbfe; border-radius:9px; color:#1e40af; background:#eff6ff; font-weight:600; text-align:center; }
.route-flow b { display:flex; width:20px; color:#64748b; }
.route-flow b svg { width:20px; }
.feature-check { display:flex; align-items:center; gap:9px; padding:8px 0; color:#334155; }
.feature-check svg { width:18px; height:18px; color:#16a34a; }
.api-doc-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:18px; align-items:start; }
.api-doc-nav { position:sticky; top:82px; }
.api-doc-nav .panel-body { padding:12px; }
.api-doc-nav a { display:block; padding:8px 10px; border-radius:7px; color:#475569; text-decoration:none; font-size:12px; }
.api-doc-nav a:hover { color:#1d4ed8; background:#eff6ff; }
.api-doc-label { margin:7px 10px 4px; color:#94a3b8; font-size:10px; font-weight:700; letter-spacing:.08em; }
.api-doc-label:not(:first-child) { margin-top:17px; }
.api-doc-content .panel-body { padding:28px 32px; }
.api-doc-content section { scroll-margin-top:88px; }
.api-doc-content section + section { margin-top:30px; padding-top:28px; border-top:1px solid var(--line); }
.api-doc-content h2 { margin:0 0 9px; font-size:17px; }
.api-doc-content p { margin:0 0 14px; color:#64748b; line-height:1.75; }
.endpoint-box { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 14px; border:1px solid #bfdbfe; border-radius:10px; background:#f8fbff; }
.endpoint-box div { display:flex; flex-direction:column; gap:5px; min-width:0; }
.endpoint-box span { color:#64748b; font-size:10px; }
.endpoint-box code { color:#1d4ed8; overflow-wrap:anywhere; }
.code-card { overflow:hidden; border:1px solid #1e293b; border-radius:10px; background:#0f172a; }
.code-head { display:flex; justify-content:space-between; align-items:center; padding:9px 13px; border-bottom:1px solid #334155; color:#94a3b8; font-size:11px; }
.code-head button { border:0; color:#cbd5e1; background:transparent; cursor:pointer; }
.code-head button:hover { color:#fff; }
.code-card pre { margin:0; padding:17px; overflow:auto; color:#dbeafe; font:11px/1.75 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre; }
.doc-language-tabs { display:flex; gap:4px; margin-bottom:8px; }
.doc-language-tabs button { padding:6px 10px; border:0; border-radius:6px; color:#64748b; background:#f1f5f9; font-size:11px; cursor:pointer; }
.doc-language-tabs button.active { color:#fff; background:#2563eb; }
.doc-model-list { border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.doc-model-list div { display:grid; grid-template-columns:190px 1fr auto; gap:14px; align-items:center; padding:12px 14px; }
.doc-model-list div + div { border-top:1px solid var(--line); }
.doc-model-list code { color:#1d4ed8; }
.doc-model-list span { color:#475569; }
.doc-model-list b { color:#d97706; font-size:11px; }

.mobile-menu { display:none; }
.mobile-overlay { display:none; }

/* Unified two-level information architecture */
.global-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--global-header);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 8px rgba(15,23,42,.04);
}
.global-brand {
  width: 248px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.global-brand .brand-mark { width: 38px; height: 38px; }
.global-brand .brand-title { color: #0f172a; }
.global-brand .brand-subtitle { color: #64748b; }
.primary-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar { display:none; }
.primary-nav-item {
  position: relative;
  flex: none;
  min-width: 104px;
  padding: 0 15px;
  border: 0;
  color: #475569;
  background: transparent;
  font-weight: 600;
  transition: color .2s, background-color .2s;
}
.primary-nav-item::after {
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  bottom:0;
  height:3px;
  border-radius:3px 3px 0 0;
  background:transparent;
}
.primary-nav-item:hover { color: var(--primary); background:#f8fbff; }
.primary-nav-item.active { color: var(--primary-strong); }
.primary-nav-item.active::after { background:var(--primary); }
.global-tools { margin-left:auto; display:flex; align-items:center; gap:9px; min-width:0; }
.global-search {
  width: min(290px, 22vw);
  height: 38px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f8fafc;
  color:#94a3b8;
  transition:border-color .2s, background-color .2s, box-shadow .2s;
}
.global-search:focus-within { border-color:#93c5fd; background:#fff; box-shadow:0 0 0 3px #eff6ff; }
.global-search svg { width:17px; height:17px; flex:none; }
.global-search input { width:100%; min-width:0; border:0; outline:0; color:var(--text); background:transparent; font-size:12px; }
.global-search span { flex:none; padding:1px 5px; border:1px solid var(--line); border-radius:5px; color:#94a3b8; background:#fff; font-size:9px; }
.global-header .icon-button { position:relative; flex:none; }
.notification-dot { position:absolute; top:6px; right:6px; width:7px; height:7px; border-radius:50%; border:2px solid #fff; background:#ef4444; }

.sidebar {
  inset: var(--global-header) auto 0 0;
  color: #475569;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 6px rgba(15,23,42,.025);
}
.sidebar-module { padding:19px 20px 15px; border-bottom:1px solid #eef2f7; }
.sidebar-module span { display:block; color:#94a3b8; font-size:10px; font-weight:650; letter-spacing:.08em; }
.sidebar-module strong { display:block; margin-top:3px; color:#0f172a; font-size:16px; }
.nav-scroll { padding:14px 12px; }
.nav-label { color:#94a3b8; padding:0 11px 8px; }
.nav-item { color:#475569; }
.nav-item:hover { color:#1d4ed8; background:#eff6ff; }
.nav-item.active { color:#1e40af; background:#f1f5fb; box-shadow:none; font-weight:600; }
.nav-item.active::before { content:none; }
.nav-item.active svg { color:#3b5f91; }
.nav-subgroup { margin:14px 2px 7px; padding:11px 9px 0; border-top:1px solid #e8edf4; color:#94a3b8; font-size:10px; font-weight:650; letter-spacing:.06em; }
.sidebar-status { background:#f8fafc; border-color:#e2e8f0; }
.system-live { color:#334155; }
.system-caption { color:#64748b; line-height:1.45; }
.main { min-height:100vh; padding-top:var(--global-header); }
.topbar { top:var(--global-header); height:54px; padding:0 30px; }
.context-status { display:flex; align-items:center; gap:8px; color:#64748b; font-size:11px; }
.context-status .live-dot { width:6px; height:6px; }

.integration-shell { overflow:hidden; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:var(--shadow); }
.integration-toolbar { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:9px 14px; border-bottom:1px solid var(--line); background:#fbfcfe; }
.integration-toolbar > div { display:flex; align-items:center; gap:8px; min-width:0; }
.integration-toolbar strong { color:#334155; font-size:12px; }
.integration-toolbar span:not(.live-dot) { color:#64748b; font-size:11px; }
.integration-toolbar code { max-width:42%; overflow:hidden; text-overflow:ellipsis; color:#64748b; font-size:10px; white-space:nowrap; }
.system-frame { display:block; width:100%; height:calc(100vh - 240px); min-height:610px; border:0; background:#fff; }
.service-row { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:11px; padding:12px 0; }
.service-row + .service-row { border-top:1px solid #edf1f6; }
.service-icon { width:36px; height:36px; display:grid; place-items:center; border-radius:9px; color:#2563eb; background:#eff6ff; }
.service-icon svg { width:18px; height:18px; }
.service-row strong, .service-row span { display:block; }
.service-row span { margin-top:2px; color:#64748b; font-size:11px; }
.service-row b { color:#334155; font-size:12px; }
.integration-entry { width:100%; margin-top:15px; }
.recent-card { width:100%; border:1px solid var(--line); text-align:left; }
.template-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.template-card, .source-card { cursor:default; display:flex; flex-direction:column; gap:12px; }
.template-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; padding-top:12px; border-top:1px solid #edf1f6; }
.source-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.source-card .status { align-self:flex-start; margin-top:auto; }

.integration-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.integration-card { min-width:0; padding:18px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.integration-card-head { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:12px; }
.integration-card-head h2 { margin:0; color:#0f172a; font-size:15px; }
.integration-card-head p { margin:3px 0 0; color:#64748b; font-size:12px; }
.integration-logo { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border:1px solid #cbd8e8; border-radius:7px; color:#31577f; background:#f4f7fb; font-size:12px; font-weight:700; letter-spacing:.02em; }
.integration-logo.large { width:52px; height:52px; font-size:14px; }
.integration-meta { display:grid; grid-template-columns:140px minmax(0,1fr); margin:16px 0 0; border-top:1px solid #edf1f6; border-bottom:1px solid #edf1f6; }
.integration-meta > div { padding:11px 0; }
.integration-meta > div + div { padding-left:16px; border-left:1px solid #edf1f6; }
.integration-meta dt { color:#94a3b8; font-size:10px; }
.integration-meta dd { margin:4px 0 0; color:#334155; font-size:12px; font-weight:600; }
.integration-note { min-height:44px; margin:14px 0; color:#64748b; font-size:12px; line-height:1.65; }
.integration-actions { display:flex; justify-content:flex-end; gap:8px; padding-top:14px; border-top:1px solid #edf1f6; }

.integration-entry-panel { padding:20px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.integration-entry-status { display:flex; align-items:center; gap:13px; padding-bottom:18px; border-bottom:1px solid #edf1f6; }
.integration-entry-status .status { margin-left:auto; }
.entry-title { color:#0f172a; font-size:18px; font-weight:650; }
.entry-role { margin-top:3px; color:#64748b; font-size:12px; }
.entry-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; padding-top:18px; }
.entry-grid > div { min-width:0; padding:0 16px; }
.entry-grid > div:first-child { padding-left:0; }
.entry-grid > div + div { border-left:1px solid #edf1f6; }
.entry-grid span { display:block; color:#94a3b8; font-size:10px; }
.entry-grid strong { display:block; margin-top:6px; color:#334155; font-size:12px; line-height:1.45; }
.integration-detail-copy { margin:0 0 16px; color:#475569; font-size:13px; line-height:1.75; }
.entry-config-list { grid-template-columns:1fr; }
.entry-config-list .config-item { align-items:flex-start; }
.entry-config-list .config-key { flex:0 0 58px; }
.entry-config-list .config-value { text-align:left; line-height:1.55; }
.integration-warning { border-color:#d7e0eb; background:#f8fafc; }
.integration-warning > svg { color:#496783; }
.identity-readiness { align-items:center; }
.identity-readiness .status, .integration-warning .status { margin-left:auto; flex:none; }

.mode-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.mode-card { padding:16px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.mode-card h3 { margin:13px 0 6px; color:#1e293b; font-size:14px; }
.mode-card p { margin:0; color:#64748b; font-size:12px; line-height:1.65; }
.mode-badge { display:inline-flex; align-items:center; min-height:23px; padding:3px 7px; border:1px solid transparent; border-radius:5px; font-size:10px; font-style:normal; font-weight:700; line-height:1.2; white-space:nowrap; }
.mode-a { color:#1f5f45; border-color:#b7ddca; background:#edf8f2; }
.mode-b { color:#285b92; border-color:#bfd3e8; background:#eef5fb; }
.mode-c { color:#865c18; border-color:#e5d0a6; background:#fbf6e9; }

.topology-panel { margin-top:18px; }
.topology-legend { display:flex; align-items:center; gap:14px; color:#64748b; font-size:10px; }
.topology-legend span { display:flex; align-items:center; gap:5px; }
.topology-legend i { width:7px; height:7px; border-radius:50%; background:#3f7f62; }
.topology-legend i.pending { background:#b8862f; }
.topology { max-width:1120px; margin:0 auto; }
.topology-row { display:grid; grid-template-columns:minmax(250px,1fr) 38px minmax(250px,1fr); align-items:center; gap:12px; }
.topology-node { padding:13px 15px; border:1px solid #c8d5e3; border-radius:7px; background:#f8fafc; text-align:center; }
.topology-node.pending { border-style:dashed; border-color:#d4bd8a; background:#fcfaf5; }
.topology-node span, .topology-node strong { display:block; }
.topology-node span { color:#7a8ba0; font-size:10px; }
.topology-node strong { margin-top:4px; color:#27364a; font-size:12px; }
.topology-arrow { display:flex; justify-content:center; color:#6b7f96; }
.topology-arrow svg { width:20px; }
.topology-down { padding:8px 0; color:#7b8ea5; text-align:center; font-size:17px; line-height:1; }
.topology-down.split { position:relative; }
.topology-down.split::before { content:""; position:absolute; left:12%; right:12%; bottom:1px; height:1px; background:#cfd9e5; }
.topology-hub { border:1px solid #9eb8d2; border-radius:8px; background:#f6f9fc; }
.topology-hub-title { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; border-bottom:1px solid #dce5ee; }
.topology-hub-title span { color:#1e3a5a; font-size:13px; font-weight:700; }
.topology-hub-title strong { color:#61768d; font-size:10px; }
.hub-capabilities { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.hub-capabilities > div { padding:12px 15px; text-align:center; }
.hub-capabilities > div + div { border-left:1px solid #dce5ee; }
.hub-capabilities span, .hub-capabilities b { display:block; }
.hub-capabilities span { color:#334155; font-size:11px; font-weight:650; }
.hub-capabilities b { margin-top:4px; color:#8a6b2d; font-size:9px; font-weight:600; }
.topology-systems { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding-top:9px; }
.system-node { display:grid; grid-template-columns:36px minmax(0,1fr) auto; align-items:center; gap:9px; padding:12px; border:1px solid #d5dee8; border-radius:7px; background:#fff; }
.system-node .integration-logo { width:36px; height:36px; }
.system-node strong, .system-node span { display:block; }
.system-node strong { color:#243449; font-size:12px; }
.system-node span { margin-top:2px; color:#7a8ba0; font-size:9px; }
.system-node-modes { display:flex; flex-direction:column; gap:4px; }
.system-node-modes .mode-badge { min-width:22px; min-height:19px; justify-content:center; padding:2px 4px; }

.integration-grid.detailed { padding:16px; }
.integration-mode-row { display:flex; flex-wrap:wrap; gap:7px; margin:14px 0; padding:11px 0; border-top:1px solid #edf1f6; border-bottom:1px solid #edf1f6; }
.integration-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.integration-facts > div { min-width:0; padding:8px 0; }
.integration-facts > div:nth-child(even) { padding-left:14px; border-left:1px solid #edf1f6; }
.integration-facts dt { color:#94a3b8; font-size:9px; }
.integration-facts dd { margin:4px 0 0; color:#475569; font-size:11px; line-height:1.5; }
.backend-todo { margin-top:12px; padding:10px 11px; border:1px solid #e1d6bc; border-radius:6px; color:#71571f; background:#fcfaf5; font-size:11px; line-height:1.55; }
.backend-todo strong { display:block; margin-bottom:3px; font-size:10px; }
.backend-todo.large { margin-top:0; margin-bottom:12px; font-size:12px; }

.capability-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:18px; }
.capability-card { position:relative; min-width:0; padding:15px 38px 15px 15px; border:1px solid var(--line); border-radius:8px; background:#fff; text-align:left; cursor:pointer; transition:border-color .2s, background-color .2s; }
.capability-card:hover { border-color:#b8cbe0; background:#f9fbfd; }
.capability-card > div { position:absolute; top:15px; right:13px; color:#6d8298; }
.capability-card > div svg { width:16px; }
.capability-card strong, .capability-card span, .capability-card em { display:block; }
.capability-card strong { color:#25364a; font-size:13px; }
.capability-card span { margin-top:5px; color:#65788d; font-size:11px; }
.capability-card em { margin-top:9px; color:#8a6b2d; font-size:9px; font-style:normal; font-weight:650; }

.identity-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.org-tree { color:#334155; }
.org-root { padding:11px 13px; border:1px solid #b9cada; border-radius:6px; background:#f5f8fb; font-size:12px; font-weight:700; text-align:center; }
.org-branches { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:22px; position:relative; }
.org-branches::before { content:""; position:absolute; top:-12px; left:25%; right:25%; height:1px; background:#cbd7e3; }
.org-branches > div { position:relative; padding:11px; border:1px solid #dde5ed; border-radius:6px; background:#fff; }
.org-branches > div::before { content:""; position:absolute; left:50%; top:-11px; width:1px; height:10px; background:#cbd7e3; }
.org-branches strong, .org-branches span { display:block; }
.org-branches strong { font-size:11px; }
.org-branches span { margin-top:4px; color:#7a8ba0; font-size:9px; line-height:1.45; }
.identity-config-list { display:grid; grid-template-columns:1fr; }
.identity-config-list > div { display:grid; grid-template-columns:92px minmax(0,1fr); gap:12px; padding:9px 0; border-bottom:1px solid #edf1f6; }
.identity-config-list > div:last-child { border-bottom:0; }
.identity-config-list span { color:#7b8ca0; font-size:10px; }
.identity-config-list strong { color:#34465b; font-size:11px; font-weight:600; line-height:1.5; }

.embedded-console-layer {
  position:fixed;
  top:68px;
  right:0;
  bottom:0;
  left:247px;
  z-index:80;
  display:flex;
  flex-direction:column;
  min-width:0;
  background:#f6f8fb;
  border-left:1px solid var(--line);
}
.embedded-console-toolbar {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:8px 18px;
  background:#fff;
  border-bottom:1px solid var(--line);
}
.embedded-console-toolbar > div:first-child { display:flex;align-items:baseline;gap:10px;min-width:0; }
.embedded-console-toolbar strong { color:var(--text);font-size:14px; }
.embedded-console-toolbar span { color:var(--muted);font-size:12px; }
.embedded-console-actions { display:flex;align-items:center;gap:10px; }
.embedded-console-body { position:relative;flex:1;min-height:0;background:#fff; }
.embedded-console-body iframe { display:block;width:100%;height:100%;border:0;background:#fff; }
.embedded-console-loading {
  position:absolute;
  inset:0;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--muted);
  background:#fff;
}
.embedded-console-loading svg { width:20px;height:20px;color:var(--primary); }

.integration-path { display:grid; grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr); align-items:center; gap:9px; }
.integration-path > div { padding:12px; border:1px solid #d7e1eb; border-radius:7px; background:#f9fbfd; text-align:center; }
.integration-path > div strong, .integration-path > div small { display:block; }
.integration-path > div strong { margin-top:8px; color:#2c3d52; font-size:11px; }
.integration-path > div small { margin-top:3px; color:#7b8ca0; font-size:9px; }
.integration-path > b { display:flex; justify-content:center; color:#6f849a; }
.integration-path > b svg { width:18px; }

/* Enterprise visual refinement: flat, restrained, data-dense */
:root { --radius:10px; --shadow:none; }
.app-shell, .main, .content, .primary-nav, .grid-2, .detail-hero, .panel, .table-wrap { min-width:0; }
.grid-2 > *, .detail-hero > * { min-width:0; }
.panel { max-width:100%; overflow:hidden; }
.table-wrap { max-width:100%; overflow-x:auto; }
.brand-mark { border-radius:8px; background:#2563eb; box-shadow:none; }
.global-header { box-shadow:none; }
.primary-nav { flex:1 1 auto; min-width:0; }
.primary-nav-item:hover { background:transparent; }
.primary-nav-item::after { height:2px; border-radius:0; }
.sidebar { box-shadow:none; }
.sidebar-status { border-radius:8px; }
.btn { border-radius:7px; box-shadow:none; }
.btn-primary, .btn-primary:hover { box-shadow:none; }
.stat-card, .panel, .integration-shell { box-shadow:none; }
.stat-icon, .model-logo, .file-icon, .quick-icon, .service-icon { border-radius:6px; }
.notice, .quick-card, .choice-card, .model-option, .dataset-card, .compare-card, .sample-box, .artifact-card, .integration-shell { border-radius:8px; }
.quick-card:hover, .dataset-card:hover, .artifact-card:hover { box-shadow:none; }
.choice-card.selected, .model-option.selected, .compare-card.highlight { box-shadow:none; }
.input, .select, .textarea, .global-search { border-radius:7px; }
.status { border-radius:6px; }
.progress-fill, .metric-bar > span { background:#3b82f6; }
.api-tab.active { box-shadow:none; }
.step.active .step-dot { box-shadow:none; }


@media (max-width: 1180px) {
  .global-header { gap:12px; padding:0 14px; }
  .global-brand { width:auto; }
  .global-brand .brand-subtitle { display:none; }
  .global-search { display:none; }
  .primary-nav-item { min-width:auto; padding:0 11px; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .quick-grid { grid-template-columns:repeat(2,1fr); }
  .dataset-grid, .model-list { grid-template-columns:repeat(2,1fr); }
  .choice-grid, .model-options { grid-template-columns:1fr 1fr; }
  .template-grid, .source-grid, .integration-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .entry-grid { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:18px; }
  .entry-grid > div:nth-child(3) { padding-left:0; border-left:0; }
  .topology-systems, .capability-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  :root { --sidebar: 232px; }
  .sidebar { top:var(--global-header); transform:translateX(-100%); transition:transform .25s ease; }
  .sidebar.open { transform:translateX(0); }
  .mobile-overlay.open { display:block; position:fixed; inset:0; z-index:35; background:rgba(15,23,42,.4); }
  .main { margin-left:0; }
  .mobile-menu { display:grid; }
  .global-header .user-meta { display:none; }
  .global-header .user-chip { padding-left:6px; }
  .topbar { padding:0 18px; }
  .content { padding:22px 18px 36px; }
  .grid-2, .detail-hero { grid-template-columns:1fr; }
  .eval-hero { grid-template-columns:1fr; }
  .vs { min-height:34px; }
  .form-grid { grid-template-columns:1fr; }
  .span-2 { grid-column:auto; }
  .api-doc-layout { grid-template-columns:1fr; }
  .api-doc-nav { position:static; }
  .api-doc-nav .panel-body { display:flex; flex-wrap:wrap; gap:4px; }
  .api-doc-label { display:none; }
  .mode-grid, .identity-grid { grid-template-columns:1fr; }
  .topology-row { grid-template-columns:1fr; }
  .topology-arrow { transform:rotate(90deg); }
}

@media (max-width: 640px) {
  :root { --global-header:106px; }
  .global-header { display:grid; grid-template-columns:38px minmax(0,1fr) 34px; grid-template-rows:52px 54px; gap:0 8px; padding:0 10px; }
  .global-brand { grid-column:1; grid-row:1; width:38px; }
  .global-brand > div:last-child { display:none; }
  .primary-nav { grid-column:1 / -1; grid-row:2; width:100%; min-width:0; overflow:hidden; border-top:1px solid #f1f5f9; }
  .primary-nav-item { flex:1 1 25%; min-width:0; padding:0 2px; font-size:11px; white-space:nowrap; }
  .primary-nav-item::after { left:8px; right:8px; }
  .global-tools .user-chip { display:none; }
  .global-tools { grid-column:3; grid-row:1; justify-self:end; margin-left:0; }
  .global-header .icon-button { width:34px; height:34px; }
  .user-meta, .crumb span:first-child { display:none; }
  .page-head { flex-direction:column; }
  .head-actions { width:100%; justify-content:flex-start; }
  .stats-grid, .quick-grid, .dataset-grid, .model-list, .choice-grid, .model-options { grid-template-columns:1fr; }
  .template-grid, .source-grid, .integration-grid, .entry-grid { grid-template-columns:1fr; }
  .entry-grid > div { padding:10px 0; border-left:0 !important; border-top:1px solid #edf1f6; }
  .integration-card-head { grid-template-columns:42px minmax(0,1fr); }
  .integration-card-head .status { grid-column:2; justify-self:start; }
  .topology-systems, .capability-grid, .hub-capabilities { grid-template-columns:1fr; }
  .hub-capabilities > div + div { border-left:0; border-top:1px solid #dce5ee; }
  .topology-hub-title { align-items:flex-start; flex-direction:column; }
  .integration-facts, .org-branches { grid-template-columns:1fr; }
  .integration-facts > div:nth-child(even) { padding-left:0; border-left:0; }
  .integration-path { grid-template-columns:1fr; }
  .integration-path > b { transform:rotate(90deg); }
  .steps { gap:4px; }
  .step-text { display:none; }
  .step:not(:last-child)::after { left:32px; right:-4px; }
  .step { justify-content:center; }
  .search-box { min-width:100%; }
  .toolbar-left, .toolbar-right { width:100%; }
  .toolbar-right .btn { flex:1; }
  .sample-answers { grid-template-columns:1fr; }
  .sample-answer + .sample-answer { border-left:0; border-top:1px solid var(--line); }
  .config-list { grid-template-columns:1fr; }
  .metric-row { grid-template-columns:110px minmax(0,1fr) 42px; }
  .api-tabs { width:100%; }
  .api-tab { padding:8px 11px; }
  .route-flow { flex-direction:column; }
  .route-flow b { transform:rotate(90deg); }
  .api-doc-content .panel-body { padding:20px 16px; }
  .doc-model-list div { grid-template-columns:1fr; gap:5px; }
  .endpoint-box { align-items:flex-start; flex-direction:column; }
  .topbar { height:60px; }
  .content { padding:18px 14px 30px; }
  .page-title { font-size:21px; }
  .context-status { display:none; }
  .integration-toolbar code, .integration-toolbar span:not(.live-dot) { display:none; }
  .system-frame { min-height:560px; height:calc(100vh - 205px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; }
}
