/* Shared visual language with jingyue-ui/src/index.css. */
:root {
  color-scheme: light;
  --ink: #18191b;
  --muted: #646970;
  --line: #e8eaed;
  --input: #e1e3e7;
  --primary: #111214;
  --primary-hover: #292b2f;
  --surface: #ffffff;
  --surface-muted: #f5f5f5;
  --accent: #e8f0fe;
  --canvas: #ffffff;
  --sidebar: #f5f5f5;
  --danger: #b24646;
  --danger-soft: #fff0f0;
  --success: #397957;
  --success-soft: #edf7f1;
  --warning: #946b25;
  --warning-soft: #fff6e8;
  --focus: #aeb5bf;
  --sidebar-width: 96px;
  --header-height: 76px;
  --radius: 12px;
  --radius-lg: 16px;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
* { box-sizing: border-box; }
html { min-height: 100%; scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.icon { flex: none; vertical-align: middle; }
.skip-link { position: fixed; top: -60px; left: 112px; z-index: 20; background: var(--primary); color: var(--surface); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; align-items: center; width: var(--sidebar-width); padding: 22px 12px 18px; background: var(--sidebar); }
.brand { display: flex; justify-content: center; }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: var(--surface); font-size: 23px; font-weight: 600; }
.sidebar-nav { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; margin-top: 48px; }
.sidebar-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 70px; min-height: 70px; padding: 10px 2px; border-radius: 16px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.sidebar-nav a > .icon { width: 26px; height: 26px; }
.sidebar-nav a:hover { background: color-mix(in srgb, var(--surface) 65%, transparent); color: var(--ink); }
.sidebar-nav a.active { background: var(--surface); color: var(--ink); font-weight: 600; }
.sidebar-account { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: auto; padding-top: 32px; }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #496caa; font-size: 13px; font-weight: 500; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--surface); color: var(--ink); }
.topbar { position: fixed; inset: 0 0 auto var(--sidebar-width); z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-height); padding: 0 36px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-brand, .topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-brand strong { font-size: 16px; font-weight: 600; }
.topbar-brand > span, .topbar-user { font-size: 12px; color: var(--muted); }
.topbar-divider { color: var(--input) !important; }
.topbar-right { gap: 20px; }
.internal-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.internal-badge .icon { width: 13px; height: 13px; }
.topbar-user { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page { max-width: 1640px; min-height: 100vh; margin-left: var(--sidebar-width); padding: calc(var(--header-height) + 32px) 36px 48px; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.4; font-weight: 600; letter-spacing: -.5px; overflow-wrap: anywhere; }
.page-heading p { max-width: 900px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.page-eyebrow { display: block; margin-bottom: 8px; font-size: 11px; color: var(--muted); letter-spacing: .8px; }
.industry-layout { display: grid; gap: 20px; min-width: 0; }
.industry-rail { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 46px; padding: 0; color: var(--muted); font-size: 12px; }
.industry-rail .industry-selected { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 9px; background: var(--surface-muted); color: var(--ink); font-size: 13px; font-weight: 500; }
.industry-rail .industry-selected .icon { width: 14px; height: 14px; color: var(--muted); }
.industry-note { margin-left: auto; font-size: 11px; }
.configuration { min-width: 0; }
.config-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.config-tabs { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px; border-radius: 11px; background: var(--surface-muted); }
.config-tabs > a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 18px; border-radius: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.config-tabs > a:hover { color: var(--ink); }
.config-tabs > a.selected { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 4px #0000000a; }
.pending-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 20px; background: var(--warning-soft); color: var(--warning); font-size: 11px; white-space: nowrap; }
.pending-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.config-panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.panel-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.panel-title h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 17px; font-weight: 600; }
.panel-title p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); font-size: 11px; font-weight: 400; background: var(--surface); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: auto; min-height: 38px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.5; text-align: center; white-space: nowrap; cursor: pointer; }
.primary-button { border-color: var(--primary); background: var(--primary); color: var(--surface); }
.primary-button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.secondary-button { border-color: var(--line); background: var(--surface); color: var(--ink); }
.secondary-button:hover { background: var(--surface-muted); }
.danger-button { border-color: var(--danger); background: var(--danger); color: var(--surface); }
.danger-button:hover { filter: brightness(.95); }
.primary-button .icon, .secondary-button .icon { width: 16px; height: 16px; }
.table-scroll { min-width: 0; overflow-x: auto; }
.table-head, .table-row { display: grid; grid-template-columns: minmax(150px,1.1fr) minmax(200px,1.65fr) minmax(140px,1fr) 190px; align-items: center; column-gap: 24px; }
.table-head { min-height: 44px; padding: 10px 16px; border-radius: 10px; background: var(--surface-muted); color: var(--muted); font-size: 12px; }
.table-row { min-height: 86px; padding: 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.table-row:last-child { border-bottom: 0; }
.table-row:hover, .simple-row:hover { background: color-mix(in srgb, var(--surface-muted) 70%, transparent); }
.table-row > *, .simple-row > * { min-width: 0; overflow-wrap: anywhere; }
.table-row strong { font-weight: 500; }
.muted { color: var(--muted); }
.skill-summary { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.skill-preview { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.skill-preview.warning { color: var(--warning); }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.configure-link, .delete-link { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 6px; border-radius: 7px; font-size: 12px; white-space: nowrap; }
.configure-link { color: var(--ink); }
.configure-link:hover { background: var(--accent); }
.delete-link { color: var(--danger); }
.delete-link:hover { background: var(--danger-soft); }
.panel-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; }
.simple-head, .simple-row { display: grid; grid-template-columns: minmax(160px,1.7fr) minmax(150px,1.4fr) minmax(90px,.7fr) minmax(130px,1fr); gap: 20px; align-items: center; }
.simple-head { min-height: 44px; padding: 10px 16px; border-radius: 10px; background: var(--surface-muted); color: var(--muted); font-size: 12px; }
.simple-row { min-height: 68px; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.simple-row:last-child { border-bottom: 0; }
.simple-row strong { font-weight: 500; }
.simple-key { font-family: var(--font-mono); color: var(--muted); font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 9px; border-radius: 20px; background: var(--surface-muted); color: var(--muted); font-size: 11px; white-space: nowrap; }
.status-badge::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.success, .status-badge.succeeded { background: var(--success-soft); color: var(--success); }
.status-badge.active, .status-badge.pending, .status-badge.running { background: var(--warning-soft); color: var(--warning); }
.status-badge.failed, .status-badge.disabled { background: var(--danger-soft); color: var(--danger); }
.flash { margin: 0 0 22px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); color: var(--ink); font-size: 13px; }
.flash.success { background: var(--success-soft); color: var(--success); border-color: #b5dec5; }
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: #edcccc; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; padding: 32px 24px; color: var(--muted); font-size: 12px; text-align: center; }
.empty .icon { width: 28px; height: 28px; margin-bottom: 5px; color: #9ca1a8; }
.empty strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.empty p { max-width: 440px; margin: 0; line-height: 1.8; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th { padding: 12px 16px; background: var(--surface-muted); color: var(--muted); font-weight: 400; white-space: nowrap; }
.data-table th:first-child { border-radius: 10px 0 0 10px; }
.data-table th:last-child { border-radius: 0 10px 10px 0; }
.data-table td { padding: 17px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-muted) 70%, transparent); }
.data-table .empty-cell { height: 170px; text-align: center; vertical-align: middle; color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 11px; }
.sync-table { min-width: 900px; }
.sync-table .sync-company { max-width: 220px; overflow-wrap: anywhere; color: var(--muted); }
.sync-error { max-width: 300px; color: var(--danger); }
.sync-error summary { cursor: pointer; overflow-wrap: anywhere; }
.sync-error p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sync-origin strong { display: block; font-weight: 500; }
.sync-origin small { color: var(--muted); font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 28px; }
.overview-card { display: flex; align-items: center; gap: 16px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface-muted); }
.overview-symbol { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--surface); color: var(--muted); }
.overview-card strong { display: block; font-size: 29px; line-height: 1.2; font-weight: 600; }
.overview-card span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #c9cdd4; background-clip: padding-box; }
