:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #646a73;
  --line: #e4e5e8;
  --accent: #d93428;
  --accent-hover: #bd291f;
  --nav: #242629;
  --bg: #f5f5f6;
  --surface: #fff;
  --sidebar-width: 224px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
button,input,select { font: inherit; }
button,a,input,select,summary { outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:disabled:hover { filter: none; }
form { margin: 0; }
h1,h2,p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.8px; margin-bottom: 9px; font-weight: 600; overflow-wrap: anywhere; }
h2 { font-size: 16px; font-weight: 600; margin: 0; }
small { font-size: 12px; }
label { display: block; font-weight: 500; font-size: 12px; margin-bottom: 7px; }
input,select { height: 43px; border: 1px solid #d8dade; border-radius: 6px; background: var(--surface); padding: 0 12px; color: var(--ink); min-width: 0; }
input:focus,select:focus { border-color: var(--accent); outline: 2px solid #d9342826; }
input::placeholder { color: #737880; }
.ui-icon { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--nav); color: #c9cbd0; display: flex; flex-direction: column; padding: 32px 18px 20px; z-index: 2; overflow-y: auto; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.sidebar .brand { margin: 0 8px 38px; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { color: #c2c4c9; padding: 11px 12px; display: flex; align-items: center; gap: 10px; border-radius: 6px; font-size: 12px; min-height: 42px; }
.nav-icon { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: #303236; color: #fff; text-decoration: none; }
.nav-item.active { background: #36383c; color: #fff; box-shadow: inset 3px 0 #e53528; font-weight: 600; }
.sidebar-bottom { margin-top: auto; display: flex; align-items: center; gap: 9px; padding-top: 18px; border-top: 1px solid #3a3c40; }
.profile-copy { min-width: 0; flex: 1; }
.sidebar-bottom strong { display: block; font-size: 12px; color: #f2f2f3; font-weight: 500; overflow-wrap: anywhere; }
.sidebar-bottom small { display: block; font-size: 11px; color: #afb2b8; margin-top: 2px; }
.avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #3a3c40; color: #e3e4e7; font-size: 12px; }
.exit { display: grid; place-items: center; min-width: 32px; min-height: 36px; padding: 7px; background: none; border: 0; border-radius: 5px; color: #c2c4c9; }
.exit:hover { color: #fff; background: #3a3c40; }
.workspace { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 54px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; color: var(--muted); font-size: 12px; }
.separator { margin: 0 10px; color: #a6a8ae; }
.source-label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.source-label i,.status-dot { width: 6px; height: 6px; flex-shrink: 0; display: inline-block; background: #2f9368; border-radius: 50%; }
main { width: 100%; max-width: 1560px; margin: 0 auto; padding: 30px 32px; flex: 1; min-width: 0; }
footer { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 11px; padding: 18px 32px; border-top: 1px solid var(--line); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.page-heading>div { min-width: 0; }
.page-heading p:last-child { margin-bottom: 0; font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 8px; }
.muted { color: var(--muted); }
.count { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--muted); background: #e9eaed; padding: 4px 8px; vertical-align: middle; border-radius: 5px; margin-left: 7px; }
.button { border: 1px solid #d8dade; border-radius: 6px; padding: 9px 14px; min-height: 40px; font-weight: 500; font-size: 12px; display: inline-flex; gap: 9px; align-items: center; justify-content: center; white-space: nowrap; background: var(--surface); color: var(--ink); }
.button:hover { background: #f0f0f2; text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.secondary { background: transparent; }
.button.secondary:hover:not(:disabled) { background: #eaeaec; }
.button span { font-size: 18px; line-height: 1; }
.compact { padding: 7px 10px; min-height: 34px; font-size: 11px; }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 540px; }
.sync-actions small { flex-basis: 100%; text-align: right; font-size: 11px; line-height: 1.5; }
.sync-strip { display: flex; gap: 12px; align-items: center; padding: 13px 16px; margin-bottom: 24px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; background: #f9f9fa; }
.sync-strip strong { font-size: 12px; font-weight: 500; }
.sync-strip div span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sync-strip a { font-size: 11px; margin-left: auto; white-space: nowrap; }
.pending { background: #bd8417; }
.panel { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.search-panel { padding: 0; margin-bottom: 24px; background: transparent; border: 0; }
.search-form { display: grid; grid-template-columns: minmax(160px,1fr) 150px auto; align-items: end; gap: 12px; }
.search-form select { width: 100%; }
.search-form .button { min-height: 43px; }
.search-input { display: flex; position: relative; }
.search-input span { font-size: 24px; position: absolute; left: 12px; top: 1px; color: var(--muted); }
.search-input input { width: 100%; padding-left: 38px; }
.search-hint { font-size: 11px; color: var(--muted); margin: 10px 0 0; }
.search-panel .notice { margin: 12px 0 0; }
.panel-header { padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 14px; }
.panel-header h2 .muted { font-size: 12px; margin-left: 8px; font-weight: 400; }
.panel-header>a,.panel-header>span { font-size: 11px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th { font-size: 11px; font-weight: 500; color: var(--muted); background: #f7f7f8; padding: 10px 18px; white-space: nowrap; }
td { padding: 13px 18px; border-top: 1px solid var(--line); font-size: 12px; max-width: 340px; overflow-wrap: anywhere; vertical-align: middle; }
td small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
td small.customer-deleted { color: #b52b22; font-weight: 500; }
tbody tr:hover { background: #fafafa; }
.person { display: flex; align-items: center; min-width: 155px; }
.customer-avatar { display: none; }
.customer-name { color: var(--ink); font-weight: 500; }
a.customer-name:hover { color: var(--accent-hover); text-decoration: underline; }
.mono { font-family: Consolas,monospace; font-variant-numeric: tabular-nums; }
.arrow-link { display: grid; place-items: center; font-size: 17px; color: var(--muted); border: 1px solid var(--line); width: 30px; height: 32px; border-radius: 5px; flex-shrink: 0; }
.arrow-link:hover { color: var(--accent-hover); text-decoration: none; }
.customer-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.button.customer-login { min-height: 38px; padding: 8px 12px; gap: 8px; font-size: 13px; color: #b52b22; background: #fff0ed; border-color: transparent; }
.button.customer-login:hover { background: #ffe1db; }
.button.customer-login:active { background: #ffd4cc; }
.button.customer-login:focus-visible { outline: 2px solid #b52b22; outline-offset: 3px; }
.customer-login .ui-icon { width: 16px; height: 16px; }
.pagination { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 15px 20px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pagination>div { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty h2 { color: var(--ink); margin: 16px 0 8px; }
.empty-icon { display: grid; place-items: center; font-size: 34px; color: #777c84; background: #f1f1f3; border-radius: 12px; width: 56px; height: 56px; margin: auto; }
.notice { border: 1px solid #d3e7da; background: #f0f8f3; color: #326448; padding: 13px 16px; border-radius: 5px; margin-bottom: 20px; font-size: 12px; overflow-wrap: anywhere; }
.notice.warning { background: #fff9eb; border-color: #efdfb5; color: #7b5b1d; }
.notice.error { background: #fff2f0; border-color: #f0d3cf; color: #a5352c; }
.back-link { display: inline-block; font-size: 12px; margin-bottom: 22px; }
.tag { font-size: 11px; color: var(--muted); background: #f3f3f5; border: 1px solid var(--line); padding: 5px 9px; border-radius: 5px; white-space: nowrap; }
.tag.success { color: #27704c; background: #eff8f2; border-color: #d6eadd; }
.tag.failed { color: #a5352c; background: #fff2f0; border-color: #f0d3cf; }
.tag.running { color: #80611d; background: #fff8e7; border-color: #efdfb5; }
.detail-layout { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 24px; }
.detail-sections { min-width: 0; }
.card-nav { display: flex; flex-direction: column; gap: 3px; align-self: start; position: sticky; top: 22px; }
.card-nav a { color: var(--muted); padding: 10px 12px; font-size: 12px; border-radius: 5px; }
.card-nav a:hover { background: #eaeaec; color: var(--ink); text-decoration: none; }
.detail-panel { margin-bottom: 20px; scroll-margin-top: 20px; }
.section-number { font-family: monospace; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); margin: 0; padding: 6px 20px 18px; gap: 0 26px; }
.data-field { border-bottom: 1px solid var(--line); padding: 16px 0; min-width: 0; }
.data-field dt { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.data-field dt>small { font-size: 11px; color: #767b83; margin-left: 7px; }
.data-field dd { margin: 7px 0 0; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.nested { margin: 0; white-space: normal; }
.nested>div { margin-bottom: 6px; border-left: 2px solid var(--line); padding-left: 9px; }
.nested dd { margin: 1px 0; }
.nested-list { padding-left: 16px; margin: 0; white-space: normal; }
.nested-list li { margin: 7px 0; }
details { padding: 20px; }
summary { cursor: pointer; font-weight: 500; }
details p { margin-top: 12px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: #f5f5f6; border-radius: 5px; padding: 18px; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 26px; }
.metric { padding: 22px; }
.metric>span { font-size: 12px; color: var(--muted); }
.metric strong { display: block; font-size: 28px; margin: 7px 0; font-weight: 500; overflow-wrap: anywhere; }
.metric small { color: var(--muted); font-size: 11px; }
.metric strong.worker-status { font-size: 22px; }
.error-detail { font-size: 11px; max-width: 300px; }
.public { margin: 0; }
.public main { max-width: none; padding: 0; }
.public footer { border: 0; }
.auth-page { background: var(--surface); }
.auth-page .public>footer { display: none; }
.login-layout { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 46% 54%; background: var(--surface); }
.login-intro { background: var(--nav); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.login-intro .brand { align-self: flex-start; }
.login-story h1 { font-size: clamp(40px,4vw,56px); line-height: 1.12; letter-spacing: -1.6px; margin: 0 0 22px; font-weight: 600; }
.login-story h1 em { color: #ef5245; font-style: normal; }
.login-story p { color: #b7b9bd; font-size: 14px; max-width: 290px; margin: 0; }
.intro-note { color: #b0b3ba; font-size: 12px; }
.login-card { align-self: center; justify-self: center; width: 430px; max-width: 100%; padding: 40px; }
.login-card h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.6px; margin: 0 0 10px; font-weight: 600; }
.login-card .muted { font-size: 13px; margin-bottom: 30px; }
.login-card input { display: block; width: 100%; margin-bottom: 20px; }
.login-card .notice { margin-bottom: 22px; }
.login-submit { width: 100%; justify-content: space-between; min-height: 43px; margin-top: 4px; }
.login-help { font-size: 12px; text-align: center; color: var(--muted); margin: 24px 0 0; }
.sr-only,.skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip:focus { position: absolute; z-index: 10; background: var(--surface); padding: 12px; }
@media(max-width:1100px) {
  :root { --sidebar-width: 204px; }
  .sidebar { padding-inline: 14px; }
  main { padding: 26px; }
  .topbar,footer { padding-inline: 26px; }
  .page-heading { flex-wrap: wrap; gap: 18px; }
  .sync-actions { justify-content: flex-start; max-width: none; }
  .sync-actions small { text-align: left; }
  .detail-layout { grid-template-columns: minmax(0,1fr); }
  .card-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .login-intro { padding: 40px; }
}
