:root {
  --brand: #2563EB;
  --brand-deep: #123B80;
  --brand-soft: #EAF2FF;
  --page: #F0F5FC;
  --surface: #FFFFFF;
  --surface-alt: #F7FAFF;
  --text: #0F172A;
  --muted: #64748B;
  --line: #DDE7F3;
  --success: #16A34A;
  --success-soft: #ECFDF3;
  --warning: #F59E0B;
  --warning-soft: #FFF8E7;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --info: #0EA5A4;
  --violet: #7C3AED;
  --shadow: 0 10px 28px rgba(30, 64, 175, 0.06);
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.04);
  --radius: 12px;
  --radius-sm: 9px;
  --sidebar: 232px;
  --topbar: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--page);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hash { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; word-break: break-all; color: #475569; }
.hash-short { font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; color: #64748B; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 10px 16px;
  border-bottom: 1px solid #EAF1FA;
  color: var(--brand-deep);
}
.sidebar-brand img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.sidebar-brand .brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text strong { font-size: 15px; letter-spacing: -0.02em; color: #123B80; }
.brand-text small { margin-top: 2px; font-size: 10px; color: #7288A3; letter-spacing: 0.02em; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 10px 12px; scrollbar-width: thin; }
.nav-group { padding: 5px 0; }
.nav-group-title { display: block; padding: 0 12px 5px; color: #94A3B8; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 12px;
  margin: 1px 0;
  border-radius: 9px;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-item:hover { background: #F1F6FE; color: var(--brand); }
.nav-item.active { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22); }
.nav-item.active .icon { color: #fff; }
.nav-item .icon { color: #5B7BA6; flex: 0 0 auto; }
.nav-item em { margin-left: auto; color: #94A3B8; font-size: 10px; font-style: normal; }
.nav-item.active em { color: #DBEAFE; }
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E7EEF9;
  color: #2563EB;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
}
.nav-badge-danger { background: #FEE2E2; color: #B91C1C; }
.nav-badge-warning { background: #FEF3C7; color: #B45309; }
.nav-item.active .nav-badge { background: rgba(255,255,255,0.2); color: #fff; }
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-top: 1px solid #EAF1FA;
  color: #7C8DA6;
  font-size: 11px;
}
.env-dot { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34,197,94,0.12); flex: 0 0 auto; }

.app-main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.breadcrumb { display: flex; align-items: center; gap: 8px; color: #64748B; font-size: 12.5px; white-space: nowrap; }
.breadcrumb .sep { color: #CBD5E1; }
.breadcrumb strong { color: #1E293B; font-weight: 600; }
.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(390px, 30vw);
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #F8FAFD;
  color: #94A3B8;
}
.global-search:focus-within { border-color: #93C5FD; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #D7EBDD;
  border-radius: 999px;
  background: #F6FCF8;
  color: #3F6B4D;
  font-size: 11.5px;
  white-space: nowrap;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748B;
}
.icon-button:hover { background: #F1F6FE; color: var(--brand); border-color: #E2ECFA; }
.notification { position: relative; }
.notification-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 8px; padding-left: 6px; }
.avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
  color: #1D4ED8;
  font-size: 13px;
  font-weight: 700;
}
.user-copy { display: flex; flex-direction: column; line-height: 1.25; }
.user-copy strong { font-size: 12px; color: #1E293B; }
.user-copy small { font-size: 10px; color: #94A3B8; }
.logout-form { margin: 0; }
.menu-toggle { display: none; }

.page-content { padding: 22px 24px 44px; max-width: 1920px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-header h1 { margin-top: 2px; font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; color: #0B1F44; }
.page-header p { margin-top: 4px; color: var(--muted); font-size: 13px; max-width: 820px; }
.eyebrow { display: inline-block; color: #2563EB; font-size: 10.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; padding-top: 4px; }
.page-actions form { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px; color: #64748B; font-size: 12px; }
.back-link .icon { transform: rotate(180deg); }
.back-link:hover { color: var(--brand); }
.version-chip { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: #EAF2FF; color: #2563EB; font-size: 12px; vertical-align: middle; }

.hero {
  position: relative;
  min-height: 196px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #D9E8FA;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(240,248,255,0.98) 0%, rgba(239,247,255,0.92) 42%, rgba(231,243,255,0.18) 100%),
    url('/static/brand/banner.png') right center / cover no-repeat;
  box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { margin: 5px 0 6px; color: #0B2A5B; font-size: 29px; letter-spacing: -0.025em; }
.hero p { color: #46617F; font-size: 14px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; }
.hero-meta { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: #547399; font-size: 11.5px; }
.hero-meta-item { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(147,197,253,0.5); border-radius: 999px; background: rgba(255,255,255,0.62); backdrop-filter: blur(8px); }

.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 116px;
  padding: 17px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: #BFD8F5; box-shadow: var(--shadow); }
.metric-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto; }
.metric-copy { display: flex; flex-direction: column; min-width: 0; }
.metric-label { color: #5E7391; font-size: 12px; }
.metric-value { margin: 3px 0 2px; color: #0B1F44; font-size: 28px; line-height: 1.18; font-weight: 700; letter-spacing: -0.03em; white-space: nowrap; }
.metric-value em { font-size: 14px; font-style: normal; font-weight: 600; color: #64748B; }
.metric-detail { color: #8A9AB0; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tone-blue .metric-icon { background: #EAF2FF; color: #2563EB; }
.tone-teal .metric-icon { background: #E7FAF9; color: #0EA5A4; }
.tone-green .metric-icon { background: #ECFDF3; color: #16A34A; }
.tone-orange .metric-icon { background: #FFF6E5; color: #D97706; }
.tone-violet .metric-icon { background: #F1ECFF; color: #7C3AED; }

.panel {
  min-width: 0;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; color: #142B52; font-size: 15px; font-weight: 650; }
.panel-head h2 .icon { color: #2563EB; }
.panel-head p { margin-top: 3px; color: #8A9AB0; font-size: 11.5px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; color: #2563EB; font-size: 11.5px; white-space: nowrap; }
.panel-link:hover { color: #1D4ED8; text-decoration: underline; }
.content-grid { display: grid; gap: 16px; }
.content-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.content-grid.two-one { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }

.pipeline { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 6px; }
.pipeline-step {
  flex: 1 0 142px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 142px;
  padding: 11px 12px;
  border: 1px solid #E1EAF6;
  border-radius: 10px;
  background: #F8FBFF;
  color: #284364;
}
.pipeline-step:hover { border-color: #BFD7F5; background: #F1F7FF; }
.pipeline-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #EAF2FF; color: #2563EB; flex: 0 0 auto; }
.pipeline-body { display: flex; flex-direction: column; min-width: 0; }
.pipeline-body strong { font-size: 12.5px; color: #17335B; }
.pipeline-body span { font-size: 10.5px; color: #7A8FA8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipeline-step.tone-success .pipeline-icon { background: #ECFDF3; color: #16A34A; }
.pipeline-step.tone-danger .pipeline-icon { background: #FEF2F2; color: #DC2626; }
.pipeline-step.tone-warning .pipeline-icon { background: #FFF7E8; color: #D97706; }
.pipeline-step.tone-info .pipeline-icon { background: #E7FAF9; color: #0EA5A4; }
.pipeline-arrow { display: grid; place-items: center; width: 24px; color: #A9BDD5; flex: 0 0 24px; }

.metric-card, .panel, .hero, .summary-strip, .asset-card { animation: rise 0.32s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap.wide table { min-width: 880px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  padding: 9px 10px;
  border-bottom: 1px solid #E6EEF8;
  background: #F8FAFD;
  color: #71839A;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
}
.data-table td { padding: 11px 10px; border-bottom: 1px solid #EFF4FA; color: #33485F; vertical-align: middle; }
.data-table tbody tr { transition: background 0.14s ease; }
.data-table tbody tr:hover { background: #F8FBFF; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td small { display: block; margin-top: 2px; color: #8A9AB0; font-size: 10.5px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-link { color: #1D4ED8; font-weight: 600; }
.table-link:hover { text-decoration: underline; }
.row-action { display: inline-flex; align-items: center; gap: 4px; color: #2563EB; font-size: 11.5px; white-space: nowrap; }
.row-action .icon { transition: transform 0.16s ease; }
.row-action:hover .icon { transform: translateX(2px); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.status-success { color: #15803D; background: #EDFDF3; border-color: #C9F1D8; }
.status-warning { color: #B45309; background: #FFF8E8; border-color: #FBE3AE; }
.status-danger { color: #B91C1C; background: #FEF2F2; border-color: #FAD1D1; }
.status-info { color: #0F766E; background: #ECFDFA; border-color: #C4F1E9; }
.status-neutral { color: #52657D; background: #F4F7FB; border-color: #E1E8F2; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(37,99,235,0.20); }
.btn-primary:hover { background: #1D4ED8; }
.btn-ghost { background: #fff; border-color: #D8E5F5; color: #27507F; }
.btn-ghost:hover { background: #F4F9FF; border-color: #B9D4F2; color: #1D4ED8; }
.btn-sm { min-height: 28px; padding: 4px 10px; font-size: 11px; }
.text-btn { border: 0; background: transparent; color: var(--brand); font-size: 12px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 16px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #FAFCFF);
  box-shadow: var(--shadow-soft);
}
.summary-item { padding: 0 18px; border-right: 1px solid #EAF0F8; }
.summary-item:first-child { padding-left: 0; }
.summary-item:last-child { border-right: 0; }
.summary-item span { display: block; color: #7E90A7; font-size: 10.5px; }
.summary-item strong { display: block; margin: 4px 0 1px; color: #102A51; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.summary-item strong.mono { font-size: 14px; word-break: break-all; }
.summary-item small { color: #93A3B8; font-size: 10px; }

.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #EDF3FA; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.field.grow { flex: 1 1 190px; }
.field > span { color: #7A8DA5; font-size: 10.5px; font-weight: 600; }
.field input, .field select, .batch-form input, .batch-form select {
  height: 34px;
  padding: 6px 10px;
  border: 1px solid #D8E3F0;
  border-radius: 8px;
  background: #fff;
  color: #243B57;
  font-size: 12px;
  outline: 0;
}
.field input:focus, .field select:focus, .batch-form input:focus, .batch-form select:focus { border-color: #93C5FD; box-shadow: 0 0 0 3px rgba(37,99,235,0.08); }
.filter-bar .btn { margin-bottom: 0; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; color: #7E90A7; font-size: 11.5px; }
.pagination-actions { display: flex; gap: 8px; }

.panel-head + .empty-state, .empty-state { margin: 4px 0 2px; }
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 174px;
  padding: 24px;
  text-align: center;
  border: 1px dashed #D5E3F3;
  border-radius: 11px;
  background: #FAFCFF;
}
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 9px; border-radius: 14px; background: #EAF2FF; color: #3B82F6; }
.empty-state h3 { color: #294563; font-size: 14px; }
.empty-state p { max-width: 480px; margin: 4px 0 12px; color: #8495AA; font-size: 11.5px; }

.asset-list { display: flex; flex-direction: column; gap: 3px; }
.asset-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; color: #2D4664; }
.asset-row:hover { background: #F7FAFF; }
.asset-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #EAF2FF; color: #2563EB; flex: 0 0 auto; }
.asset-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.asset-copy strong { font-size: 12px; color: #1F3A5B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-copy small { color: #8A9AB0; font-size: 10.5px; }
.asset-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.asset-card:hover { border-color: #BFD8F5; box-shadow: var(--shadow); }
.asset-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #EAF2FF; color: #2563EB; flex: 0 0 auto; }
.asset-card-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.asset-card-copy strong { color: #17335B; font-size: 13px; }
.asset-card-copy small { color: #8194AB; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-card-meta { margin-top: 5px; color: #93A3B8; font-size: 10.5px; }
.asset-card-status { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.asset-card-status small { color: #93A3B8; font-size: 10px; }

.donut-wrap { display: flex; align-items: center; gap: 12px; min-height: 170px; }
.chart { width: 100%; }
.chart-donut { width: 48%; min-width: 130px; height: 168px; }
.chart-bars { height: 176px; }
.chart-lg { height: 290px; }
.legend-list { display: flex; flex-direction: column; gap: 8px; min-width: 110px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 7px; color: #5E7391; font-size: 11px; }
.legend-row strong { margin-left: auto; color: #1E3A5F; font-size: 12px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #94A3B8; }
.legend-dot.tone-success { background: #16A34A; }
.legend-dot.tone-warning { background: #F59E0B; }
.legend-dot.tone-danger { background: #DC2626; }
.legend-dot.tone-neutral { background: #94A3B8; }

.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.timeline li { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #EFF4FA; }
.timeline li:last-child { border-bottom: 0; }
.timeline-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #94A3B8; flex: 0 0 auto; }
.timeline-dot.status-approved { background: #16A34A; }
.timeline-dot.status-rejected { background: #DC2626; }
.timeline div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.timeline strong { color: #26415F; font-size: 11.5px; }
.timeline small { color: #8A9AB0; font-size: 10.5px; }
.timeline time { color: #93A3B8; font-size: 10px; white-space: nowrap; }

.api-strip-body { display: flex; gap: 20px; align-items: stretch; }
.api-endpoints { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.api-endpoint, .endpoint-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #EDF3FA; border-radius: 8px; background: #FBFDFF; font-size: 11.5px; color: #52657D; }
.api-endpoint code, .endpoint-row code { color: #1E3A5F; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.api-endpoint span:last-child { margin-left: auto; color: #8A9AB0; font-size: 10.5px; }
.method { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 2px 6px; border-radius: 5px; background: #EAF2FF; color: #1D4ED8; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9.5px; font-weight: 700; }
.api-note { display: flex; flex-direction: column; justify-content: center; min-width: 190px; padding: 14px 16px; border: 1px dashed #D5E3F3; border-radius: 10px; background: #FAFCFF; }
.api-note strong { color: #4B6280; font-size: 12px; }
.api-note span { margin-top: 3px; color: #8A9AB0; font-size: 10.5px; }

.meta-grid { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; margin: 0; }
.meta-grid dt { color: #8495AA; font-size: 11.5px; }
.meta-grid dd { margin: 0; color: #2D4664; font-size: 12px; word-break: break-word; }
.dimension-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.dimension-grid > div { padding: 9px 10px; border: 1px solid #EDF3FA; border-radius: 8px; background: #FBFDFF; }
.dimension-grid > div > span:first-child { display: block; margin-bottom: 5px; color: #7B8EA6; font-size: 10.5px; }
.dimension-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dimension-card { display: flex; flex-direction: column; gap: 7px; padding: 13px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-soft); }
.dimension-card > span { color: #7B8EA6; font-size: 10.5px; }
.rule-list { display: flex; flex-direction: column; gap: 6px; }
.rule-list.compact { margin-top: 10px; }
.rule-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #F0F4FA; border-radius: 7px; background: #FBFDFF; }
.rule-code { color: #52657D; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10.5px; }
.rule-message { color: #7B8EA6; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineage-grid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lineage-node { display: flex; flex-direction: column; gap: 5px; min-width: 132px; padding: 10px 11px; border: 1px solid #E4EDF8; border-radius: 9px; background: #FBFDFF; }
.lineage-node > span:first-child { color: #7B8EA6; font-size: 10.5px; }
.lineage-node small { color: #93A3B8; font-size: 10px; }
.lineage-arrow { color: #A9BDD5; }
.version-list { display: flex; flex-direction: column; gap: 5px; }
.version-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #EDF3FA; border-radius: 8px; background: #FBFDFF; color: #2D4664; }
.version-row:hover, .version-row.active { border-color: #BFD8F5; background: #F3F8FF; }
.version-row > span:first-child { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.version-row strong { font-size: 11.5px; }
.version-row small { color: #93A3B8; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice { display: flex; align-items: flex-start; gap: 7px; padding: 10px 12px; margin-top: 12px; border-radius: 8px; font-size: 11.5px; line-height: 1.5; }
.notice-warning { color: #8A5A10; background: #FFF9ED; border: 1px solid #FCE7B2; }
.notice-danger { color: #9F1D1D; background: #FFF5F5; border: 1px solid #FAD1D1; }
.notice-info { color: #265E7A; background: #F1FAFF; border: 1px solid #CDEAF8; }

.batch-form { display: flex; flex-direction: column; gap: 13px; }
.batch-form-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.batch-form .field { min-width: 160px; }
.batch-form .field.narrow { min-width: 100px; width: 100px; }
.batch-form .field.factor-code { min-width: 230px; }
.check-group { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; min-height: 34px; padding: 0; margin: 0; border: 0; }
.check-group legend { padding: 0 8px 0 0; color: #7A8DA5; font-size: 10.5px; font-weight: 600; float: none; }
.check-group label, .check-line { display: flex; align-items: center; gap: 5px; color: #425A76; font-size: 11.5px; white-space: nowrap; }
.check-group input, .check-line input { accent-color: var(--brand); }
.check-line { width: auto; }
.form-hint { margin-top: 10px; color: #8A9AB0; font-size: 10.5px; }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: #EDF3FA; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563EB, #0EA5A4); }
.progress-labels { display: flex; justify-content: space-between; margin-top: 8px; color: #93A3B8; font-size: 10px; }
.batch-items { display: flex; flex-direction: column; gap: 7px; }
.batch-item { border: 1px solid #E7EFF9; border-radius: 9px; background: #FCFDFF; overflow: hidden; }
.batch-item > summary { display: flex; align-items: center; gap: 12px; padding: 11px 12px; cursor: pointer; list-style: none; }
.batch-item > summary::-webkit-details-marker { display: none; }
.batch-item > summary:hover { background: #F7FAFF; }
.batch-item-scope { display: flex; flex-direction: column; min-width: 190px; }
.batch-item-scope strong { color: #244364; font-size: 12px; }
.batch-item-scope small { color: #8A9AB0; font-size: 10.5px; }
.batch-item-status, .batch-item-quality { min-width: 92px; }
.batch-item-count, .batch-item-time { color: #7E90A7; font-size: 11px; white-space: nowrap; }
.batch-item-time { margin-left: auto; }
.batch-item-body { padding: 0 12px 13px; border-top: 1px solid #EDF3FA; }
.batch-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
.batch-detail-grid > div { display: flex; flex-direction: column; gap: 3px; }
.batch-detail-grid span { color: #8A9AB0; font-size: 10.5px; }
.batch-detail-grid strong { color: #3B5471; font-size: 11.5px; }
.json-details { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.json-details > span { color: #8A9AB0; font-size: 10.5px; }
.json-details pre, .code-block { margin: 0; padding: 10px 12px; overflow-x: auto; border-radius: 8px; background: #0F172A; color: #D8E3F3; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10.5px; line-height: 1.55; }
.code-block { color: #D8E3F3; }
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-row { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid #EDF3FA; border-radius: 7px; color: #3B5471; font-size: 11.5px; }
.file-row:hover { background: #F7FAFF; border-color: #D5E3F3; }
.file-row small { margin-left: auto; color: #93A3B8; font-size: 10px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-card { margin-bottom: 0; }
.release-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.release-list { display: flex; flex-direction: column; gap: 0; }
.release-card { margin-bottom: 16px; }
.candidate-list { display: flex; flex-direction: column; gap: 7px; }
.candidate-row { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border: 1px solid #EDF3FA; border-radius: 8px; background: #FBFDFF; }
.candidate-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.candidate-main strong { color: #244364; font-size: 12px; }
.candidate-main span { color: #8A9AB0; font-size: 10.5px; }
.candidate-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.candidate-reasons { display: flex; gap: 5px; flex-wrap: wrap; max-width: 300px; justify-content: flex-end; }
.reason-chip { padding: 2px 6px; border-radius: 5px; background: #FFF8E8; color: #9A650D; font-size: 9.5px; }
.reason-ok { background: #EDFDF3; color: #15803D; }
.permission-chip { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #EAF2FF; color: #1D4ED8; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.endpoint-list { display: flex; flex-direction: column; gap: 5px; }
.endpoint-row span:last-child { margin-left: auto; color: #8A9AB0; font-size: 10.5px; }
.check-list { display: flex; flex-direction: column; gap: 9px; }
.check-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #EFF4FA; color: #52657D; font-size: 11.5px; }
.check-list > div:last-child { border-bottom: 0; }

.sidebar-scrim { display: none; }
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; padding: 40px 22px; text-align: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-soft); }
.error-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 14px; border-radius: 17px; background: #FFF7E8; color: #D97706; }
.error-page h1 { margin: 5px 0 5px; color: #102A51; font-size: 34px; }
.error-page p { color: #7C8DA3; font-size: 13px; }
.error-actions { display: flex; gap: 9px; margin-top: 20px; }
.confirm-dialog { width: min(420px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,0.22); color: var(--text); }
.confirm-dialog::backdrop { background: rgba(15,23,42,0.34); backdrop-filter: blur(2px); }
.confirm-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 10px; border-radius: 11px; background: #FFF7E8; color: #B45309; font-weight: 800; }
.confirm-title { font-size: 16px; color: #17335B; }
.confirm-message { margin: 6px 0 18px; color: #64748B; font-size: 12px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.global-loading { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(240,245,252,0.74); backdrop-filter: blur(2px); color: #355475; font-size: 13px; }
.global-loading[hidden] { display: none; }
.spinner { display: inline-flex; animation: spin 1s linear infinite; color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.severity { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 9.5px; font-weight: 700; }
.severity-blocking { background: #FEF2F2; color: #B91C1C; }
.severity-warning { background: #FFF8E8; color: #B45309; }
.severity-info { background: #EAF2FF; color: #1D4ED8; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 12% 10%, #E4F0FF 0, transparent 34%), radial-gradient(circle at 90% 90%, #E9FBF7 0, transparent 32%), #F0F5FC; }
.login-shell { display: grid; grid-template-columns: 1.05fr 0.95fr; width: min(1020px, 100%); min-height: 590px; overflow: hidden; border: 1px solid #D9E7F7; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(23, 53, 91, 0.14); }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 38px; background: linear-gradient(150deg, rgba(236,247,255,0.98), rgba(242,250,255,0.86)), url('/static/brand/banner.png') center / cover; }
.login-brand img { position: absolute; top: 30px; left: 38px; width: min(330px, 74%); height: auto; }
.login-brand h1 { color: #0B2A5B; font-size: 31px; line-height: 1.3; letter-spacing: -0.03em; }
.login-brand p { margin-top: 12px; color: #52708F; font-size: 13px; }
.login-features { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.login-features span { padding: 5px 9px; border: 1px solid rgba(147,197,253,0.55); border-radius: 999px; background: rgba(255,255,255,0.64); color: #315B82; font-size: 10.5px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 48px 54px; }
.login-card h2 { margin: 5px 0 6px; color: #102A51; font-size: 27px; }
.login-card > p { color: #7C8DA3; font-size: 12px; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.login-form .field { min-width: 0; }
.login-form .field > span { font-size: 11px; }
.login-form input { height: 42px; font-size: 13px; }
.login-submit { height: 42px; margin-top: 6px; }
.login-hint { margin-top: 22px; color: #9AA9BB; font-size: 10.5px; }
@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-brand { min-height: 230px; padding: 26px; }
  .login-brand img { position: static; width: 250px; margin-bottom: 40px; }
  .login-brand h1 { font-size: 23px; }
  .login-card { padding: 30px 26px 34px; }
}

@media (max-width: 1500px) {
  .metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dimension-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-search { width: min(300px, 26vw); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: 6px 0 24px rgba(15,23,42,0.10); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(15,23,42,0.28); backdrop-filter: blur(1px); }
  .app-main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .breadcrumb { display: none; }
  .topbar { padding: 0 14px; gap: 8px; }
  .global-search { width: auto; flex: 1; }
  .env-pill { display: none; }
  .content-grid.two, .content-grid.two-one, .content-grid.three { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(3) { padding-left: 0; }
  .summary-item:nth-child(3), .summary-item:nth-child(4) { border-top: 1px solid #EAF0F8; padding-top: 12px; }
  .page-content { padding: 18px 16px 36px; }
  .batch-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .asset-grid { grid-template-columns: 1fr; }
  .dimension-cards { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 23px; }
  .hero-meta { display: none; }
  .user-copy { display: none; }
  .topbar-actions { gap: 2px; }
  .candidate-row { flex-direction: column; align-items: flex-start; }
  .candidate-status { flex-direction: row; align-items: center; }
  .candidate-reasons { justify-content: flex-start; }
  .batch-item > summary { flex-wrap: wrap; }
  .batch-item-scope { min-width: 100%; }
  .batch-item-time { margin-left: 0; }
  .api-strip-body { flex-direction: column; }
  .lineage-arrow { display: none; }
}
@media (max-width: 460px) {
  .metric-grid, .summary-strip { grid-template-columns: 1fr; }
  .summary-item { border-right: 0; padding-left: 0; }
  .summary-item:nth-child(3), .summary-item:nth-child(4) { border-top: 1px solid #EAF0F8; }
}
