/* 蓝白桌面工作台：布局与交互资源均由 Server 同源提供。 */
:root {
  --paper: #f5f7fa; --surface: #fff; --ink: #1e293b; --muted: #617085;
  --line: #e2e8f0; --blue: #0868da; --blue-dark: #0755b4; --blue-soft: #edf5ff;
  --green: #15804b; --amber: #925b0b; --red: #b8323e;
  --mono: "Cascadia Code", "Consolas", monospace; --sidebar-width: 222px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.6 "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; border: 1px solid #ced8e4; border-radius: 6px; padding: 7px 12px; color: #334155; background: var(--surface); transition: background .15s, border-color .15s, box-shadow .15s; }
button:hover:enabled { background: var(--blue-soft); border-color: #8cb8ee; color: var(--blue-dark); }
button:disabled { opacity: .46; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #4a9cf3; outline-offset: 3px; }
a { color: inherit; }
.ui-icon { flex-shrink: 0; width: 18px; height: 18px; vertical-align: middle; }
.primary { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }
.primary:hover:enabled { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.quiet { background: transparent; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; height: 64px; flex-shrink: 0; padding: 0 23px; text-decoration: none; color: #fff; background: var(--blue); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; }
.brand-mark svg { width: 32px; height: 32px; }
.brand-name { display: flex; align-items: baseline; gap: 8px; font-size: 23px; font-weight: 650; letter-spacing: -.7px; }
.brand-edition { font: 8px var(--mono); letter-spacing: 1px; opacity: .8; }
.sidebar-space { display: flex; align-items: center; gap: 10px; padding: 24px 20px 20px; font-size: 12px; font-weight: 600; }
.space-avatar { display: grid; place-items: center; height: 32px; width: 32px; border: 1px solid #c5dcf9; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font: 600 16px var(--mono); }
.sidebar-space small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 1px; }
.nav-label { margin: 8px 23px 10px; color: #7c899a; font-size: 10px; letter-spacing: .7px; }
nav { display: grid; gap: 5px; padding: 0 12px; }
.nav-item { justify-content: flex-start; gap: 12px; padding: 10px 12px; min-height: 44px; border-color: transparent; background: transparent; text-align: left; font-size: 13px; font-weight: 500; color: #506176; position: relative; }
.nav-item .ui-icon { width: 20px; height: 20px; }
.nav-item[aria-current="page"] { background: #eaf3ff; color: var(--blue-dark); font-weight: 600; }
.nav-item[aria-current="page"]::before { content: ""; width: 3px; height: 20px; border-radius: 2px; background: var(--blue); position: absolute; left: -12px; }
.nav-item[aria-current="page"]:hover { border-color: transparent; background: #deedff; }
.sidebar-bottom { margin: auto 18px 22px; padding-top: 22px; color: var(--muted); font-size: 11px; }
.handler-heading { border-top: 1px solid var(--line); padding-top: 18px; font-size: 10px; font-weight: 600; }
.handler-list { display: flex; gap: 6px; margin-top: 10px; }
.handler-list code { border: 1px solid var(--line); background: #f8fafc; padding: 2px 7px; border-radius: 4px; font-size: 10px; color: #486078; }
.sidebar-bottom p { margin: 13px 0 18px; color: #7c899a; line-height: 1.8; }
.execution-chain { font: 10px var(--mono); color: #536980; }
.execution-chain span { color: #98adc3; }
.workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 30px; background: var(--blue); color: #fff; }
.breadcrumbs { display: flex; gap: 15px; align-items: center; font-size: 12px; white-space: nowrap; }
.console-label { color: #d5e7ff; }
.slash { color: #9bc6fc; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.toolbar button { min-height: 34px; font-size: 12px; padding: 6px 12px; }
.toolbar .refresh-button { border-color: #ffffff55; background: #ffffff0d; color: #fff; }
.toolbar .refresh-button:hover:enabled { background: #ffffff20; border-color: #ffffff99; }
.toolbar .primary { background: #fff; color: var(--blue-dark); border-color: #fff; box-shadow: 0 1px 2px #00418d20; }
.toolbar .primary:hover:enabled { background: #eaf3ff; border-color: #eaf3ff; }
.toolbar button:focus-visible { outline-color: #fff; }
.contextbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 30px; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.connection, .access { display: flex; align-items: center; gap: 8px; min-width: 0; }
.connection { flex-shrink: 0; }
.tiny-dot { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #15804b0d; }
.muted-dot { background: #99a7b8; box-shadow: none; }
#logout { padding: 1px 7px; font-size: 10px; flex-shrink: 0; border-color: var(--line); }
#access-label { overflow-wrap: anywhere; }
main { display: flex; flex-direction: column; max-width: 1600px; min-height: calc(100dvh - 106px); padding: 27px 30px 18px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 23px; }
.eyebrow { font: 9px/1.5 var(--mono); letter-spacing: 1.5px; color: var(--muted); }
h1 { margin: 5px 0 5px; font-size: 27px; line-height: 1.4; letter-spacing: -.6px; font-weight: 650; }
.page-heading p, .panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.workspace-tag { display: inline-flex; align-items: center; gap: 7px; color: #75859a; font-size: 11px; }
.workspace-tag .ui-icon { width: 15px; height: 15px; }
.summary { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 14px; margin-bottom: 23px; }
.summary > div { min-width: 0; border: 1px solid var(--line); background: #fff; padding: 16px 18px; position: relative; border-radius: 8px; box-shadow: 0 2px 3px #152d4a02; }
.summary-icon { position: absolute; top: 15px; right: 15px; color: #78a0cf; }
.summary-icon .ui-icon { width: 17px; height: 17px; }
.card-label { display: block; color: var(--muted); font-size: 11px; padding-right: 24px; }
.card-label .mono { margin-left: 6px; font-size: 9px; color: #8393a7; letter-spacing: .6px; }
.summary strong { display: block; font-size: 22px; line-height: 1.4; font-weight: 600; margin: 9px 0 6px; }
.summary .refresh-time { font: 20px/1.54 var(--mono); letter-spacing: -.8px; }
.meta { display: block; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.live-mark { color: var(--blue); font: 8px var(--mono); border: 1px solid #c6ddf9; border-radius: 3px; padding: 1px 4px; margin-left: 7px; background: var(--blue-soft); }
.auto-refresh { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--blue); margin: 0; }
.panel { flex-shrink: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; animation: reveal .18s ease-out; box-shadow: 0 2px 3px #152d4a02; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; }
h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.count { display: inline-block; vertical-align: 1px; margin-left: 6px; font: 10px var(--mono); border-radius: 4px; padding: 3px 6px; color: #526984; background: #edf1f6; }
.panel-heading p { font-size: 11px; }
.panel-heading button { font-size: 11px; padding: 5px 9px; }
.panel-heading .ui-icon { width: 14px; height: 14px; }
.table-wrap { overflow-x: auto; }
.mobile-table-hint { display: none; }
table { border-collapse: collapse; text-align: left; width: 100%; font-size: 12px; }
th { white-space: nowrap; background: #f8fafc; padding: 11px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #60738b; font-size: 11px; font-weight: 500; }
td { padding: 15px 20px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7faff; }
.cell-title { display: block; max-width: 250px; overflow-wrap: anywhere; font-weight: 600; margin-bottom: 3px; font-size: 12px; }
.cell-secondary { display: block; color: var(--muted); font-size: 10px; line-height: 1.9; }
.mono, code, pre, textarea { font-family: var(--mono); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; padding: 3px 8px; font-size: 10px; background: #edf1f5; color: #607185; white-space: nowrap; }
.badge::before { content: ""; height: 5px; width: 5px; border-radius: 50%; background: currentColor; }
.badge[data-status="succeeded"], .badge[data-status="enabled"] { background: #eaf6ef; color: #207348; }
.badge[data-status="running"] { background: #eaf3ff; color: #1264bf; }
.badge[data-status="failed"] { background: #fff0f1; color: var(--red); }
.badge[data-status="retry_wait"], .badge[data-status="pending"] { background: #fff5e3; color: var(--amber); }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 180px; }
.row-actions button { padding: 4px 7px; font-size: 11px; border-color: transparent; background: transparent; color: #53677f; }
.row-actions .run-button { color: var(--blue); border: 1px solid #cfe1fa; background: #f7fbff; }
.actions-heading { min-width: 220px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.pagination div { display: flex; gap: 7px; flex-shrink: 0; }
.pagination button { font-size: 10px; padding: 4px 9px; }
.empty { text-align: center; padding: 53px 20px 58px; }
.empty-symbol { display: grid; place-items: center; color: #5089cb; background: #f0f6ff; border: 1px solid #dfebfc; width: 62px; height: 62px; border-radius: 14px; margin: 0 auto 18px; }
.empty-symbol .ui-icon { width: 30px; height: 30px; stroke-width: 1.3; }
.empty h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.empty p { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
.empty button { font-size: 12px; color: var(--blue); border-color: #bfdbfc; }
footer { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-top: auto; padding-top: 24px; color: #7c899c; font-size: 10px; }
.footer-logo { color: #536c8a; font-weight: 600; }
.footer-divider { padding: 0 8px; color: #c0cbda; }
.notice { background: var(--blue-soft); border: 1px solid #c9dff9; border-radius: 6px; padding: 13px 16px; font-size: 12px; margin-bottom: 20px; overflow-wrap: anywhere; color: #29588c; }
.notice p { margin: 0; white-space: pre-wrap; }
.notice.error { background: #fff8eb; border-color: #f0d8ad; color: #825b20; }
.notice button { margin: 10px 6px 0 0; font-size: 11px; }
.read-error { font-size: 12px; color: var(--red); }
.filters { display: flex; gap: 9px; align-items: flex-end; padding: 0 20px 16px; margin: 0; }
.filters label { flex: 1; max-width: 440px; font-size: 10px; color: var(--muted); margin: 0; }
.filters input { margin-top: 4px; }
.filters button { font-size: 11px; flex-shrink: 0; }
.lookup { padding-top: 0; }
.diagnostic-content { padding: 0 20px 20px; }
.subtle { color: var(--muted); font-size: 12px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f6f8fb; border: 1px solid var(--line); border-radius: 6px; padding: 15px; font-size: 11px; line-height: 1.8; }
dialog { padding: 26px; border: 1px solid #d5dfeb; border-radius: 10px; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); color: var(--ink); box-shadow: 0 24px 80px #122f5b33; }
dialog::backdrop { background: #142c4c66; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.dialog-heading h2 { margin: 5px 0 0; font-size: 22px; }
.icon-button { border: 0; font-size: 24px; padding: 0 8px; background: transparent; }
form > label, .form-grid label { display: block; margin-bottom: 15px; font-size: 12px; }
input:not([type="checkbox"]), select, textarea { display: block; border: 1px solid #cdd8e5; width: 100%; border-radius: 5px; background: white; padding: 8px 10px; color: var(--ink); margin-top: 6px; min-width: 0; }
input::placeholder, textarea::placeholder { color: #8191a5; }
textarea { resize: vertical; font-size: 12px; line-height: 1.7; background: #fbfcfe; }
.field-hint { font-size: 10px; color: var(--muted); margin: -7px 0 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form .checkbox-label { display: flex; align-items: center; gap: 8px; }
.dialog-footer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-footer span { font-size: 10px; color: var(--muted); }
.form-error { color: var(--red); font-size: 12px; overflow-wrap: anywhere; }
.drawer { width: min(680px, calc(100% - 24px)); margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 28px; }
.detail-status { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; }
.detail-grid { display: grid; grid-template-columns: 92px 1fr; gap: 10px; margin: 20px 0; font-size: 12px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.detail-section { font-size: 12px; margin-top: 22px; }
.attempt { margin: 14px 0; padding: 15px; border: 1px solid var(--line); border-left: 3px solid #5499ed; border-radius: 5px; }
.attempt-header { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 12px; }
.attempt .detail-grid { font-size: 10px; grid-template-columns: 64px 1fr; margin-bottom: 0; }
.danger { color: var(--red); border-color: #edc4c9; }
.danger:hover:enabled { color: #a22532; border-color: #d99aa4; background: #fff0f1; }
.skip-link { position: fixed; left: 12px; top: -60px; padding: 10px; background: white; z-index: 50; color: var(--blue); }
.skip-link:focus { top: 10px; }
#login-dialog { max-width: 480px; padding: 32px; }
#login-dialog p { color: var(--muted); line-height: 1.8; font-size: 12px; }
#login-dialog .form-error { color: var(--red); }
#login-title { font-size: 23px; margin-top: 5px; }
.login-brand { display: flex; align-items: center; gap: 7px; font-size: 24px; font-weight: 650; letter-spacing: -.5px; color: var(--blue); margin-bottom: 24px; }
#access-token { display: block; width: 100%; margin-top: 8px; }
@keyframes reveal { from { opacity: .7; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 1100px) {
  :root { --sidebar-width: 194px; }
  .brand { padding: 0 18px; }
  .brand-edition { display: none; }
  main { padding: 24px 22px 18px; }
  .topbar { padding: 0 22px; }
  .contextbar { padding-left: 22px; padding-right: 22px; }
  td, th { padding-left: 15px; padding-right: 15px; }
  .summary .refresh-time { font-size: 16px; line-height: 1.93; }
  .workspace-tag { display: none; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 64px; }
  .brand { padding: 0; justify-content: center; }
  .brand-name, .sidebar-space, .nav-label, .sidebar-bottom, .nav-text { display: none; }
  nav { padding: 16px 8px; gap: 8px; }
  .nav-item { padding: 10px; justify-content: center; min-height: 44px; }
  .nav-item[aria-current="page"]::before { left: -8px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .breadcrumbs { gap: 8px; font-size: 11px; }
  .toolbar { gap: 7px; }
  .toolbar button { padding: 6px 9px; min-height: 36px; font-size: 11px; }
  .toolbar-label { display: none; }
  .contextbar { padding: 8px 14px; gap: 6px; flex-wrap: wrap; font-size: 10px; }
  main { padding: 22px 14px 16px; }
  h1 { font-size: 24px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading p { font-size: 11px; }
  .summary { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .summary > div { padding: 13px 12px; }
  .summary-icon { display: none; }
  .card-label { padding: 0; font-size: 10px; }
  .card-label .mono { font-size: 8px; }
  .summary strong { font-size: 17px; }
  .summary > div:last-child { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .summary > div:last-child strong { font-size: 14px; margin: 0; line-height: 1.6; letter-spacing: -.6px; }
  .summary > div:last-child .card-label { width: 100%; }
  .panel-heading { padding: 16px 13px; gap: 10px; }
  .panel-heading p { font-size: 10px; }
  .panel-heading button { padding: 5px 7px; flex-shrink: 0; }
  .filters { padding-left: 13px; padding-right: 13px; gap: 6px; flex-wrap: wrap; }
  .filters label { flex-basis: 100%; }
  .filters input { font-size: 11px; }
  .filters button { padding: 5px 10px; }
  .table-wrap table { min-width: 740px; }
  .mobile-table-hint { display: block; margin: 0 13px 12px; color: var(--muted); font-size: 10px; }
  .pagination { padding: 12px 13px; flex-wrap: wrap; }
  .pagination div { margin-left: auto; }
  .empty { padding: 35px 14px 40px; }
  .empty p { font-size: 11px; }
  .form-grid { gap: 12px; }
  dialog, .drawer, #login-dialog { padding: 21px; }
  .dialog-footer { flex-wrap: wrap; }
  .dialog-footer span { flex: 1; }
  footer { font-size: 9px; }
}
@media (max-width: 420px) {
  .console-label, .breadcrumbs .slash { display: none; }
  .summary .card-label .mono { display: none; }
  .summary strong { font-size: 16px; }
}
