:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #fff;
  --text: #172126;
  --muted: #64737b;
  --border: #dfe6e8;
  --accent: #087f78;
  --accent-soft: #e5f4f2;
  --success: #168253;
  --warning: #b66a08;
  --danger: #be3a41;
  --shadow: 0 8px 24px rgba(23, 33, 38, .06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: 0 0 232px; display: flex; flex-direction: column; background: #102f31; color: #e9f4f2; padding: 22px 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 9px 26px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #38b9aa; color: #083b38; font-weight: 800; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand span { color: #9fc4c1; font-size: 11px; margin-top: 4px; }
.sidebar-section-label { padding: 0 10px 8px; color: #77a6a2; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.nav-list { display: grid; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px; background: transparent; color: #bed4d2; text-align: left; padding: 11px 11px; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: #1c5a58; color: #fff; box-shadow: inset 3px 0 #56d4c2; }
.nav-icon { width: 18px; text-align: center; opacity: .9; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.13); padding: 15px 10px 0; color: #9fc4c1; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sidebar-footer small { display: block; flex-basis: 100%; color: #6e9591; margin-top: 4px; }
.main-content { flex: 1; min-width: 0; }
.topbar { height: 64px; background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.breadcrumbs strong { color: var(--text); }
.crumb-separator { color: #aeb9bc; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.env-pill { color: var(--muted); font-size: 12px; display: flex; gap: 7px; align-items: center; }
.page { max-width: 1440px; margin: 0 auto; padding: 30px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.02em; }
.page-heading p { margin: 0; color: var(--muted); }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 9px 14px; color: #fff; background: var(--accent); font-weight: 650; transition: .15s ease; }
.button:hover { filter: brightness(.94); transform: translateY(-1px); }
.button.secondary { color: var(--text); background: var(--panel); border-color: var(--border); }
.button.danger { background: var(--danger); }
.button.small { padding: 6px 10px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; filter: none; }
.icon-button { border: 0; background: transparent; color: var(--text); font-size: 20px; padding: 5px; }
.mobile-only { display: none; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.stat-card { padding: 18px; }
.stat-card .label { color: var(--muted); font-size: 12px; }
.stat-card .value { font-size: 28px; font-weight: 750; margin: 8px 0 4px; }
.stat-card .hint { font-size: 12px; color: var(--muted); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 15px; margin: 0; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 660px; }
th, td { padding: 13px 18px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; background: #fafcfc; }
tr:last-child td { border-bottom: 0; }
.primary-text { font-weight: 650; }
.secondary-text { color: var(--muted); font-size: 12px; margin-top: 4px; }
.badge { display: inline-flex; gap: 5px; align-items: center; border-radius: 999px; font-size: 12px; padding: 4px 9px; white-space: nowrap; }
.badge.ok { color: var(--success); background: #e8f7ee; }
.badge.warning { color: var(--warning); background: #fff4df; }
.badge.danger { color: var(--danger); background: #fdebed; }
.badge.neutral { color: var(--muted); background: #edf1f2; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.status-dot.ok { color: #36bd7c; }
.status-dot.warning { color: #d99125; }
.status-dot.danger { color: #db5960; }
.status-dot.neutral { color: #87979c; }
.filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); }
.input, .select { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 7px; padding: 8px 10px; min-height: 36px; }
.form-field { display: grid; gap: 6px; color: var(--text); font-size: 13px; }
.form-field > span:first-child { color: var(--muted); font-size: 12px; font-weight: 600; }
.form-field .input, .form-field .select { width: 100%; box-sizing: border-box; }
.form-help { color: var(--muted); font-size: 11px; line-height: 1.4; }
.form-error { border: 1px solid #efb8bf; border-left: 4px solid var(--danger); border-radius: 7px; padding: 9px 11px; color: #9a3039; background: #fff1f2; font-size: 12px; }
textarea.input { resize: vertical; font: inherit; }
.input:focus, .select:focus { outline: 2px solid #8ad8d0; outline-offset: 1px; }
.notice { border: 1px solid #bce5df; border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 14px; color: #256660; background: var(--accent-soft); font-size: 13px; margin-bottom: 18px; }
.notice.warning { border-color: #f0d6a6; border-left-color: var(--warning); background: #fff8e9; color: #815314; }
.stack { display: grid; gap: 12px; }
.check-row, .info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.check-row:last-child, .info-row:last-child { border-bottom: 0; }
.check-row .label, .info-row .label { color: var(--muted); font-size: 12px; }
.check-row .value, .info-row .value { text-align: right; font-weight: 600; }
.readonly-label { color: var(--success); font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f1f4f4; color: #315257; border-radius: 4px; padding: 3px 6px; overflow-wrap: anywhere; }
.progress { height: 7px; background: #e9eeee; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s ease; }
.model-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.provider-card { padding: 18px; }
.provider-card h3 { margin: 0 0 3px; font-size: 15px; }
.provider-card p { color: var(--muted); font-size: 12px; margin: 0 0 18px; }
.model-item { display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(4, minmax(90px, .65fr)) auto; gap: 13px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.model-item:last-child { border-bottom: 0; }
.model-head { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.model-meta { color: var(--muted); font-size: 12px; }
.model-capability { display: flex; flex-wrap: wrap; gap: 4px; }
.capability { color: #40666a; background: #edf7f6; border-radius: 4px; padding: 3px 5px; font-size: 11px; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 6px; }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 20px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline-item::before { content: ""; position: absolute; top: 13px; bottom: -3px; left: 6px; border-left: 1px solid var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 13px; height: 13px; margin-top: 3px; border-radius: 50%; border: 3px solid #b9e7df; background: var(--accent); z-index: 1; }
.timeline-item p { margin: 0; font-weight: 600; }
.timeline-item small { display: block; color: var(--muted); margin-top: 4px; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: grid; gap: 8px; max-width: 360px; }
.toast { background: #173436; color: #fff; border-radius: 8px; padding: 11px 14px; box-shadow: var(--shadow); animation: toast-in .2s ease; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(13, 34, 36, .45); padding: 20px; }
.modal { width: min(620px, 100%); max-height: min(720px, 90vh); overflow: auto; background: #fff; border-radius: 11px; box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.modal-header, .modal-body, .modal-footer { padding: 16px 20px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-body { line-height: 1.65; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.section-gap { height: 18px; }
.login-card { max-width: 520px; }
.json-detail { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; font-size: 12px; }
.secret-value { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.heading-actions .button + .button, td .button + .button { margin-left: 6px; }
[hidden] { display: none !important; }
@media (max-width: 1050px) {
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-grid { grid-template-columns: 1fr; }
  .model-item { min-width: 720px; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; width: 232px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(0,0,0,.12); }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-block; }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar-actions .button { display: none; }
  .topbar-actions #account-button { display: inline-block; white-space: nowrap; padding: 7px 10px; }
  .page { padding: 22px 16px; }
  .page-heading { display: block; }
  .heading-actions { justify-content: flex-start; margin-top: 14px; }
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 23px; }
  .grid.two { grid-template-columns: 1fr; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; }
  .filters .input, .filters .select { flex: 1; min-width: 130px; }
  .pagination { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 430px) {
  .grid.stats { grid-template-columns: 1fr 1fr; }
  .page-heading h1 { font-size: 21px; }
  .breadcrumbs span:first-child, .crumb-separator { display: none; }
  .env-pill { display: none; }
  .card-body { padding: 14px; }
}
