:root {
  --canvas: #f7f8fb; --surface: #fff; --ink: #202330; --muted: #636a7a;
  --line: #e5e7ee; --accent: #6744ac; --accent-strong: #4e2f8f; --accent-tint: #f1edf9;
  --success: #19724e; --success-tint: #edf8f1; --warning: #886117; --warning-tint: #fbf4e4;
  --danger: #ad343b; --danger-tint: #fff0f0; --radius: 12px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 100%; color: var(--ink); background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #9474cd; outline-offset: 3px; }
button:active:not(:disabled) { transform: translateY(1px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; }
h2 { font-size: 1.25rem; line-height: 1.4; font-weight: 700; }
h3 { font-size: 1rem; line-height: 1.5; font-weight: 700; }
p { line-height: 1.65; }
small, .meta { font-size: .875rem; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.initial-loading { min-height: 100vh; display: grid; place-content: center; gap: 20px; justify-items: center; }
.brand-mark { width: 40px; height: 40px; display: inline-grid; place-items: center; color: white; font-size: 1.5rem; font-weight: 700; background: #583b92; border-radius: 12px; flex-shrink: 0; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 28px 16px 20px; position: sticky; height: 100vh; top: 0; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; }
.brand > div { min-width: 0; }
.brand-name { font-size: 1.25rem; font-weight: 700; line-height: 1.5; }
.brand-caption { color: var(--muted); font-size: .875rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.nav-label { color: var(--muted); font-size: .875rem; padding: 32px 16px 12px; }
.navigation { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: transparent; color: #555d6d; height: 48px; padding: 0 16px; border-radius: 8px; }
.nav-item:hover { background: var(--canvas); color: var(--ink); }
.nav-item.selected { color: var(--accent-strong); background: var(--accent-tint); font-weight: 700; }
.icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.sidebar-bottom { margin-top: auto; padding: 24px 12px 0; }
.connection { display: flex; gap: 8px; align-items: center; font-size: .875rem; color: var(--muted); padding: 16px 0; border-top: 1px solid var(--line); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #8f79b5; flex-shrink: 0; }
.account { display: flex; gap: 12px; align-items: center; }
.account-name { flex: 1; min-width: 0; }
.account-name p { font-size: .875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 36px; height: 36px; background: #edeaf4; color: var(--accent-strong); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .875rem; font-weight: 700; }
.workspace { min-width: 0; }
.topbar { height: 72px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px; }
.breadcrumb { font-size: .875rem; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.crumb-current { color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; font-size: .875rem; line-height: 1.5; white-space: nowrap; }
.badge.gray { background: #f0f2f6; color: #5a6171; }
.badge.purple { background: var(--accent-tint); color: var(--accent-strong); }
.badge.green { background: var(--success-tint); color: var(--success); }
.badge.amber { background: var(--warning-tint); color: var(--warning); }
.badge.red { background: var(--danger-tint); color: var(--danger); }
main.content { padding: 40px; max-width: 1440px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 65ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #d9dce5; border-radius: 8px; background: white; color: var(--ink); font-weight: 600; white-space: nowrap; }
.btn:hover:not(:disabled) { background: #f7f8fb; border-color: #bfc3d0; }
.btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--danger); border-color: #e6b8bc; }
.btn.danger:hover { background: var(--danger-tint); }
.btn.text { border-color: transparent; color: var(--accent); background: transparent; }
.btn.text:hover { background: var(--accent-tint); }
.icon-button { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; }
.icon-button:hover { background: var(--canvas); color: var(--ink); }
.release-banner { padding: 20px 24px; border: 1px solid #dfd7ec; background: #faf8fd; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.release-banner p { margin-top: 4px; font-size: .875rem; color: var(--muted); }
.banner-title { display: flex; align-items: center; gap: 12px; }
.overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.panel { border: 1px solid var(--line); background: white; border-radius: var(--radius); overflow: hidden; }
.panel-head { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h2 + p { margin-top: 4px; }
.app-row { display: flex; gap: 16px; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.app-row:last-child { border-bottom: 0; }
.app-symbol { width: 48px; height: 48px; display: grid; place-items: center; background: #f1f2f7; border-radius: 12px; color: #596074; flex-shrink: 0; }
.app-symbol .icon { width: 24px; height: 24px; }
.app-details { flex: 1; min-width: 0; }
.app-details .meta { margin-top: 4px; }
.app-row .arrow { color: #8990a0; }
.steps { padding: 8px 24px 16px; }
.step { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; }
.step-number { font-variant-numeric: tabular-nums; color: var(--accent); font-size: .875rem; font-weight: 700; padding-top: 4px; }
.step p { font-size: .875rem; color: var(--muted); margin-top: 4px; }
.preview-note { padding: 20px 24px; background: #f7f8fb; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); line-height: 1.6; }
.section-gap { margin-top: 32px; }
.overview-foot { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .875rem; }
.overview-foot span { display: flex; gap: 8px; align-items: center; }
.toolbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 400px; }
.search .icon { position: absolute; top: 12px; left: 12px; color: #747b8a; }
.search input { padding-left: 40px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #d9dce5; background: white; color: var(--ink); border-radius: 8px; font-size: 1rem; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[readonly] { background: #f7f8fb; color: var(--muted); }
.toolbar select { width: 140px; }
.toolbar .record-count { font-size: .875rem; color: var(--muted); margin-left: auto; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; text-align: left; font-variant-numeric: tabular-nums; }
th { background: #fafbfc; font-size: .875rem; font-weight: 600; color: var(--muted); padding: 12px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 20px; border-bottom: 1px solid #eceef3; line-height: 1.5; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfe; }
.cell-title { display: flex; align-items: center; gap: 12px; }
.cell-title strong { font-weight: 600; }
.cell-title .meta { margin-top: 4px; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 140px; }
.tag { padding: 4px 8px; background: #f2f3f7; border-radius: 4px; font-size: .875rem; color: #616878; }
td > strong, .cell-title strong { font-size: 1rem; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-actions .btn { font-size: .875rem; padding: 0 12px; }
.nowrap { white-space: nowrap; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875rem; overflow-wrap: anywhere; }
.empty { padding: 64px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { border: 0; background: transparent; color: var(--muted); min-height: 48px; padding: 0 0 12px; border-bottom: 2px solid transparent; }
.tab.selected { color: var(--accent-strong); border-color: var(--accent); font-weight: 700; }
.provider-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.provider { border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 20px; }
.provider-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.provider .meta { margin-top: 12px; }
.provider-actions { display: flex; gap: 8px; margin-top: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-title p { color: var(--muted); font-size: .875rem; margin-top: 4px; }
.form-page { max-width: 860px; }
.settings-row { padding: 24px; display: flex; align-items: flex-start; gap: 32px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.settings-row p { font-size: 1rem; color: var(--muted); margin-top: 8px; max-width: 60ch; }
.setting-state { color: var(--success); font-size: .875rem; white-space: nowrap; margin-top: 4px; }
.check-label { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; line-height: 1.5; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.settings-row input[type=checkbox] { margin-top: 8px; }
.form-body { padding: 24px; }
.form-body textarea { min-height: 150px; resize: vertical; line-height: 1.6; margin-top: 8px; }
.form-footer { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 12px; background: #fcfcfe; }
.notice { padding: 16px 20px; border: 1px solid #e3dfef; border-radius: 8px; background: #faf8fd; font-size: .875rem; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }
.release-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; }
.release-summary h2 { margin-bottom: 8px; }
.release-summary p { color: var(--muted); font-size: .875rem; }
.timeline { list-style: none; margin: 0; padding: 0 24px; }
.timeline li { display: flex; gap: 16px; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .meta { margin-top: 8px; }
.timeline-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-list li { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 24px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.audit-list li:last-child { border: 0; }
.audit-list .meta { margin-top: 4px; }
.audit-list time { color: var(--muted); font-size: .875rem; text-align: right; }
.login-layout { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: var(--canvas); }
.login-panel { max-width: 440px; width: 100%; }
.login-panel .brand { padding: 0; margin-bottom: 40px; }
.login-panel h1 { font-size: 1.5rem; margin-bottom: 8px; }
.login-panel form { margin-top: 28px; }
.login-panel .btn { width: 100%; margin-top: 8px; }
.login-note { margin-top: 24px; font-size: .875rem; color: var(--muted); line-height: 1.6; }
.login-preview { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .field legend { font-size: .875rem; font-weight: 600; color: #424958; }
.field .hint { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.field input[aria-invalid=true] { border-color: var(--danger); }
fieldset { border: 0; margin: 0 0 20px; padding: 0; }
legend { margin-bottom: 8px; font-size: .875rem; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-options { display: grid; gap: 4px; background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.error { color: var(--danger); background: var(--danger-tint); border: 1px solid #f1c9cc; padding: 12px 16px; border-radius: 8px; line-height: 1.5; font-size: .875rem; margin-bottom: 20px; }
.error:empty { display: none; }
dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 48px); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 24px 80px #20233026; color: var(--ink); }
dialog::backdrop { background: #24223460; }
.dialog-head { padding: 24px 24px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-head p { margin-top: 8px; }
.dialog-content { padding: 8px 24px 12px; }
.dialog-content textarea { min-height: 104px; resize: vertical; }
.dialog-foot { position: sticky; bottom: 0; padding: 16px 24px; display: flex; gap: 12px; justify-content: flex-end; background: white; border-top: 1px solid var(--line); }
.confirm-copy { margin-bottom: 24px; color: var(--muted); }
.publish-overview { display: flex; gap: 12px; flex-wrap: wrap; padding: 16px 0 24px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 20; padding: 16px 24px; max-width: calc(100% - 32px); background: #272c38; color: white; font-size: .875rem; border-radius: 10px; box-shadow: 0 8px 24px #20233024; line-height: 1.5; }
.app-details h3, .provider-title h3, .timeline-title h3 { overflow-wrap: anywhere; min-width: 0; }
.toast.failure { background: #8e2934; }
@media (min-width: 1600px) { main.content { padding-top: 48px; } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 208px minmax(0, 1fr); }
  .topbar { padding: 0 28px; } main.content { padding: 32px 28px; }
  .overview { grid-template-columns: 1fr; } .provider-list { grid-template-columns: 1fr; }
  .provider { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 24px; }
  .provider .meta { grid-column: 1; } .provider-actions { grid-column: 2; grid-row: 1 / 3; margin: 0; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { height: auto; position: static; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; } .brand-mark { width: 36px; height: 36px; font-size: 1.25rem; }
  .nav-label, .sidebar-bottom { display: none; }
  .navigation { margin-top: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .nav-item { padding: 0 8px; font-size: .875rem; gap: 8px; justify-content: center; }
  .topbar { height: 56px; padding: 0 20px; } .breadcrumb { gap: 8px; }
  .content { padding: 24px 20px !important; }
  h1 { font-size: 1.5rem; } .page-head { gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
  .page-head p { font-size: 1rem; } .page-head > .btn { margin-left: auto; }
  .release-banner { padding: 20px; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
  .release-banner > .btn { margin-left: auto; }
  .banner-title { flex-wrap: wrap; gap: 8px; } .overview { gap: 20px; }
  .panel-head { padding: 20px; } .app-row { padding: 20px; gap: 12px; flex-wrap: wrap; }
  .app-details { min-width: 160px; } .app-row > .badge { margin-left: 60px; }
  .toolbar { padding: 12px; flex-wrap: wrap; gap: 8px; }
  .search { min-width: 100%; max-width: none; } .toolbar select { width: auto; flex: 1; }
  th, td { padding-left: 16px; padding-right: 16px; } table { min-width: 640px; }
  .tabs { gap: 20px; } .tab { font-size: .875rem; }
  .provider { display: block; } .provider-actions { margin-top: 12px; }
  .settings-row { padding: 20px; gap: 16px; } .form-body { padding: 20px; }
  .release-summary { padding: 20px; flex-wrap: wrap; }
  .timeline { padding: 0 20px; } .timeline li { flex-wrap: wrap; }
  .audit-list li { grid-template-columns: 1fr; gap: 8px; padding: 20px; } .audit-list time { text-align: left; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  dialog { max-height: calc(100dvh - 32px); } .dialog-head, .dialog-content, .dialog-foot { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
