:root { color-scheme: light; --ink: #183044; --muted: #657789; --line: #dce4eb; --background: #f3f6f9; --accent: #176c61; --accent-dark: #0d5148; --danger: #af3138; --radius: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font-size: 14px; line-height: 1.65; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, .button { cursor: pointer; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #66baae; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 27px; letter-spacing: -.6px; margin-bottom: 8px; line-height: 1.35; }
h2 { font-size: 19px; margin-bottom: 5px; }
h3 { font-size: 15px; margin-bottom: 6px; }
p { margin-bottom: 16px; }
.muted, .field-help { color: var(--muted); }
.field-help { font-size: 12px; margin: 10px 0 18px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1px; margin-bottom: 9px; }
.app-header { min-height: 83px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px max(24px, calc((100vw - 1320px) / 2)); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 17px; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: .6px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: white; font-size: 20px; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.text-link { text-underline-offset: 4px; }
.admin-shell { max-width: 1368px; margin: 0 auto; padding: 30px 24px 64px; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px #17344405; }
.content-card { padding: 25px; }
.login-card { max-width: 430px; margin: 56px auto; padding: 34px; }
.login-card form { margin-top: 24px; }
.login-card .full-width { margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #cbd6df; border-radius: 8px; padding: 8px 15px; min-height: 40px; background: #fff; color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 500; transition: background .15s; }
.button:hover { background: #f1f5f7; }
.button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.subtle { border-color: transparent; color: var(--muted); }
.button.small { padding: 4px 11px; min-height: 32px; font-size: 12px; }
.button.danger { color: var(--danger); }
.full-width { width: 100%; }
label { display: block; font-weight: 500; margin-bottom: 7px; }
input:not([type="checkbox"]), select { display: block; width: 100%; min-height: 42px; border: 1px solid #cbd6df; border-radius: 8px; padding: 9px 11px; background: #fff; color: var(--ink); margin-bottom: 18px; }
input::placeholder { color: #8a99a5; }
input[readonly] { background: #f5f8fa; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }
.check-row { display: flex; align-items: center; gap: 9px; margin: 8px 0 12px; font-weight: 400; }
.notice { padding: 13px 16px; border: 1px solid #cbdce7; border-radius: 9px; background: #edf4f8; color: #355e77; margin-bottom: 23px; overflow-wrap: anywhere; }
.notice.success { border-color: #b9ded2; background: #eef8f3; color: #23634f; }
.notice.error { border-color: #f1c6c7; background: #fff3f3; color: #9a3137; }
.notice.warning { border-color: #ebd69e; background: #fff8e6; color: #81651b; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 5px 0 28px; }
.workspace-heading p:last-child { margin-bottom: 0; }
.enterprise-picker { min-width: 300px; display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 0 10px; }
.enterprise-picker label { grid-column: 1 / -1; font-size: 12px; }
.enterprise-picker select { margin: 0; }
.section-nav { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tab-button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 12px 18px; white-space: nowrap; font-weight: 600; }
.tab-button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-button span { font-size: 11px; font-weight: 400; background: #e6edf2; border-radius: 5px; padding: 2px 5px; margin-left: 5px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading p { margin-bottom: 0; font-size: 13px; }
.section-heading h2 { margin-bottom: 4px; }
.table-scroll { overflow-x: auto; margin: 0 -5px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { background: #f5f8fa; color: #5d7181; font-weight: 500; white-space: nowrap; }
td, th { padding: 13px 12px; border-bottom: 1px solid #e9eef2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td { min-width: 88px; }
td.long-cell { max-width: 350px; overflow-wrap: anywhere; }
.status-detail { display: block; color: var(--muted); margin-top: 5px; max-width: 280px; }
.empty-row { text-align: center; color: var(--muted); padding: 40px 16px; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.neutral { color: #597080; background: #edf2f6; }
.badge.success { color: #24735b; background: #e9f5ee; }
.badge.warning { color: #92681d; background: #fff4da; }
.badge.error { color: #a43c43; background: #fceced; }
.connection-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.subsection { border-top: 1px solid var(--line); margin-top: 27px; padding-top: 22px; }
.code-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 18px; border-radius: 10px; margin: 20px 0; }
.code-card span { display: block; color: var(--muted); font-size: 13px; }
.code-card strong { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 26px; letter-spacing: 5px; font-weight: 600; color: var(--accent-dark); margin-top: 8px; }
.secret-result { padding: 14px; margin-top: 16px; border-radius: 8px; background: #f3f7f9; }
.secret-result label { font-size: 12px; }
.secret-result input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
dialog { width: min(620px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 15px; padding: 0; box-shadow: 0 20px 80px #152a3e33; color: var(--ink); max-height: calc(100vh - 48px); }
dialog::backdrop { background: #152b4380; }
.dialog-form { padding: 26px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.close-button { font-size: 25px; line-height: 1; border: 0; background: transparent; color: var(--muted); padding: 0 4px; }
.form-error { color: var(--danger); margin: 16px 0 0; overflow-wrap: anywhere; }
.permission-fieldset { margin: 8px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.permission-fieldset legend { padding: 0 6px; font-weight: 500; }
.permission-list { max-height: 300px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.permission-list label { font-size: 13px; margin: 5px 0; }
.binding-body { min-height: 100vh; background: linear-gradient(165deg, #e9f3f1 0, #f4f7fa 48%, #f4f7fa 100%); }
.binding-shell { max-width: 480px; padding: 30px 20px; margin: 0 auto; }
.binding-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 15px; font-weight: 600; }
.binding-brand .brand-mark { width: 35px; height: 35px; font-size: 17px; border-radius: 10px; }
.binding-card { padding: 30px 25px; }
.binding-card h1 { font-size: 26px; }
.binding-card form { margin-top: 22px; }
.binding-card input { min-height: 48px; font-size: 16px; }
.binding-card .button { min-height: 46px; }
.binding-card #binding-code { letter-spacing: 3px; }
.binding-card #binding-code::placeholder { letter-spacing: 0; font-size: 14px; }
.binding-card #binding-refresh-button { margin-top: 18px; }
.binding-footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }
.success-detail dl { margin: 20px 0; }
.success-detail dl div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.success-detail dt { color: var(--muted); flex-shrink: 0; }
.success-detail dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .app-header { align-items: flex-start; padding: 15px 18px; gap: 12px; }
  .brand { font-size: 15px; gap: 9px; }
  .brand-mark { width: 36px; height: 36px; }
  .header-actions { justify-content: flex-end; gap: 7px 12px; font-size: 12px; }
  #current-user { width: 100%; text-align: right; }
  .admin-shell { padding: 20px 14px 40px; }
  .workspace-heading { display: block; margin-bottom: 18px; }
  h1 { font-size: 24px; }
  .enterprise-picker { margin-top: 20px; min-width: 0; }
  .content-card { padding: 18px 14px; }
  .connection-grid { grid-template-columns: 1fr; gap: 18px; }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 17px; }
  .tab-button { padding: 10px 13px; }
  .login-card { margin: 26px auto; padding: 25px; }
  .permission-list { grid-template-columns: 1fr; }
  .dialog-form { padding: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
