:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #20201e;
  background: #ffffff;
  font-synthesis: none;
  --ink: #20201e;
  --muted: #71716b;
  --subtle: #96968f;
  --line: #e6e6e1;
  --line-strong: #d4d4ce;
  --surface: #f7f7f4;
  --surface-strong: #efefeb;
  --accent: #0f766e;
  --accent-soft: #e8f5f1;
  --danger: #b42318;
  --danger-soft: #fff1ef;
  --warning: #9a5b13;
  --warning-soft: #fff8e8;
  --blue: #175cd3;
  --sidebar: 232px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; background: #fff; }
body { min-width: 320px; min-height: 100vh; min-height: 100dvh; margin: 0; background: #fff; }
body[data-modal="open"] { overflow: hidden; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
a { color: inherit; }
svg.icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.loading-screen { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.page-loading { min-height: 320px; }
.loading-mark { display: flex; align-items: center; gap: 10px; }
.loading-mark::before { content: "力"; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #20201e; font-size: 13px; font-weight: 650; }

.auth-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); background: #f7f7f4; }
.auth-panel { display: flex; flex-direction: column; min-height: 100dvh; padding: 28px 40px 36px; border-right: 1px solid var(--line); background: #fff; }
.auth-brand, .brand { display: inline-flex; align-items: center; gap: 9px; width: max-content; text-decoration: none; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: #20201e; font-size: 13px; font-weight: 700; }
.brand-copy strong, .brand-copy span { display: block; }
.brand-copy strong { font-size: 14px; font-weight: 650; }
.brand-copy span { margin-top: 1px; color: var(--subtle); font-size: 10px; }
.auth-content { width: 100%; margin: auto 0; padding: 56px 0; }
.auth-content h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.25; font-weight: 650; letter-spacing: 0; }
.auth-content > p { margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.auth-aside { position: relative; display: flex; align-items: flex-end; padding: 52px; overflow: hidden; background: #f0f1ee; }
.auth-aside::before { content: ""; position: absolute; inset: 36px; border: 1px solid #deded8; background: #f8f8f5; }
.auth-preview { position: relative; width: min(740px, 100%); margin: auto; border: 1px solid #d8d8d2; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 22px 70px rgba(40,40,30,.10); }
.preview-bar { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.preview-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d8d8d2; }
.preview-body { display: grid; grid-template-columns: 150px 1fr; min-height: 360px; }
.preview-nav { padding: 24px 14px; border-right: 1px solid var(--line); background: #fafaf8; }
.preview-nav span { display: block; height: 9px; margin: 0 0 16px; border-radius: 3px; background: #ddddD7; }
.preview-nav span:first-child { width: 78%; background: #8faaa4; }
.preview-main { padding: 34px; }
.preview-title { width: 150px; height: 15px; margin-bottom: 34px; border-radius: 3px; background: #2c2c29; }
.preview-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.preview-metrics i { height: 76px; border-right: 1px solid var(--line); }
.preview-metrics i:last-child { border: 0; }
.preview-table { margin-top: 30px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.preview-table i { display: block; height: 42px; border-bottom: 1px solid var(--line); }
.preview-table i:last-child { border: 0; }
.auth-foot { color: var(--subtle); font-size: 11px; line-height: 1.6; }

.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, .field-label { color: #4c4c47; font-size: 12px; font-weight: 600; }
.field-hint { color: var(--subtle); font-size: 11px; line-height: 1.5; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: #fff; outline: 0; transition: border-color .15s, box-shadow .15s; }
.input, .select { height: 40px; padding: 0 11px; }
.textarea { min-height: 112px; padding: 10px 11px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: #6f8f89; box-shadow: 0 0 0 3px rgba(15,118,110,.10); }
.input:disabled, .select:disabled, .textarea:disabled { color: #8b8b84; background: #f4f4f1; cursor: not-allowed; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { min-height: 18px; margin: 0; color: var(--danger); font-size: 12px; line-height: 1.45; }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: #242421; border-color: #242421; }
.button-primary:hover { background: #383834; }
.button-secondary { border-color: var(--line-strong); background: #fff; }
.button-secondary:hover { background: var(--surface); }
.button-danger { color: var(--danger); border-color: #efc6c1; background: #fff; }
.button-danger:hover { background: var(--danger-soft); }
.button-quiet { color: #555550; }
.button-quiet:hover { background: var(--surface-strong); }
.button-full { width: 100%; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 7px; color: #60605b; background: transparent; cursor: pointer; }
.icon-button:hover { color: #20201e; background: #eeeeea; }
.icon-button.danger:hover { color: var(--danger); background: var(--danger-soft); }

.shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 16px 12px 12px; border-right: 1px solid var(--line); background: #f8f8f6; }
.sidebar .brand { margin: 1px 8px 24px; }
.nav { display: grid; gap: 3px; }
.nav-link { height: 40px; display: flex; align-items: center; gap: 11px; padding: 0 11px; border-radius: 7px; color: #5c5c56; text-decoration: none; font-size: 13px; font-weight: 550; }
.nav-link:hover { color: #242421; background: #efefeb; }
.nav-link[aria-current="page"] { color: #20201e; background: #e8e8e3; font-weight: 650; }
.nav-badge { min-width: 20px; height: 19px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 10px; color: var(--danger); background: #fbe4e1; font-size: 10px; font-variant-numeric: tabular-nums; }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.logout-button { width: 100%; justify-content: flex-start; color: #676761; }
.main-shell { min-width: 0; }
.mobile-topbar { display: none; }
.mobile-spacer { width: 34px; height: 34px; }
.page { width: min(1440px, 100%); min-height: 100dvh; margin: 0 auto; padding: 38px 42px 70px; }
.page-head { min-height: 54px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-title h1 { margin: 0 0 6px; font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: 0; }
.page-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: 8px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 32px; border-block: 1px solid var(--line); }
.metric { min-width: 0; padding: 19px 22px 19px 0; }
.metric + .metric { padding-left: 22px; border-left: 1px solid var(--line); }
.metric-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.metric-value { display: block; font-size: 24px; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric-note { display: block; min-height: 17px; margin-top: 7px; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.usage-counts { display: inline-flex; align-items: baseline; gap: 9px; color: #292926; font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage-counts > span { display: inline-flex; align-items: baseline; gap: 3px; }
.usage-counts strong { font-weight: 650; }
.usage-counts small { color: var(--muted); font-size: 10px; font-weight: 600; }
.usage-counts > i { width: 1px; height: 13px; align-self: center; background: var(--line-strong); }
.metric-usage-counts { gap: 12px; }
.metric-usage-counts strong { font-size: 24px; line-height: 1.1; }
.metric-usage-counts small { font-size: 12px; }
.metric-usage-counts > i { height: 21px; }
.usage-counts-compact strong { font-size: 12px; }
.usage-cost { margin-left: auto; text-align: right; }
.section { margin-top: 34px; }
.section-head { min-height: 35px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 11px; }
.section-title h2 { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.section-title p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); text-decoration: none; font-size: 12px; font-weight: 600; }
.text-link:hover { text-decoration: underline; }

.table-tool { width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.data-table th { height: 39px; padding: 0 14px; border-bottom: 1px solid var(--line); color: #7a7a74; background: #fafaf8; text-align: left; font-size: 10px; font-weight: 650; white-space: nowrap; }
.data-table td { min-height: 52px; padding: 11px 14px; border-bottom: 1px solid #eeeeea; color: #3d3d39; font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfbf9; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-main { display: block; color: #292926; font-weight: 600; line-height: 1.45; }
.cell-sub { display: block; max-width: 250px; margin-top: 3px; overflow: hidden; color: var(--subtle); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.invitation-table { min-width: 980px; }
.invitation-table th:last-child, .invitation-table td:last-child { width: 148px; min-width: 148px; }
.archived-actions { gap: 8px; }
.archive-restore-button { height: 36px; min-width: 84px; padding: 0 13px; border: 0; border-radius: 7px; color: #2f2f2c; background: #f0f0ed; cursor: pointer; font-size: 13px; font-weight: 550; transition: background .15s, transform .1s; }
.archive-restore-button:hover { background: #e5e5e1; }
.archive-restore-button:active { transform: translateY(1px); }
.feedback-table { min-width: 1138px; table-layout: fixed; }
.feedback-table th, .feedback-table td { padding-inline: 10px; }
.feedback-table .col-number { width: 185px; }
.feedback-table .col-user { width: 160px; }
.feedback-table .col-rating { width: 74px; }
.feedback-table .col-scope { width: 90px; }
.feedback-table .col-reason { width: 135px; }
.feedback-table .col-cost { width: 80px; }
.feedback-table .col-status { width: 88px; }
.feedback-table .col-actions { width: 160px; min-width: 160px; }
.feedback-table td { height: 70px; padding-block: 12px; }
.feedback-table .feedback-topic { min-width: 0; }
.feedback-table .cell-actions { justify-content: flex-start; gap: 6px; }
.feedback-number { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.masked-code { min-width: 190px; display: flex; align-items: center; gap: 5px; }
.masked-code code { color: #3d3d39; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; white-space: nowrap; }
.masked-code .icon-button { width: 30px; height: 30px; flex: 0 0 30px; }
.legacy-code { display: block; color: var(--subtle); font-size: 11px; white-space: nowrap; }
.empty-row { padding: 42px 20px !important; color: var(--muted) !important; text-align: center; }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; border-radius: 12px; color: #555550; background: #efefeb; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #9b9b94; }
.status.enabled, .status.resolved, .status.positive { color: #126b50; background: #e9f5ef; }
.status.enabled::before, .status.resolved::before, .status.positive::before { background: #22a06b; }
.status.disabled, .status.pending { color: #875510; background: var(--warning-soft); }
.status.disabled::before, .status.pending::before { background: #d79023; }
.status.archived, .status.no_action { color: #686862; background: #eeeeea; }
.status.negative { color: var(--danger); background: var(--danger-soft); }
.status.negative::before { background: #d92d20; }
.usage-progress { width: 92px; height: 5px; display: block; margin: 6px 0 0 auto; overflow: hidden; border: 0; border-radius: 3px; background: #e8e8e3; appearance: none; }
.usage-progress::-webkit-progress-bar { border-radius: 3px; background: #e8e8e3; }
.usage-progress::-webkit-progress-value { border-radius: 3px; background: var(--accent); }
.usage-progress::-moz-progress-bar { border-radius: 3px; background: var(--accent); }
.usage-progress.is-high::-webkit-progress-value { background: #d79023; }
.usage-progress.is-high::-moz-progress-bar { background: #d79023; }
.usage-progress.is-full::-webkit-progress-value { background: #d92d20; }
.usage-progress.is-full::-moz-progress-bar { background: #d92d20; }

.toolbar { display: flex; align-items: end; gap: 10px; margin-bottom: 13px; }
.toolbar .field { width: 170px; }
.toolbar .field.search-field { width: min(300px, 100%); }
.feedback-filters { display: grid; gap: 12px; margin-bottom: 13px; }
.feedback-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.feedback-filters .field { width: auto; min-width: 0; }
.feedback-filters .input, .feedback-filters .select { min-width: 0; max-width: 100%; }
.feedback-filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feedback-filter-submit { height: 40px; min-height: 40px; }
.date-filter { position: relative; display: flex; align-items: center; padding-right: 36px; cursor: pointer; }
.date-filter:focus-within { border-color: #6f8f89; box-shadow: 0 0 0 3px rgba(15,118,110,.10); }
.date-filter-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.date-filter-value { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.date-filter-value.is-placeholder { color: #8b8b84; }
.date-filter-icon { position: absolute; right: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.feedback-filter-select { font-size: 13px; }
.feedback-filter-select.is-placeholder { color: #8b8b84; }
.feedback-filter-select option { color: var(--ink); }
.feedback-archive-toggle { margin-left: 0; }
.toolbar-spacer { flex: 1; }
.search-wrap { position: relative; }
.search-wrap .icon { position: absolute; top: 11px; left: 10px; width: 16px; height: 16px; color: var(--subtle); pointer-events: none; }
.search-wrap .input { padding-left: 34px; }
.toggle-row { height: 40px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.switch { width: 34px; height: 20px; position: relative; display: inline-block; flex: 0 0 34px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: #d8d8d2; cursor: pointer; transition: background .16s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .16s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }

.feedback-preview { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; color: var(--subtle); background: var(--surface); }
.feedback-preview img { width: 100%; height: 100%; object-fit: cover; }
.feedback-preview .icon { width: 16px; height: 16px; }
.feedback-topic { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.feedback-copy { min-width: 0; }
.feedback-detail-text { max-width: 310px; overflow: hidden; color: #555550; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.feedback-table .tag-list { align-content: center; gap: 6px; }
.tag { display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; color: #686862; background: #fafaf8; font-size: 10px; white-space: nowrap; }
.feedback-scope { min-height: 22px; display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.feedback-scope.scope-page { border-color: #b8d9d1; color: var(--accent); background: var(--accent-soft); }
.feedback-scope.scope-question { border-color: #c9d8e6; color: #365f7e; background: #f1f6fa; }
.feedback-card-list { display: none; }
.feedback-card { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.feedback-card-head, .feedback-card-badges, .feedback-card-user, .feedback-card-foot { display: flex; align-items: center; }
.feedback-card-head { justify-content: space-between; gap: 10px; }
.feedback-card-badges { gap: 7px; }
.feedback-card-number { display: block; margin-top: 11px; color: #696963; font-size: 10px; }
.feedback-card-user { gap: 10px; margin-top: 11px; }
.feedback-card-copy { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.feedback-card-copy p { display: -webkit-box; margin: 9px 0 0; overflow: hidden; color: #454541; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.feedback-card-foot { justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.feedback-card-cost small, .feedback-card-cost strong { display: block; }
.feedback-card-cost small { color: var(--subtle); font-size: 9px; }
.feedback-card-cost strong { margin-top: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.feedback-card .cell-actions { flex-wrap: wrap; gap: 5px; }
.feedback-card-empty { padding: 28px 14px; color: var(--muted); text-align: center; font-size: 12px; }
.pagination { min-height: 46px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 7px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 12px; }
.back-link:hover { color: var(--ink); }
.detail-topbar { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(270px, 340px); justify-content: space-between; gap: 46px; }
.conversation-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.conversation-head h2 { margin: 0; font-size: 14px; font-weight: 650; }
.conversation-badges { display: flex; align-items: center; gap: 7px; }
.conversation { padding-top: 26px; }
.message { display: flex; gap: 12px; margin-bottom: 27px; scroll-margin-top: 20px; }
.message-avatar { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: #20201e; font-size: 11px; font-weight: 700; }
.message-body { min-width: 0; max-width: calc(100% - 41px); }
.message-text { margin: 0; color: #31312e; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { justify-content: flex-end; }
.message.user .message-body { max-width: min(78%, 570px); padding: 9px 13px; border-radius: 8px; background: #f0f0ed; }
.message.target { margin-inline: -13px; padding: 13px; border: 1px solid #b8d9d1; border-radius: 8px; background: #f5fbf8; }
.target-label { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 650; }
.message-time { display: block; margin-top: 7px; color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }
.message-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 9px; margin-top: 11px; }
.message-media a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fafaf8; }
.message-media img { width: 100%; max-height: 360px; display: block; object-fit: contain; background: #fff; }
.message-overlay { margin: 13px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fafaf8; }
.message-overlay figcaption { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; color: #575752; font-size: 11px; font-weight: 650; }
.message-overlay figcaption .icon { width: 14px; height: 14px; color: var(--accent); }
.message-overlay a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.message-overlay img { width: 100%; max-height: 520px; display: block; object-fit: contain; }
.message-overlay-missing { margin: 11px 0 0; padding: 9px 10px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); background: #fafaf8; font-size: 10px; line-height: 1.5; }
.case-expired { padding: 30px 18px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.detail-side { position: sticky; top: 28px; align-self: start; }
.detail-section { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; }
.detail-section h2 { margin: 0 0 13px; color: #575752; font-size: 11px; font-weight: 650; }
.facts { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 12px; margin: 0; }
.facts dt { color: var(--subtle); font-size: 11px; }
.facts dd { min-width: 0; margin: 0; color: #363633; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.review-form { display: grid; gap: 12px; }
.detail-main { min-width: 0; }
.workflow-section { margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.workflow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.workflow-head h2 { margin: 3px 0 6px; font-size: 18px; font-weight: 680; letter-spacing: -.01em; }
.workflow-head p { max-width: 570px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.route-pill, .scope-pill { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.route-pill { min-height: 28px; padding: 0 10px; color: #575752; background: #fafaf8; font-size: 10px; font-weight: 650; }
.route-pill.route-a1 { border-color: #e5c8c5; color: #9a3e35; background: #fff7f5; }
.route-pill.route-a2 { border-color: #bfd6eb; color: #265e8a; background: #f4f9fd; }
.route-pill.route-a3 { border-color: #b8d9d1; color: var(--accent); background: #f3faf7; }
.reprice-banner { margin: 0 0 17px; padding: 10px 12px; border: 1px solid #ead8ad; border-radius: 7px; color: #735c22; background: #fffbef; font-size: 10px; line-height: 1.55; }
.flow-list { position: relative; }
.flow-list::before { content: ""; position: absolute; top: 18px; bottom: 24px; left: 14px; width: 1px; background: var(--line); }
.flow-stage { position: relative; display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; }
.flow-index { z-index: 1; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #b8d9d1; border-radius: 50%; color: var(--accent); background: #fff; font-size: 10px; font-weight: 700; }
.flow-stage.has-error .flow-index { border-color: #e1bdb8; color: #a4453c; }
.flow-content { min-width: 0; padding: 1px 0 0; }
.flow-stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.flow-stage-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.flow-stage-title h3 { margin: 0; font-size: 13px; font-weight: 650; }
.scope-pill { min-height: 20px; padding: 0 7px; color: var(--muted); background: var(--surface); font-size: 9px; }
.flow-stage-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.flow-stage-cost { flex: 0 0 auto; text-align: right; }
.flow-stage-cost strong, .flow-stage-cost span { display: block; }
.flow-stage-cost strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.flow-stage-cost span { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.flow-calls { margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fbfbf9; }
.flow-calls summary { padding: 9px 11px; color: #555550; cursor: pointer; font-size: 10px; font-weight: 600; }
.flow-calls[open] summary { border-bottom: 1px solid var(--line); }
.flow-call-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.flow-call-table th, .flow-call-table td { padding: 8px 10px; border-bottom: 1px solid #ecece7; text-align: left; vertical-align: top; }
.flow-call-table tbody tr:last-child td { border-bottom: 0; }
.flow-call-table th { color: var(--subtle); font-weight: 600; white-space: nowrap; }
.flow-call-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.flow-call-table .status { min-height: 20px; padding-inline: 6px; font-size: 8px; }
.flow-no-calls { margin: 8px 0 0; color: var(--subtle); font-size: 9px; }
.price-note { display: block; margin-top: 2px; color: #8a6b1f; font-size: 8px; }
.model-cost-list { display: grid; gap: 9px; }
.model-cost-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid #ededE8; }
.model-cost-item:last-child { padding-bottom: 0; border-bottom: 0; }
.model-cost-item strong, .model-cost-item span { display: block; }
.model-cost-item strong { font-size: 10px; overflow-wrap: anywhere; }
.model-cost-item span { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.model-cost-values { flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 640px) minmax(260px, 1fr); gap: 56px; align-items: start; }
.settings-section { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.settings-section:last-child { border-bottom: 0; }
.settings-section h2 { margin: 0 0 6px; font-size: 14px; font-weight: 650; }
.settings-section > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.settings-aside-title { margin-bottom: 12px; }
.audit-list { border-top: 1px solid var(--line); }
.audit-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.audit-item strong { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 600; }
.audit-item span { display: block; color: var(--subtle); font-size: 10px; line-height: 1.45; }
.audit-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.audit-pagination .icon-button { width: 30px; height: 30px; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(28,28,25,.34); backdrop-filter: blur(2px); }
.modal { width: min(470px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(30,30,25,.20); }
.modal-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0 0 3px; font-size: 15px; font-weight: 650; }
.modal-head p { margin: 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 19px 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 17px; border-top: 1px solid var(--line); background: #fafaf8; }
.code-reveal { padding: 15px; border: 1px solid #b8d9d1; border-radius: 7px; background: #f4fbf8; }
.code-reveal-label { display: block; margin-bottom: 9px; color: var(--accent); font-size: 11px; font-weight: 650; }
.code-row { display: flex; align-items: center; gap: 8px; }
.code-value { min-width: 0; flex: 1; padding: 9px 10px; overflow: hidden; border: 1px solid #cde4de; border-radius: 6px; background: #fff; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.code-warning { margin: 11px 0 0; color: #5d6a66; font-size: 10px; line-height: 1.55; }
.confirm-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.toast-region { position: fixed; z-index: 100; top: 18px; right: 18px; width: min(360px, calc(100% - 36px)); display: grid; gap: 8px; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: #393936; background: #fff; box-shadow: 0 10px 32px rgba(30,30,25,.13); font-size: 12px; line-height: 1.5; }
.toast.error { color: var(--danger); border-color: #efc6c1; }
.toast .icon { margin-top: 1px; }
.sidebar-backdrop { display: none; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: minmax(300px, 430px) 1fr; }
  .auth-aside { padding: 24px; }
  .preview-body { grid-template-columns: 110px 1fr; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(var(--sidebar), 84vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(30,30,25,.13); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 59; inset: 0; display: block; border: 0; background: rgba(28,28,25,.28); }
  .mobile-topbar { position: sticky; z-index: 30; top: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .mobile-topbar .brand-copy span { display: none; }
  .page { min-height: calc(100dvh - 54px); padding: 28px 24px 60px; }
  .feedback-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 38px; }
}

@media (max-width: 720px) {
  .auth-layout { display: block; background: #fff; }
  .auth-panel { min-height: 100dvh; padding: 22px 20px 28px; border: 0; }
  .auth-content { max-width: 430px; margin: auto; padding: 54px 0; }
  .auth-aside { display: none; }
  .page { padding: 23px 15px 48px; }
  .page-head { min-height: 0; display: block; margin-bottom: 22px; }
  .page-actions { margin-top: 15px; }
  .page-actions .button { width: 100%; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 15px 14px 15px 0; }
  .metric + .metric { padding-left: 14px; }
  .metric:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .metric:nth-child(4) { border-top: 1px solid var(--line); }
  .metric-value { font-size: 21px; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .toolbar .field, .toolbar .field.search-field { width: calc(50% - 5px); }
  .toolbar .field.search-field { width: 100%; }
  .feedback-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .feedback-filter-actions { min-height: 40px; }
  .feedback-filter-actions .toggle-row { width: auto; }
  .feedback-filter-submit { min-width: 88px; }
  .toolbar-spacer { display: none; }
  .toggle-row { width: 100%; }
  .feedback-archive-toggle { width: auto; margin-left: 0; }
  .data-table th, .data-table td { padding-inline: 11px; }
  .feedback-list-table-wrap { display: none; }
  .feedback-card-list { display: grid; gap: 10px; padding: 10px; background: var(--surface); }
  .detail-layout, .settings-grid { grid-template-columns: 1fr; gap: 32px; }
  .detail-side { position: static; }
  .conversation { padding-top: 20px; }
  .workflow-head, .flow-stage-head { display: block; }
  .route-pill { margin-top: 12px; }
  .flow-stage-cost { margin-top: 8px; text-align: left; }
  .message.user .message-body { max-width: 88%; }
  .field-row { grid-template-columns: 1fr; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 88dvh; border-width: 1px 0 0; border-radius: 8px 8px 0 0; }
  .toast-region { top: 10px; right: 10px; width: calc(100% - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
