/*
 * heiniuapp / Tabler 1.6 presentation adapter.
 * 只映射现有 DOM 的视觉样式；不新增事件，不更改字段、请求和业务状态。
 * Tabler 放在低优先级层，避免 Bootstrap 的通用类覆盖现有 Tailwind 工具类。
 */
:root {
  --console-bg: #f3f5f8;
  --console-surface: #ffffff;
  --console-soft: #f7f8fa;
  --console-text: #202733;
  --console-muted: #5d6675;
  --console-border: #dfe3e9;
  --console-primary: #2864cf;
  --console-primary-hover: #2052ad;
  --console-primary-soft: #edf3ff;
  --console-danger: #b42332;
  --console-success: #2864cf;
  --console-radius: 8px;
  --console-font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --tblr-primary: var(--console-primary);
  --tblr-body-bg: var(--console-bg);
  --tblr-body-color: var(--console-text);
  --tblr-font-sans-serif: var(--console-font);
  color-scheme: light;
}

html { min-width: 320px; background: var(--console-bg); scrollbar-gutter: stable; scroll-padding-top: 160px; }
body {
  margin: 0;
  background: var(--console-bg);
  color: var(--console-text);
  font-family: var(--console-font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
input, textarea { caret-color: var(--console-primary); }
::selection { background: #d5e7fc; color: #122e50; }
* { scrollbar-color: #adb9c8 transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #adb9c8; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #a8cef6;
  outline-offset: 3px;
}

/* 固定导航只负责导航；页面滚动仍由原有 window 滚动逻辑管理。 */
.vben-shell { display: block; min-height: 100vh; background: var(--console-bg); }
.vben-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 208px;
  height: 100dvh;
  border-right: 1px solid var(--console-border);
  color: var(--console-text);
  background: var(--console-surface);
  box-shadow: none;
}
.vben-sidebar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  height: 68px;
  padding: 0 22px;
  border: 0;
}
.vben-sidebar-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #fff;
  background: var(--console-primary);
  font-size: 19px;
  font-weight: 700;
  box-shadow: none;
}
.vben-sidebar-name { color: var(--console-text); font-size: 18px; font-weight: 700; letter-spacing: -.035em; }
.vben-sidebar-sub { margin-top: 2px; color: var(--console-muted); font-size: 10px; letter-spacing: .02em; }
.vben-nav-scroll { flex: 1; overflow-y: auto; padding: 8px 12px 24px; }
.vben-nav-group { margin: 0 0 12px; }
.vben-nav-group-title { padding: 4px 12px 9px; color: #697588; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.vben-nav-group-list { display: grid; gap: 4px; }
.vben-nav {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: #485569;
  background: transparent;
  text-align: left;
  box-shadow: none;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}
.vben-nav::before { display: none; }
.vben-nav:hover { color: var(--console-text); background: #f2f5f9; transform: none; }
.vben-nav-active, .vben-nav-active:hover { color: var(--console-primary); background: var(--console-primary-soft); }
.vben-nav-icon { display: inline-flex; width: 20px; height: 20px; color: currentColor; flex-shrink: 0; }
.vben-nav-icon svg, .vben-nav-arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.vben-nav-icon svg path:first-child:last-child { fill: none; stroke: currentColor; }
.vben-nav-label { font-size: 14px; font-weight: 500; }
.vben-nav-active .vben-nav-label { font-weight: 600; }
.vben-nav-arrow { width: 14px; height: 14px; margin-left: auto; opacity: .6; color: currentColor; }
.vben-sidebar-foot { margin: 0 24px 22px; min-height: 32px; padding-top: 12px; border: 0; border-top: 1px solid var(--console-border); border-radius: 0; color: var(--console-muted); background: transparent; font-size: 12px; }
.vben-sidebar-dot { width: 6px; height: 6px; background: var(--console-success); box-shadow: none; }
.vben-main { min-width: 0; padding-left: 208px; }
.vben-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--console-border);
  background: var(--console-surface);
  box-shadow: none;
  backdrop-filter: none;
}
.vben-topbar .text-slate-400 { color: var(--console-muted); font-size: 12px; }
.vben-topbar .text-slate-950 { margin-top: 3px; color: var(--console-text); font-size: 13px; font-weight: 500; }
.vben-topbar > .flex { flex-shrink: 0; }
.vben-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 20px 24px;
}
.vben-content > * { animation: none; min-width: 0; }
.vben-content > .grid:not(.vben-metric-grid) { gap: 14px; }
/* 单份操作栏吸顶，不克隆按钮，保留原有 querySelector 事件绑定。 */
.vben-page-header {
  position: sticky;
  top: 56px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: 84px;
  padding: 14px 0;
  border-bottom: 1px solid var(--console-border);
  background: var(--console-bg);
}
.vben-page-header > div:first-child { min-width: 0; }
.vben-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; gap: 8px; }
.vben-page-actions:empty { display: none; }
.vben-content :is(input, select, textarea, button) { scroll-margin-top: 160px; }
.vben-title { color: var(--console-text); font-size: 22px; line-height: 1.35; font-weight: 650; letter-spacing: -.025em; }
.vben-subtitle { max-width: 74ch; margin-top: 4px; color: var(--console-muted); font-size: 13px; line-height: 1.7; }
.vben-content h2 { color: var(--console-text); font-size: 16px; font-weight: 600; line-height: 1.5; }
.vben-content .text-slate-950, .vben-content .text-slate-900 { color: var(--console-text); }
.vben-content .text-slate-400, .vben-content .text-slate-500, .vben-muted { color: var(--console-muted); }
.vben-content .text-slate-600, .vben-content .text-slate-700 { color: #485569; }
.vben-content .text-emerald-600 { color: var(--console-primary); }
.vben-card, .vben-card-tight {
  min-width: 0;
  border: 1px solid var(--console-border);
  border-radius: var(--console-radius);
  background: var(--console-surface);
  box-shadow: none;
  transition: none;
}
.vben-card { padding: 16px; }
.vben-card-tight { padding: 14px; }
.vben-card:hover, .vben-card-tight:hover { transform: none; box-shadow: none; }
.vben-card > h2:first-child, .vben-card > div:first-child:has(> h2), .vben-card > .flex:first-child:has(h2) { padding-bottom: 10px; border-bottom: 1px solid #e8ecf1; margin-bottom: 2px; }
.vben-card > p { line-height: 1.7; }
.vben-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.vben-resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.vben-service-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.vben-metric-card { min-height: 112px; padding: 16px; background: var(--console-surface); }
.vben-metric-card .vben-metric-value { margin-top: 8px; }
.vben-metric-value { color: var(--console-text); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.vben-metric-icon, .vben-resource-icon { width: 36px; height: 36px; border-radius: 6px; color: var(--console-primary); background: var(--console-primary-soft); box-shadow: none; filter: none; animation: none; }
.vben-metric-icon svg *, .vben-resource-icon svg * { fill: none; stroke: currentColor; stroke-width: 1.6; }
.vben-metric-foot { color: var(--console-muted); font-size: 12px; }
.vben-chart-wrap { border: 0; border-radius: 0; background: transparent; }
.vben-chart-grid, .vben-chart-area, .vben-chart-line, .vben-chart-dot { animation: none; }
.vben-chart-axis text { fill: var(--console-muted); }

/* 只对齐标签，不限制填写区宽度；表单和字段仍由原来的保存流程读取。 */
.vben-label { display: block; margin-bottom: 5px; color: #344256; font-size: 13px; font-weight: 500; line-height: 1.6; }
.vben-input, .vben-textarea {
  width: 100%;
  border: 1px solid #bcc6d2;
  border-radius: 6px;
  color: var(--console-text);
  background: #fff;
  box-shadow: none;
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.vben-input { min-height: 36px; padding: 7px 10px; }
select.vben-input { padding-right: 30px; }
.vben-textarea { min-height: 94px; padding: 10px 12px; line-height: 1.7; resize: vertical; }
.vben-input:hover, .vben-textarea:hover { border-color: #8f9dac; }
.vben-input:focus, .vben-textarea:focus { outline: 0; border-color: var(--console-primary); box-shadow: 0 0 0 3px #206bc41f; }
.vben-input::placeholder, .vben-textarea::placeholder { color: #687587; opacity: 1; }
.vben-content form.grid, .vben-content form .vben-card.grid { gap: 12px; }
.vben-content form label:has(> .vben-input), .vben-content form label:has(> .vben-textarea) { min-width: 0; }
.vben-content form label:has(> input[type="checkbox"]) { width: fit-content; min-height: 40px; gap: 10px; border: 0; border-radius: 4px; padding: 4px 0; background: transparent; color: #344256; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--console-primary); cursor: pointer; }
.vben-content form > .bg-slate-50 { border: 1px solid #e5eaf0; border-radius: 6px; padding: 10px 12px; background: var(--console-soft); line-height: 1.7; font-variant-numeric: tabular-nums; }
.vben-sync-status { padding: 10px 12px; border-left: 2px solid var(--console-primary); background: var(--console-soft); font-size: 13px; }
.vben-sync-status h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.vben-sync-status dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
.vben-sync-status dt { color: var(--console-muted); font-weight: 400; }
.vben-sync-status dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.vben-status-warning { margin: 6px 0 0; color: #875811; overflow-wrap: anywhere; }
.vben-content form > button[data-action] { justify-self: start; }
.vben-btn, .setup-button, .install-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid #bcc6d2;
  border-radius: 6px;
  color: #344256;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
.vben-btn:hover, .setup-button:hover { border-color: #8f9dac; color: #182433; background: #f5f7fa; transform: none; box-shadow: none; }
.vben-btn-primary, .setup-button-primary, .setup-submit { border-color: var(--console-primary); color: #fff; background: var(--console-primary); }
.vben-btn-primary:hover, .setup-button-primary:hover, .setup-submit:hover { border-color: var(--console-primary-hover); color: #fff; background: var(--console-primary-hover); }
.vben-btn-danger { border-color: #ecc9ce; color: var(--console-danger); background: #fff; }
.vben-btn-danger:hover { color: #9a1825; border-color: #df9da6; background: #fff3f4; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.vben-btn svg { width: 17px; height: 17px; }

/* 普通表格将窄列留给开关/排序，文本字段利用剩余宽度；小屏只在表格内滚动。 */
.vben-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--console-border); border-radius: 6px; background: #fff; }
.vben-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.vben-table th { padding: 10px 12px; border-bottom: 1px solid var(--console-border); color: #526176; background: #f6f8fb; font-size: 12px; line-height: 1.5; font-weight: 600; text-align: left; white-space: nowrap; }
.vben-table td { padding: 10px 12px; border-bottom: 1px solid #e8ecf1; color: #344256; vertical-align: top; line-height: 1.65; }
.vben-table tbody tr:last-child td { border-bottom: 0; }
.vben-table tbody tr { background: #fff; }
.vben-table tbody tr:hover { background: #fafbfd; }
.vben-table .vben-input { min-height: 36px; padding: 7px 10px; font-size: 13px; }
/* 数字字段保留可读宽度，列数较多时由表格容器横滚，不能压扁输入内容。 */
.vben-table input[data-field="sort"],
.vben-table input[data-field="movie_id"],
.vben-table input[data-field="type_id"],
.vben-table input[data-field="columns"] { min-width: 80px; }
.vben-table .vben-textarea { min-height: 76px; font-size: 13px; }
.vben-table .vben-btn { min-height: 34px; padding: 7px 11px; }
.vben-table input[type="checkbox"] { margin-top: 9px; }
.vben-table td:last-child { white-space: nowrap; }
.vben-table td.text-center { padding: 32px 16px; color: var(--console-muted); }
.vben-table[data-table]:not(.vben-parser-table) td:has(input[type="checkbox"]),
.vben-table[data-table]:not(.vben-parser-table) td:has(input[data-field="sort"]),
.vben-table[data-table]:not(.vben-parser-table) td:last-child { width: 1%; }
.vben-table[data-table]:not(.vben-parser-table) td:has(input[data-field="movie_id"]),
.vben-table[data-table]:not(.vben-parser-table) td:has(input[data-field="type_id"]),
.vben-table[data-table]:not(.vben-parser-table) td:has(input[data-field="columns"]) { width: 112px; }
.vben-table[data-table]:not(.vben-parser-table) :is(.vben-input, .vben-textarea) { min-width: 120px; }
.vben-table[data-table]:not(.vben-parser-table) :is(input[data-field="sort"], input[data-field="movie_id"], input[data-field="type_id"], input[data-field="columns"]) { width: 80px; min-width: 80px; }

/* 解析源使用原生紧凑表格，每行一条；不改变字段及 readRows 保存语义。 */
.vben-playback-rules { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; padding: 12px 14px; }
.vben-playback-rules > label:last-child { display: flex; align-items: center; gap: 12px; }
.vben-playback-rules > label:last-child .vben-label { margin: 0; }
.vben-playback-rules input[type="number"] { width: 88px; }
.vben-parser-table { width: 100%; min-width: 1000px; table-layout: fixed; }
.vben-parser-table th, .vben-parser-table td { padding: 6px 7px; vertical-align: middle; }
.vben-parser-table th { height: 34px; }
.vben-parser-table th:nth-child(1) { width: 40px; }
.vben-parser-table th:nth-child(2) { width: 88px; }
.vben-parser-table th:nth-child(3) { width: 100px; }
.vben-parser-table th:nth-child(4) { width: 108px; }
.vben-parser-table th:nth-child(6) { width: 124px; }
.vben-parser-table th:nth-child(7) { width: 82px; }
.vben-parser-table th:nth-child(9) { width: 62px; }
.vben-parser-table label { position: relative; display: block; width: 100%; min-width: 0; }
/* 表头负责视觉标签，隐藏重复文案但保留输入控件的无障碍名称。 */
.vben-parser-table label > .vben-label { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vben-parser-table .vben-input, .vben-parser-table input[data-field="sort"] { width: 100%; min-width: 0; min-height: 32px; padding: 5px 7px; }
.vben-parser-table select.vben-input { padding: 5px; }
.vben-parser-table .vben-textarea { width: 100%; min-width: 0; min-height: 56px; height: 56px; padding: 6px 7px; line-height: 1.5; font-family: inherit; }
.vben-parser-check { display: flex; align-items: center; justify-content: center; height: 32px; }
.vben-parser-table input[type="checkbox"] { margin: 0; }
.vben-parser-table .vben-btn { width: 100%; min-height: 32px; padding: 5px 7px; }
.vben-pill { display: inline-flex; align-items: center; padding: 3px 9px; border: 1px solid #dce3ec; border-radius: 5px; color: #536277; background: #f4f6fa; font-size: 12px; line-height: 1.5; font-weight: 500; }
.vben-pill-ok { border-color: #d2dff4; color: #2457a7; background: #edf3ff; }
.vben-pill-warn { border-color: #efdbb3; color: #875811; background: #fff8e9; }
.vben-tabs { gap: 4px; border: 1px solid var(--console-border); border-radius: 6px; background: #fff; }
.vben-tab { padding: 8px 14px; border-radius: 4px; color: var(--console-muted); }
.vben-tab-active { color: var(--console-primary); background: var(--console-primary-soft); }
.vben-toast {
  position: fixed;
  inset: 16px auto auto 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 1000;
  width: fit-content;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--console-text);
  box-shadow: 0 4px 18px #20273326;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.vben-toast-ok { background: #edf3ff; color: #204e94; }
.vben-toast-error { background: #fff0f1; color: #a32234; }
.vben-toast-ok::before { content: ''; width: 14px; height: 8px; flex-shrink: 0; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(-45deg); }
.vben-skeleton { border-radius: 6px; background: #e3e8ee; }

/* 登录和安装保留原始提交、连接测试和安装锁，仅统一视觉。 */
#app > main:has(#login-form) { min-height: 100dvh; background: var(--console-bg); }
#app > main:has(#login-form) > section:first-child { background: #182433; color: #fff; }
#app > main:has(#login-form) > section:first-child > * { background: transparent; }
#app > main:has(#login-form) > section:first-child .text-slate-950 { color: #f5f8fc; }
#app > main:has(#login-form) > section:first-child .text-slate-500,
#app > main:has(#login-form) > section:first-child .text-slate-400 { color: #b8c6d7; }
#app > main:has(#login-form) > section:first-child .bg-white\/5 { border-color: #344457; background: #202f40; }
#app > main:has(#login-form) > section:first-child .text-slate-300 { color: #b8c6d7; }
#login-form { width: 100%; max-width: 420px; padding: 32px; border: 1px solid var(--console-border); border-radius: 10px; background: #fff; box-shadow: none; }
#login-form .text-2xl { color: var(--console-text); font-size: 24px; font-weight: 650; }
#login-form .vben-btn-primary { min-height: 42px; }
.setup-shell { color: var(--console-text); background: var(--console-bg); font-family: var(--console-font); }
.setup-topbar { height: 66px; border-bottom: 1px solid var(--console-border); background: #fff; box-shadow: none; }
.setup-topbar-inner, .setup-container { width: min(1040px, calc(100% - 48px)); }
.setup-brand-logo { background: var(--console-primary); border-radius: 8px; box-shadow: none; }
.setup-brand-name { font-size: 18px; color: var(--console-text); }
.setup-container { padding: 36px 0 48px; }
.setup-page-eyebrow, .setup-capabilities, .setup-page-header::after { display: none; }
.setup-page-header { margin: 0; padding: 0 0 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.setup-page-header h1 { color: var(--console-text); font-size: 28px; font-weight: 650; letter-spacing: -.025em; }
.setup-page-header p, .setup-section-title p, .setup-form-heading p { color: var(--console-muted); }
.setup-state { border: 1px solid var(--console-border); border-radius: 6px; color: #526176; background: #fff; }
.setup-progress { margin: 0 0 20px; padding: 20px 24px; border: 1px solid var(--console-border); border-radius: 8px; background: #fff; box-shadow: none; }
.setup-progress li.is-active > span { border-color: var(--console-primary); background: var(--console-primary); box-shadow: none; }
.setup-progress li.is-active strong { color: var(--console-primary); }
.setup-workspace { display: block; overflow: visible; border: 1px solid var(--console-border); border-radius: 8px; background: #fff; box-shadow: none; }
.setup-side-nav { display: none; }
.setup-form { padding: 28px 32px 0; }
.setup-form-heading { padding-bottom: 24px; border-bottom-color: var(--console-border); }
.setup-form-heading h2 { color: var(--console-text); font-size: 20px; }
.setup-form-notice { border: 1px solid #e6d4af; border-radius: 6px; color: #775117; background: #fff9ee; }
.setup-form-section { padding: 26px 0; border-bottom-color: #e8ecf1; }
.setup-section-title h3 { color: var(--console-text); font-size: 16px; font-weight: 600; }
.setup-form .vben-input { height: 40px; border-radius: 6px; }
.setup-form-footer { margin: 0 -32px; padding: 18px 32px; border-top: 1px solid var(--console-border); background: #fff; backdrop-filter: none; }
.setup-success { border: 1px solid var(--console-border); border-radius: 8px; background: #fff; box-shadow: none; }

@media (min-width: 1100px) {
  .vben-content form.vben-card:not(#playback-rules-form) > label:has(> .vben-label),
  .vben-content form .vben-card > label:has(> .vben-label),
  .vben-content form.vben-card:not(#playback-rules-form) > .grid > label:has(> .vben-label) {
    display: grid;
    grid-template-columns: 156px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }
  .vben-content form.vben-card > label > .vben-label,
  .vben-content form .vben-card > label > .vben-label,
  .vben-content form.vben-card:not(#playback-rules-form) > .grid > label > .vben-label { padding-top: 7px; margin-bottom: 0; }
  #home-layout-form > label:has(> select) { display: grid; grid-template-columns: 156px minmax(0, 1fr); align-items: center; }
  #home-layout-form > .grid:has(input[type="checkbox"]) { display: flex; gap: 24px; padding-left: 172px; }
}
@media (max-width: 1199px) {
  .vben-content { padding: 0 16px 24px; }
  .vben-topbar { padding: 0 16px; }
  .vben-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vben-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 959px) {
  /* 移动端不新增折叠菜单事件，现有导航继续可见且可横向滑动。 */
  .vben-sidebar { position: relative; inset: auto; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--console-border); }
  .vben-sidebar-brand { height: 56px; padding: 0 20px; }
  .vben-sidebar-logo { width: 32px; height: 32px; font-size: 17px; }
  .vben-sidebar-name { font-size: 17px; }
  .vben-sidebar-foot, .vben-nav-group-title, .vben-nav-arrow { display: none; }
  .vben-nav-scroll { display: flex; flex: auto; overflow-x: auto; overflow-y: hidden; gap: 12px; padding: 2px 16px 12px; }
  .vben-nav-group { display: contents; }
  .vben-nav-group-list { display: flex; gap: 4px; }
  .vben-nav { min-width: max-content; min-height: 44px; padding: 10px 12px; gap: 7px; }
  .vben-nav-icon { width: 18px; height: 18px; }
  .vben-nav-label { font-size: 13px; }
  .vben-main { padding-left: 0; }
  .vben-topbar { position: relative; height: 56px; padding: 0 20px; }
  .vben-content { padding: 0 16px 24px; }
  .vben-page-header { top: 0; flex-wrap: wrap; }
  .vben-page-actions { justify-content: flex-start; }
  .vben-content .vben-input, .vben-content .vben-btn { min-height: 44px; }
  .vben-parser-check { height: 44px; }
}
@media (max-width: 639px) {
  .vben-topbar { gap: 12px; }
  .vben-topbar > .min-w-0 { max-width: calc(100% - 75px); }
  .vben-topbar button[data-action="refresh"] { display: none; }
  .vben-content { padding: 0 12px 24px; gap: 12px; }
  .vben-page-header { display: block; padding: 12px 0; }
  .vben-page-header .vben-subtitle { display: none; }
  .vben-page-actions { margin-top: 10px; }
  .vben-page-actions .vben-btn { flex: 1; padding: 8px 10px; }
  .vben-title { font-size: 22px; }
  .vben-subtitle { font-size: 13px; }
  .vben-content .grid { grid-template-columns: minmax(0, 1fr); }
  .vben-content .vben-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .vben-resource-grid, .vben-service-grid { grid-template-columns: minmax(0, 1fr); }
  .vben-metric-card { min-height: 116px; padding: 14px; }
  .vben-metric-value { font-size: 26px; }
  .vben-metric-icon { width: 30px; height: 30px; }
  .vben-card { padding: 14px; }
  .vben-card-tight { padding: 12px; }
  .vben-table { min-width: 680px; }
  .vben-parser-table { min-width: 1000px; }
  .vben-playback-rules { gap: 8px; }
  .vben-content form > .bg-slate-50 { overflow-wrap: anywhere; }
  #app > main:has(#login-form) { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
  #app > main:has(#login-form) > section:first-child { display: none; }
  #app > main:has(#login-form) > section:last-child { width: 100%; padding: 0; }
  #login-form { padding: 28px 24px; }
  .setup-topbar-inner, .setup-container { width: calc(100% - 32px); }
  .setup-topbar-meta, .setup-brand-divider, .setup-brand-product, .setup-state, .setup-breadcrumb { display: none; }
  .setup-container { padding: 26px 0; }
  .setup-page-header { display: block; }
  .setup-page-header h1 { font-size: 24px; }
  .setup-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 8px; }
  .setup-progress li { justify-content: center; }
  .setup-progress li > div, .setup-progress li:not(:last-child)::after { display: none; }
  .setup-form { padding: 22px 18px 0; }
  .setup-form-heading { display: block; }
  .setup-form-notice { max-width: none; margin-top: 16px; }
  .setup-fields, .setup-fields-three { grid-template-columns: 1fr; gap: 18px; }
  .setup-form-footer { position: static; flex-direction: column; align-items: stretch; margin: 0 -18px; padding: 18px; }
  .setup-submit, .setup-inline-action .setup-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

.console-app-theme { min-width: 0; margin: 0; padding: 0; border: 0; }
.console-app-theme-label { float: none; width: auto; margin: 0 0 8px; padding: 0; color: var(--console-text); font-size: 13px; font-weight: 500; line-height: 1.6; }
.console-app-theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 400px; }
.console-app-theme-option { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; margin: 0; padding: 10px 14px; border: 1px solid var(--console-border); border-radius: 6px; color: var(--console-text); background: var(--console-surface); cursor: pointer; }
.console-app-theme-option:hover { border-color: var(--console-primary); }
.console-app-theme-option:has(input:checked) { border-color: var(--console-primary); background: var(--console-primary-soft); }
.console-app-theme-option:has(input:focus-visible) { outline: 2px solid var(--console-primary); outline-offset: 3px; }
.console-app-theme-option input:focus-visible { outline: 0; }
.console-app-theme-help { max-width: 72ch; margin: 8px 0 0; color: var(--console-muted); font-size: 12px; line-height: 1.7; }
@media (min-width: 1100px) {
  .console-app-theme { position: relative; }
  .console-app-theme-label { position: absolute; top: 0; left: 0; width: 156px; margin: 0; padding-top: 13px; }
  .console-app-theme-body { margin-left: 172px; }
}
