:root {
  --yellow: #ffe60f;
  --yellow-dark: #ffac05;
  --text: #333;
  --muted: #a3a3a3;
  --line: rgba(0, 0, 0, 0.08);
  --page: #f7f7f7;
  --blue: #0daeff;
  --red: #ff4f24;
  --green: #49cc6a;
}

/* 2026 navigation and card-vault workspace */
@media (min-width: 761px) {
  .first-nav { width: 184px; flex-basis: 184px; background: #292b2f; }
  .first-nav-list { padding: 8px 0 18px; scrollbar-color: rgba(255,255,255,.18) #292b2f; }
  .first-nav-list::-webkit-scrollbar-track { background: #292b2f; }
  .nav-group { padding: 0 0 4px; }
  .nav-group + .nav-group { margin-top: 2px; }
  .nav-group-trigger { width: 100%; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 18px; color: #9da1a8; border: 0; background: transparent; font-size: 13px; }
  .nav-group-trigger > span { display: flex; align-items: center; gap: 8px; }
  .nav-group-trigger > span svg { width: 16px; height: 16px; }
  .nav-group-trigger > svg { width: 14px; height: 14px; transition: transform .18s ease; }
  .nav-group:hover .nav-group-trigger, .nav-group.active .nav-group-trigger { color: var(--yellow); }
  .nav-group.collapsed .nav-group-trigger > svg { transform: rotate(-90deg); }
  .nav-group.collapsed .nav-group-links { display: none; }
  .nav-group-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 9px 6px; }
  .nav-group-links .nav-item, .nav-group-links .nav-item-wrap { width: 100%; }
  .nav-group-links .nav-item { min-height: 34px; justify-content: flex-start; padding: 0 9px; color: #b6b8bd; border-radius: 4px; background: transparent; font-size: 13px; line-height: 34px; }
  .nav-group-links .nav-item:hover, .nav-group-links .nav-item:focus { color: #fff; background: rgba(255,255,255,.07); }
  .nav-group-links .nav-item.active { color: #1f2023; background: var(--yellow); font-weight: 600; }
  .nav-group-links .nav-item > em { top: 2px; right: 2px; }
  .nav-group-links .nav-item-wrap { position: relative; }
  .nav-group-links .im-inbox-nav { padding-right: 24px; }
  .nav-group-links .nav-read-all { right: 3px; bottom: 7px; }
  .sec-nav { width: 156px; }
  .sec-nav-head, .sec-nav-list { width: 156px; }
  .sec-nav-head p { text-indent: 22px; }
  .sec-nav-item { padding: 0 22px; }
  .fold-btn { left: 327px; }
  .left-aside.folded .fold-btn { left: 171px; }
  .main-content { width: calc(100% - 340px); margin-left: 340px; }
  body.no-secondary .main-content, body.nav-folded .main-content { width: calc(100% - 184px); margin-left: 184px; }
  body.service-workbench-active .left-aside { width: 340px; }
  body.service-workbench-active .main-content, body.service-workbench-active.no-secondary .main-content, body.service-workbench-active.nav-folded .main-content { width: calc(100% - 340px); margin-left: 340px; }
}

.top-header { height: 64px; box-shadow: 0 1px 0 rgba(17,24,39,.03); }
.top-nav-item, .user-info { transition: color .15s ease, background .15s ease; }
.top-nav-item:hover, .user-info:hover { color: #25272b; background: #fafafa; }
.home-container { height: auto; padding-top: 12px; }
.home-module { border: 1px solid #eceef1; box-shadow: 0 2px 7px rgba(23,30,38,.025); }
.home-stat-item { border-color: #e7e9ed; }
.reference-container-act, .enterprise-table-panel { border: 1px solid #eceef1; box-shadow: 0 2px 8px rgba(23,30,38,.025); }

.card-vault-view { min-height: calc(100vh - 64px); padding: 16px; overflow: auto; background: #f5f6f8; }
.vault-page-head { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border: 1px solid #eceef1; border-radius: 6px; background: #fff; }
.vault-page-head > div { min-width: 0; }
.vault-page-head h1 { margin-top: 2px; color: #25272b; font-size: 20px; font-weight: 650; line-height: 28px; }
.vault-page-head p { color: #858a93; font-size: 12px; }
.vault-eyebrow { color: #a16c00; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.vault-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.vault-metric { min-width: 0; min-height: 94px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid #e8eaed; border-radius: 6px; background: #fff; }
.vault-metric > span { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border-radius: 8px; background: #fff5cc; color: #b98400; }
.vault-metric > span svg { width: 21px; height: 21px; }
.vault-metric.mint > span { color: #15806b; background: #e5f7f2; }
.vault-metric.blue > span { color: #3674cf; background: #eaf2ff; }
.vault-metric.coral > span { color: #cf654d; background: #fff0ec; }
.vault-metric > div { min-width: 0; display: grid; gap: 5px; }
.vault-metric small { color: #7f858e; font-size: 12px; }
.vault-metric strong { overflow: hidden; color: #24262a; font-size: 25px; font-weight: 650; line-height: 30px; text-overflow: ellipsis; white-space: nowrap; }
.vault-metric strong em { margin-left: 4px; color: #8a9099; font-size: 11px; font-style: normal; font-weight: 400; }
.vault-content { min-height: 480px; margin-top: 12px; overflow: hidden; border: 1px solid #e8eaed; border-radius: 6px; background: #fff; }
.vault-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #eef0f2; }
.vault-toolbar > div { display: flex; align-items: center; gap: 10px; }
.vault-toolbar > div > strong { color: #25272b; font-size: 15px; }
.vault-toolbar > div > span { color: #8a9099; font-size: 12px; }
.vault-filters label { width: 230px; height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #e2e4e8; border-radius: 4px; }
.vault-filters label:focus-within { border-color: #d5b100; box-shadow: 0 0 0 2px rgba(255,224,0,.12); }
.vault-filters label svg { width: 15px; height: 15px; color: #a4a8af; }
.vault-filters input { min-width: 0; flex: 1; border: 0; outline: 0; }
.vault-filters select { height: 34px; min-width: 125px; padding: 0 28px 0 10px; color: #60656d; border: 1px solid #e2e4e8; border-radius: 4px; background: #fff; }
.vault-table-scroll { width: 100%; overflow: auto; }
.vault-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.vault-table th, .vault-table td { height: 58px; padding: 0 14px; border-bottom: 1px solid #eff1f3; text-align: left; vertical-align: middle; }
.vault-table th { height: 46px; color: #737881; background: #f7f8fa; font-size: 12px; font-weight: 600; white-space: nowrap; }
.vault-table td { color: #535861; font-size: 13px; }
.vault-table tbody tr:hover { background: #fffdf3; }
.vault-table tbody tr:last-child td { border-bottom: 0; }
.card-type-table th:nth-child(1) { width: 64px; }
.card-type-table th:nth-child(2) { width: 250px; }
.card-type-table th:nth-child(9) { width: 220px; }
.card-type-primary { min-width: 0; display: flex; align-items: center; gap: 10px; }
.card-type-primary > div { min-width: 0; display: grid; gap: 3px; }
.card-type-primary strong, .card-type-primary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-type-primary strong { color: #26282c; font-weight: 600; }
.card-type-primary small, .vault-table td > small { display: block; color: #92979f; font-size: 11px; font-weight: 400; }
.card-type-icon { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; color: #8a7000; border-radius: 6px; background: #fff2a9; }
.card-type-icon svg { width: 17px; height: 17px; }
.vault-state.queued { color: #7a5d00; background: #fff1ad; }
#card-type-products { min-height: 118px; }
.automation-action-scope { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; color: #60656d; font-size: 12px; }
.automation-action-scope svg { width: 15px; height: 15px; }
.card-index { width: 25px; height: 25px; display: inline-grid; place-items: center; color: #777d85; border-radius: 4px; background: #f1f3f5; font-size: 11px; }
.stock-number { color: #16816c; font-size: 16px; }
.stock-number.low { color: #d04f3a; }
.stock-warning { color: #d04f3a !important; }
.vault-state { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 23px; padding: 0 8px; color: #6f747d; border-radius: 3px; background: #f0f1f3; font-size: 11px; }
.vault-state.active { color: #17745f; background: #e6f6f0; }
.vault-state.paused { color: #9a6a00; background: #fff4d6; }
.vault-actions { display: flex; align-items: center; gap: 10px; }
.vault-actions button { padding: 0; color: #3377c9; border: 0; background: transparent; font-size: 12px; }
.vault-actions button:hover { color: #174e91; }
.vault-actions button:disabled { color: #b7bbc1; }
.card-vault-empty { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 36px; color: #8b9098; text-align: center; }
.card-vault-empty > span { width: 70px; height: 70px; display: grid; place-items: center; color: #aaa16d; border-radius: 50%; background: #fff8d7; }
.card-vault-empty > span svg { width: 31px; height: 31px; }
.card-vault-empty strong { color: #474b52; font-size: 15px; }
.card-vault-empty p { max-width: 430px; font-size: 12px; }
.card-vault-empty .primary-button { margin-top: 8px; }
.vault-workflow-band { min-height: 154px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 20px; padding: 26px 30px; border: 1px solid #f0df99; border-radius: 6px; background: #fffbea; }
.vault-workflow-band h2 { margin-top: 4px; color: #292b2f; font-size: 20px; }
.vault-workflow-band p { margin-top: 6px; color: #7d828b; font-size: 12px; }
.vault-section-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-top: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; }
.vault-section-head > div { display: flex; align-items: center; gap: 9px; }
.vault-section-head span { color: #92969d; font-size: 11px; }
.vault-section-head a { color: #3377c9; font-size: 12px; }
.vault-asset-grid, .vault-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 18px; }
.vault-asset-grid > .card-vault-empty, .vault-template-grid > .card-vault-empty { grid-column: 1 / -1; }
.vault-asset-card { min-height: 92px; display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid #e7e9ec; border-radius: 6px; }
.vault-asset-card > div { min-width: 0; flex: 1; }
.vault-asset-card strong, .vault-asset-card p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-asset-card p { margin-top: 4px; color: #858a92; font-size: 11px; }
.vault-asset-icon { width: 38px; height: 38px; display: grid; flex: 0 0 38px; place-items: center; color: #815f00; border-radius: 6px; background: #fff2b2; }
.vault-template-card { min-height: 170px; display: grid; grid-template-rows: auto 1fr auto; padding: 16px; border: 1px solid #e7e9ec; border-radius: 6px; }
.vault-template-card header { display: flex; align-items: center; gap: 9px; }
.vault-template-card header > span { width: 34px; height: 34px; display: grid; place-items: center; color: #3c72bc; border-radius: 6px; background: #edf4ff; }
.vault-template-card header > div { display: grid; gap: 2px; }
.vault-template-card header small { color: #979ba2; font-size: 10px; }
.vault-template-card > p { margin: 14px 0; overflow: hidden; color: #62666d; font-size: 12px; line-height: 19px; white-space: pre-line; }
.vault-template-card footer { display: flex; align-items: center; justify-content: space-between; }
.vault-template-card time { color: #a0a4aa; font-size: 10px; }
.vault-import-tip { display: flex; align-items: center; gap: 8px; padding: 11px 12px; color: #697078; border: 1px solid #e6e9ed; border-radius: 4px; background: #f8fafb; font-size: 11px; }
.vault-import-tip svg { width: 16px; height: 16px; color: #26816d; }
.vault-template-vars { display: flex; gap: 7px; }
.vault-template-vars span { padding: 3px 7px; color: #6d5e16; border-radius: 3px; background: #fff5c5; font: 11px Consolas, monospace; }
.card-delivery-result { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; padding: 14px; border: 1px solid #adddca; border-radius: 5px; background: #f0faf6; }
.card-delivery-result > span { width: 38px; height: 38px; display: grid; place-items: center; color: #178169; border-radius: 50%; background: #dcf4eb; }
.card-delivery-result p { margin: 2px 0 9px; color: #728078; font-size: 11px; }
.card-delivery-result > div > div { display: flex; }
.card-delivery-result input { min-width: 0; height: 34px; flex: 1; padding: 0 9px; border: 1px solid #cddfd8; border-radius: 4px 0 0 4px; background: #fff; font: 12px Consolas, monospace; }
.card-delivery-result button { width: 38px; display: grid; place-items: center; color: #17745f; border: 1px solid #cddfd8; border-left: 0; border-radius: 0 4px 4px 0; background: #fff; }
.card-stock-dialog { width: min(920px, calc(100vw - 32px)); }
.card-stock-dialog > div { width: 100%; }
.card-stock-scroll { max-height: min(560px, calc(100vh - 210px)); }
.card-stock-dialog footer { display: flex; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid #eceef1; }

@media (max-width: 1100px) and (min-width: 761px) {
  .vault-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vault-asset-grid, .vault-template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .vault-filters select { display: none; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .nav-group { display: contents; }
  .nav-group-trigger { display: none; }
  .nav-group-links { display: contents !important; }
  .nav-group-links .nav-item-wrap { display: contents; }
  .card-vault-view { padding: 10px; }
  .vault-page-head { min-height: 70px; padding: 12px 14px; }
  .vault-page-head h1 { font-size: 17px; }
  .vault-page-head .outline-button { min-width: 38px; width: 38px; padding: 0; }
  .vault-page-head .outline-button { font-size: 0; }
  .vault-page-head .outline-button svg { width: 16px; height: 16px; }
  .vault-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
  .vault-metric { min-height: 76px; gap: 9px; padding: 11px; }
  .vault-metric > span { width: 34px; height: 34px; flex-basis: 34px; }
  .vault-metric strong { font-size: 19px; }
  .vault-content { margin-top: 8px; }
  .vault-toolbar { align-items: flex-start; flex-direction: column; padding: 12px; }
  .vault-toolbar > div { width: 100%; flex-wrap: wrap; }
  .vault-toolbar > div:last-child { justify-content: flex-end; }
  .vault-filters label { width: 100%; }
  .vault-filters select { min-width: calc(50% - 5px); flex: 1; }
  .vault-table thead { display: none; }
  .vault-table, .vault-table tbody, .vault-table tr, .vault-table td { display: block; width: 100%; }
  .vault-table tbody { padding: 8px; }
  .vault-table tr { margin-bottom: 8px; padding: 7px 11px; border: 1px solid #e7e9ec; border-radius: 5px; }
  .vault-table td { min-height: 34px; height: auto; display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: center; padding: 7px 0; border-bottom: 1px solid #f0f1f3; white-space: normal; }
  .vault-table td::before { content: attr(data-label); color: #8b9097; font-size: 11px; }
  .vault-table td:last-child { border-bottom: 0; }
  .vault-table td[colspan] { display: block; padding: 0; }
  .vault-table td[colspan]::before { display: none; }
  .vault-actions { flex-wrap: wrap; }
  .vault-workflow-band { min-height: 190px; align-items: flex-start; flex-direction: column; margin: 10px; padding: 20px; }
  .vault-asset-grid, .vault-template-grid { grid-template-columns: 1fr; padding: 10px; }
  .card-vault-empty { min-height: 260px; padding: 24px 14px; }
}

/* Enterprise v11 operations control tower */
.control-tower-view { background: #f7f7f7; }
.control-tower-content { display: grid; gap: 16px; padding-bottom: 28px; }
.control-overview-head { min-height: 92px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #333; border: 1px solid rgba(0,0,0,.08); border-left: 4px solid #ffe60f; border-radius: 6px; background: #fff; }
.control-overview-head > div:first-child { display: grid; gap: 4px; }
.control-overview-head span { color: #8b8b8b; font-size: 12px; }
.control-overview-head strong { font-size: 20px; line-height: 1.35; letter-spacing: 0; }
.control-overview-head small { color: #8b8b8b; font-size: 12px; }
.control-overview-status { display: flex; align-items: center; gap: 10px; }
.control-overview-status > span { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px; color: #177245; background: #eef9f2; border: 1px solid #b8e1ca; border-radius: 4px; }
.control-overview-status > span.danger { color: #b23838; background: #fff3f3; border-color: #f0b9b9; }
.control-overview-status svg { width: 16px; height: 16px; }
.control-overview-head .outline-button { color: #333; border-color: rgba(0,0,0,.12); background: #fff; }
.control-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #dde2e7; border-radius: 6px; background: #dde2e7; }
.control-kpi { min-width: 0; min-height: 142px; padding: 15px 16px 13px; display: flex; flex-direction: column; background: #fff; }
.control-kpi header { display: flex; align-items: center; justify-content: space-between; }
.control-kpi header > span { width: 28px; height: 28px; display: grid; place-items: center; color: #0f766e; background: #ecfdf5; border-radius: 4px; }
.control-kpi header svg { width: 16px; height: 16px; }
.control-kpi header em { color: #6b7280; font-size: 11px; font-style: normal; }
.control-kpi > strong { margin-top: 13px; color: #111827; font-size: 23px; line-height: 1.15; letter-spacing: 0; overflow-wrap: anywhere; }
.control-kpi > p { margin: 5px 0 12px; color: #4b5563; font-size: 13px; }
.control-kpi footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.control-kpi footer span { color: #6b7280; font-size: 11px; }
.control-kpi footer span.up { color: #047857; }
.control-kpi footer span.down { color: #b91c1c; }
.control-kpi footer small { color: #9ca3af; white-space: nowrap; }
.control-kpi.no-data { background: #f9fafb; }
.control-kpi.no-data > strong { color: #9ca3af; font-size: 18px; }
.control-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.control-section { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #dde2e7; border-radius: 6px; }
.control-section > header { min-height: 58px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f2; }
.control-section > header > div:first-child { display: grid; gap: 2px; }
.control-section > header strong { color: #1f2937; font-size: 14px; }
.control-section > header span { color: #8a939f; font-size: 12px; }
.control-section > header > div:last-child { display: flex; gap: 8px; }
.control-tower-content > .control-section + .control-section { margin-top: 0; }
.control-table { min-width: 820px; }
.control-table th { height: 42px; padding: 0 12px; color: #68717c; background: #f7f8fa; font-size: 12px; font-weight: 500; white-space: nowrap; }
.control-table td { min-height: 48px; padding: 10px 12px; vertical-align: middle; color: #374151; font-size: 12px; }
.control-table td button:not(.primary-button):not(.outline-button) { color: #2563eb; background: none; border: 0; cursor: pointer; }
.control-table .cell-note { display: block; margin-top: 3px; color: #9ca3af; }
.control-insights { position: sticky; top: 14px; }
.control-recommendations { display: grid; }
.control-recommendations a { min-height: 72px; padding: 12px 14px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 16px; gap: 9px; align-items: center; color: inherit; text-decoration: none; border-bottom: 1px solid #edf0f2; }
.control-recommendations a:last-child { border-bottom: 0; }
.control-recommendations a:hover { background: #f9fafb; }
.control-recommendations a > svg:first-child { width: 17px; height: 17px; color: #d97706; }
.control-recommendations a.danger > svg:first-child { color: #dc2626; }
.control-recommendations a > svg:last-child { width: 14px; height: 14px; color: #9ca3af; }
.control-recommendations span { min-width: 0; display: grid; gap: 3px; }
.control-recommendations strong { overflow: hidden; color: #1f2937; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.control-recommendations small { color: #6b7280; font-size: 11px; line-height: 1.45; }
.analytics-dialog { width: min(620px, calc(100vw - 32px)); }
.analytics-metric-picker { max-height: 252px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.analytics-metric-picker label { min-width: 0; padding: 9px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid #e2e6ea; border-radius: 4px; cursor: pointer; }
.analytics-metric-picker label:has(input:checked) { border-color: #e0c300; background: #fffbea; }
.analytics-metric-picker span { min-width: 0; display: grid; gap: 2px; }
.analytics-metric-picker strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.analytics-metric-picker small { color: #8a939f; }
.analytics-inspector { width: min(760px, calc(100vw - 32px)); }
.analytics-inspector > div { max-height: min(780px, calc(100vh - 32px)); }
.analytics-inspector #analytics-inspector-body { min-height: 120px; padding: 16px 20px; overflow: auto; }
.analytics-inspector-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 16px; overflow: hidden; background: #e5e7eb; border: 1px solid #e5e7eb; border-radius: 5px; }
.analytics-inspector-grid .control-kpi { min-height: 132px; }
.analytics-evidence { margin: 0; display: grid; border: 1px solid #e5e7eb; border-radius: 5px; }
.analytics-evidence > div { min-width: 0; display: grid; grid-template-columns: 125px minmax(0, 1fr); border-bottom: 1px solid #edf0f2; }
.analytics-evidence > div:last-child { border-bottom: 0; }
.analytics-evidence dt, .analytics-evidence dd { min-width: 0; margin: 0; padding: 10px 12px; }
.analytics-evidence dt { color: #6b7280; background: #f8f9fa; font-size: 12px; }
.analytics-evidence dd { color: #1f2937; overflow-wrap: anywhere; }
.analytics-evidence code { font-size: 11px; }
.analytics-evidence pre { max-height: 160px; margin: 0; overflow: auto; white-space: pre-wrap; }
.analytics-timeline { margin: 16px 0 0; padding: 0; display: grid; list-style: none; border-left: 2px solid #d1d5db; }
.analytics-timeline li { margin-left: 14px; padding: 8px 0; display: grid; grid-template-columns: 145px 100px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid #edf0f2; }
.analytics-timeline span, .analytics-timeline small { color: #6b7280; }
.enterprise-state.breach { color: #b42318; background: #fee4e2; }
.enterprise-state.pass { color: #067647; background: #dcfae6; }
.enterprise-state.no_data, .enterprise-state.not_evaluated { color: #475467; background: #f2f4f7; }

@media (max-width: 1180px) {
  .control-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control-layout { grid-template-columns: minmax(0, 1fr); }
  .control-insights { position: static; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .control-tower-content { gap: 12px; }
  .control-overview-head { min-height: 0; padding: 14px; align-items: flex-start; flex-direction: column; }
  .control-overview-head strong { font-size: 17px; }
  .control-overview-status { width: 100%; justify-content: space-between; }
  .control-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-kpi { min-height: 132px; padding: 12px; }
  .control-kpi > strong { font-size: 19px; }
  .control-kpi footer { align-items: flex-start; flex-direction: column; gap: 3px; }
  .control-section > header { align-items: flex-start; flex-direction: column; }
  .control-section > header > div:last-child { width: 100%; }
  .control-section > header > div:last-child > button { flex: 1; }
  .analytics-metric-picker { grid-template-columns: 1fr; }
  .analytics-inspector-grid { grid-template-columns: 1fr; }
  .analytics-evidence > div { grid-template-columns: 95px minmax(0, 1fr); }
  .analytics-timeline li { grid-template-columns: 1fr; gap: 3px; }
  .control-table { min-width: 0; width: 100%; }
  .control-table thead { display: none; }
  .control-table, .control-table tbody, .control-table tr, .control-table td { display: block; width: 100%; }
  .control-table tbody { padding: 8px; }
  .control-table tr { margin-bottom: 8px; padding: 6px 10px; border: 1px solid #dfe3e8; border-radius: 5px; background: #fff; }
  .control-table tr:last-child { margin-bottom: 0; }
  .control-table td { min-height: 34px; padding: 7px 0 7px 96px; position: relative; border-bottom: 1px solid #edf0f2; overflow-wrap: anywhere; }
  .control-table td:last-child { border-bottom: 0; }
  .control-table td::before { content: attr(data-label); width: 84px; position: absolute; top: 7px; left: 0; color: #8a939f; font-size: 11px; }
  .control-table td[colspan] { padding-left: 0; }
  .control-table td[colspan]::before { content: none; }
  .control-table .reference-operation { justify-content: flex-start; flex-wrap: wrap; }
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 1024px; min-height: 100%; }
html { background: var(--page); }
body { margin: 0; color: var(--text); background: var(--page); font: 14px/1.4 "PingFang SC", "Microsoft YaHei", Arial, sans-serif; letter-spacing: 0; }
body, button, input, select, textarea { font-family: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button { margin: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
h1, h2, h3, p { margin: 0; }
svg { width: 1em; height: 1em; stroke-width: 1.8; }
[hidden] { display: none !important; }

.top-header { position: fixed; inset: 0 0 auto; z-index: 20; box-sizing: border-box; width: 100%; height: 64px; padding: 0 40px 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.top-header-inner { height: 100%; display: flex; align-items: center; gap: 14px; }
.logo-ads { min-width: 162px; height: 100%; display: flex; align-items: center; gap: 10px; }
.logo { width: 42px; height: 42px; display: block; flex: 0 0 42px; object-fit: contain; user-select: none; }
.brand-wordmark { min-width: 0; display: grid; gap: 1px; line-height: 1; }
.brand-wordmark strong { color: #202124; font-size: 20px; line-height: 23px; }
.brand-wordmark small { color: #777; font-size: 10px; line-height: 13px; white-space: nowrap; }
.top-nav { height: 100%; display: flex; flex: 0 0 auto; align-items: center; margin-left: auto; white-space: nowrap; }
.top-nav-item, .user-info { position: relative; height: 40px; display: flex; align-items: center; gap: 4px; padding: 0 16px; color: #333; border: 0; border-right: 1px solid var(--line); background: transparent; font-size: 14px; }
.top-nav-item:hover, .user-info:hover { color: #0daeff; }
.top-nav-item svg { font-size: 17px; }
.account-menu-shell { position: relative; height: 100%; display: flex; align-items: center; }
.user-info { gap: 6px; padding-right: 0; border-right: 0; }
.user-info > svg { color: #999; font-size: 14px; transition: transform .16s ease; }
.user-info[aria-expanded="true"] { color: #25272b; background: #fafafa; }
.user-info[aria-expanded="true"] > svg { transform: rotate(180deg); }
.user-avatar { position: relative; width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; overflow: hidden; color: #333; border-radius: 50%; background: var(--yellow); font-size: 12px; font-weight: 600; }
.user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.account-popover { position: absolute; top: calc(100% - 5px); right: 0; z-index: 100; width: 286px; max-height: min(620px, calc(100vh - 72px)); overflow: auto; padding: 6px; border: 1px solid #e1e3e6; border-radius: 6px; background: #fff; box-shadow: 0 12px 32px rgba(24, 28, 33, .16); animation: context-menu-enter .12s ease-out both; }
.account-popover-identity { min-width: 0; display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #eceef0; }
.account-popover-identity > span { min-width: 0; display: grid; gap: 2px; }
.account-popover-identity small { color: #947500; font-size: 11px; font-weight: 700; }
.account-popover-identity strong { overflow: hidden; color: #25272b; font-size: 15px; text-overflow: ellipsis; }
.account-popover-identity em { overflow: hidden; color: #858a93; font-size: 11px; font-style: normal; text-overflow: ellipsis; }
.account-popover-heading { padding: 7px 10px 6px; color: #8b9098; font-size: 11px; font-weight: 600; }
.account-popover > :is(a, button) { width: 100%; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #34383d; border: 0; border-radius: 4px; background: transparent; font-size: 13px; text-align: left; }
.account-popover > :is(a, button):hover, .account-popover > :is(a, button):focus-visible { color: #202225; outline: 0; background: #f4f5f6; }
.account-popover > :is(a, button) svg { width: 16px; height: 16px; flex: 0 0 16px; color: #757b84; }
.account-popover > :is(a, button) > span { min-width: 0; display: grid; gap: 1px; }
.account-popover > :is(a, button) > span strong { font-size: 13px; font-weight: 500; }
.account-popover > :is(a, button) > span small { overflow: hidden; color: #92969d; font-size: 10px; text-overflow: ellipsis; }
.account-popover > .account-popover-danger { color: #b8322d; }
.account-popover > .account-popover-danger svg { color: currentColor; }
.account-popover-divider { height: 1px; margin: 5px 6px; background: #eceef0; }
.account-channel-picker { display: grid; gap: 5px; padding: 2px 10px 7px; color: #6f747c; font-size: 11px; }
.account-channel-picker select { width: 100%; height: 34px; min-width: 0; padding: 0 28px 0 9px; color: #30343a; border: 1px solid #dfe2e6; border-radius: 4px; outline: 0; background: #fff; font-size: 12px; }
.account-channel-picker select:focus { border-color: #c5a000; box-shadow: 0 0 0 2px rgba(245, 196, 0, .16); }
.info-num { min-width: 16px; height: 16px; display: inline-grid; place-items: center; padding: 0 3px; color: #fff; border-radius: 8px; background: var(--red); font-size: 10px; font-weight: 400; }

.app-shell { min-height: 100vh; padding-top: 64px; }
.left-aside { position: fixed; inset: 64px auto 0 0; z-index: 10; display: flex; height: calc(100vh - 64px); }
.first-nav { position: relative; width: 134px; height: 100%; display: flex; flex: 0 0 134px; flex-direction: column; overflow: hidden; background: #333; }
.first-nav-list { flex: 1; overflow: hidden auto; padding-top: 4px; scrollbar-color: rgba(191,191,191,.3) #333; scrollbar-width: thin; }
.first-nav-list::-webkit-scrollbar { width: 4px; }
.first-nav-list::-webkit-scrollbar-track { background: #333; }
.first-nav-list::-webkit-scrollbar-thumb { background: rgba(191,191,191,.3); border-radius: 2px; }
.nav-item-wrap { position: relative; width: 134px; }
.nav-item-wrap .nav-item { width: 100%; }
.im-nav-wrap .im-inbox-nav { padding-right: 27px; }
.im-nav-wrap .im-inbox-nav > em { top: 2px; right: 4px; }
.nav-read-all { position: absolute; right: 4px; bottom: 2px; z-index: 2; width: 22px; height: 20px; display: grid; place-items: center; padding: 0; color: #a3a3a3; border: 0; border-radius: 3px; background: transparent; transition: color .14s ease, background .14s ease, opacity .14s ease; }
.nav-read-all svg { width: 14px; height: 14px; }
.nav-read-all:not(:disabled):hover, .nav-read-all:not(:disabled):focus-visible { color: #fff; background: rgba(255,255,255,.14); }
.nav-item-wrap:has(.nav-item.active) .nav-read-all { color: #4b4300; }
.nav-item-wrap:has(.nav-item.active) .nav-read-all:not(:disabled):hover, .nav-item-wrap:has(.nav-item.active) .nav-read-all:not(:disabled):focus-visible { color: #111; background: rgba(0,0,0,.1); }
.nav-read-all:disabled { opacity: .34; pointer-events: none; }
.nav-read-all.is-busy svg { animation: connector-spin .8s linear infinite; }
.nav-item { position: relative; width: 134px; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; color: #a3a3a3; background: #333; font-size: 14px; line-height: 40px; }
.nav-item:hover, .nav-item:focus { color: #fff; }
.nav-item.active { color: var(--yellow); }
.nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; }
.nav-item span { line-height: 20px; }
.nav-item > em { position: absolute; top: 4px; right: 12px; min-width: 16px; height: 16px; padding: 0 3px; color: #fff; border-radius: 8px; background: var(--red); font-size: 10px; font-style: normal; line-height: 16px; text-align: center; }
.sec-nav { z-index: 1; width: 134px; height: 100%; overflow: hidden auto; background: #fff; box-shadow: 3px 0 8px rgba(0,21,41,.12); transition: width .2s; }
.sec-nav-head { width: 134px; height: 62px; border-bottom: 1px solid var(--line); }
.sec-nav-head p { font-weight: 600; font-size: 16px; line-height: 62px; text-indent: 24px; }
.sec-nav-list { width: 134px; padding-top: 8px; }
.sec-nav-item { position: relative; width: 100%; height: 40px; display: flex; align-items: center; margin-bottom: 8px; padding: 0 24px; color: var(--muted); background: #fff; font-size: 14px; }
.sec-nav-item:hover { color: #333; background: #f7f7f7; }
.sec-nav-item.active { color: #333; font-weight: 600; background: var(--yellow); }
.sec-nav-item.active::after { position: absolute; inset: 0 0 0 auto; width: 2px; content: ""; background: var(--yellow-dark); }
.fold-btn { position: absolute; top: 83px; left: 255px; z-index: 3; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; color: #bbb; border: 1px solid #f3f3f3; border-radius: 50%; background: #fff; transition: left .2s; }
.fold-btn:hover { color: #333; background: var(--yellow); }
.fold-btn svg { font-size: 14px; }
.left-aside.no-secondary .sec-nav { width: 0; box-shadow: none; }
.left-aside.no-secondary .fold-btn { display: none; }
.left-aside.folded .sec-nav { width: 0; }
.left-aside.folded .fold-btn { left: 121px; }
.left-aside.folded .fold-btn svg { transform: rotate(180deg); }

.main-content { width: calc(100% - 268px); min-height: calc(100vh - 64px); margin-left: 268px; transition: width .2s, margin-left .2s; }
body.app-data-loading #data-source-strip::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: linear-gradient(90deg, transparent, #ffe000, transparent); background-size: 35% 100%; animation: data-progress 1.1s ease-in-out infinite; }
body.app-data-loading #data-source-strip .source-health { animation: source-health-pulse 1s ease-in-out infinite; }
body.app-initial-loading .app-view:not([hidden]) { position: relative; min-height: calc(100vh - 150px); }
body.app-initial-loading .app-view:not([hidden])::before { position: absolute; z-index: 4; inset: 0; min-height: 220px; border-radius: 4px; content: ""; pointer-events: none; background: linear-gradient(100deg, rgba(248,249,250,.72) 20%, rgba(255,255,255,.94) 38%, rgba(248,249,250,.72) 56%); background-size: 220% 100%; animation: initial-shimmer 1.25s ease-in-out infinite; }
body.route-transitioning .main-content { opacity: .78; transition: opacity .14s ease; }
body.route-transitioning .nav-item.active::before { animation: route-nav-pulse .5s ease-out; }
body.app-data-loading #reload-data svg, body.app-data-loading #refresh-im svg { animation: connector-spin .8s linear infinite; }
body.no-secondary .main-content, body.nav-folded .main-content { width: calc(100% - 134px); margin-left: 134px; }
.app-view { position: relative; min-height: calc(100vh - 64px); }
.app-view[hidden] { display: none; }
.data-source-strip { position: relative; min-width: 0; max-width: 620px; height: 34px; display: flex; flex: 0 1 auto; align-items: center; gap: 7px; margin-right: auto; padding: 0 3px 0 12px; overflow: hidden; color: #374151; border-left: 1px solid #e5e7eb; background: transparent; }
.source-health { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #d39b18; box-shadow: 0 0 0 3px rgba(211,155,24,.12); }
.data-source-strip.connected .source-health { background: #2a9d68; box-shadow: 0 0 0 3px rgba(42,157,104,.12); }
.data-source-strip.disconnected .source-health,
.data-source-strip.error .source-health { background: #d04f3a; box-shadow: 0 0 0 3px rgba(208,79,58,.12); }
.source-summary { min-width: 0; display: flex; flex: 0 1 auto; align-items: center; gap: 7px; overflow: hidden; }
.source-summary > strong, .source-connection strong { flex: 0 0 auto; color: #35383d; font-size: 12px; font-weight: 650; white-space: nowrap; }
.source-connection { min-width: 0; height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 4px; overflow: hidden; color: inherit; border: 0; border-radius: 4px; background: transparent; text-align: left; }
.source-connection:hover, .source-connection:focus-visible { background: #f5f6f7; outline: 0; }
.source-connection svg { width: 13px; height: 13px; flex: 0 0 13px; color: #8a9098; }
.source-recovery { min-width: 0; max-width: 210px; overflow: hidden; color: #9a6a00; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.data-source-strip.connected .source-recovery { color: #257a57; }
.data-source-strip.disconnected .source-recovery { color: #b14836; }
.source-sync-state, .source-records { min-width: 0; flex: 0 1 auto; padding-left: 7px; overflow: hidden; border-left: 1px solid #e5e7eb; color: #7b818a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.data-source-strip.connected .source-sync-state { color: #257a57; }
.data-source-strip.warning .source-sync-state { color: #9a6a00; }
.data-source-strip.disconnected .source-sync-state { display: none; }
.source-sync-button { min-width: 52px; height: 30px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; color: #565c65; border: 0; border-radius: 4px; background: #f2f3f5; font-size: 11px; }
.source-sync-button:hover, .source-sync-button:focus-visible { color: #25272b; background: #e8eaed; outline: 0; }
.source-sync-button svg { width: 14px; height: 14px; }
.source-sync-button.is-syncing svg { animation: connector-spin .8s linear infinite; }
.source-sync-button.is-success { color: #1f7a3d; background: #edf8f2; }
.data-source-strip.error .source-summary strong, .data-source-strip.error .source-sync-state { color: #a33e30; }
.mobile-secondary-nav { display: none; }
.mobile-more-nav, .mobile-nav-drawer { display: none; }

/* The statistics landing page mirrors src/views/home/index.vue. */
.home-container { width: 100%; height: calc(100vh - 64px); padding: 16px; overflow-y: auto; }
.home-part { min-width: 0; }
.workbench-brand { position: relative; min-height: 208px; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 44%); align-items: stretch; overflow: hidden; color: #fff; border: 1px solid #34363a; border-left: 4px solid var(--yellow); border-radius: 8px; background: #242529; }
.workbench-brand-copy { position: relative; z-index: 2; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 28px 18px 28px 32px; }
.brand-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--yellow); font-size: 12px; font-weight: 600; }
.brand-kicker svg { width: 15px; height: 15px; }
.workbench-brand h1 { color: #fff; font-size: 24px; font-weight: 500; line-height: 34px; }
.workbench-brand h1 strong { color: var(--yellow); font-weight: 700; }
.workbench-brand-copy > p { margin-top: 6px; color: #d4d6da; font-size: 15px; line-height: 24px; }
.workbench-brand-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.workbench-brand-actions button { height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.workbench-brand-actions svg { width: 16px; height: 16px; }
.brand-primary { color: #202124; border: 1px solid var(--yellow); background: var(--yellow); }
.brand-primary:hover { border-color: #ffd000; background: #ffd000; }
.brand-secondary { color: #f5f5f5; border: 1px solid #60636a; background: transparent; }
.brand-secondary:hover { border-color: #9b9da2; background: #303238; }
.workbench-brand-visual { min-width: 0; display: flex; align-items: center; justify-content: flex-end; padding: 10px 18px 10px 0; overflow: hidden; }
.workbench-brand-visual img { width: min(100%, 470px); max-height: 188px; display: block; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.24)); }
.workbench-brand + .home-module { margin-top: 16px; }
.home-module { padding: 24px; background: #fff; border-radius: 8px; }
.home-module + .home-module { margin-top: 16px; }
.home-module h2 { color: #333; font-size: 18px; font-weight: 600; line-height: 24px; }
.pending-module { padding-top: 24px; }
.module-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.module-head h2 { flex: 0 0 auto; white-space: nowrap; }
.module-head-tools { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.module-head-tools select { min-width: 140px; height: 32px; padding: 0 28px 0 10px; color: #333; border: 1px solid var(--line); border-radius: 16px; background: #fff; outline: 0; }
.module-head-tools select:focus { border-color: var(--yellow-dark); }
.pending-list, .statistics-list { display: flex; flex-wrap: wrap; margin-top: 16px; font-family: "Arial", "PingFang SC", sans-serif; }
.module-loading { width: 100%; min-height: 80px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #8a9199; border: 1px dashed #e1e4e8; border-radius: 6px; background: #fafbfc; font-size: 12px; }
.module-loading svg { width: 17px; height: 17px; animation: connector-spin .8s linear infinite; }
.home-stat-item { min-width: 0; height: 96px; display: flex; flex: 0 calc(25% - 12px); align-items: center; justify-content: space-between; margin: 0 16px 16px 0; padding: 16px; color: #333; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.home-stat-item:nth-child(4n) { margin-right: 0; }
.pending-list .home-stat-item { margin-bottom: 0; }
.statistics-list .home-stat-item:nth-child(n+5) { margin-bottom: 0; }
.home-stat-item:hover { border-color: rgba(255,172,5,.65); box-shadow: 0 4px 12px rgba(0,0,0,.05); }
.home-stat-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.home-stat-main strong { overflow: hidden; color: #333; font-size: 28px; font-weight: 500; line-height: 32px; text-overflow: ellipsis; white-space: nowrap; }
.home-stat-main strong small { margin-right: 2px; font-size: 16px; font-weight: 400; }
.home-stat-detail { overflow: hidden; color: #7c838b; font-size: 11px; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.home-stat-main span { overflow: hidden; color: #555; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.home-stat-icon { width: 40px; height: 40px; display: grid; flex: 0 0 40px; place-items: center; margin-left: 12px; border-radius: 12px; }
.home-stat-icon svg { width: 22px; height: 22px; }
.today-change { color: var(--muted); font-size: 12px; line-height: 18px; }
.today-change b { margin-left: 4px; color: var(--green); font-weight: 400; }
.today-change b.down { color: var(--red); }
.order-statistics-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); overflow: hidden; margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; }
.order-stat-item { min-width: 0; height: 98px; padding: 17px 20px; color: #333; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.order-stat-item:nth-child(4n) { border-right: 0; }
.order-stat-item:nth-child(n+5) { border-bottom: 0; }
.order-stat-item:hover { background: #fffdf0; }
.order-stat-item > span { display: block; color: #555; line-height: 20px; }
.order-stat-values { display: flex; align-items: baseline; gap: 7px; margin-top: 9px; }
.order-stat-values strong { font-size: 24px; font-weight: 500; }
.order-stat-values small { color: var(--muted); font-size: 12px; }
.date-buttons { display: flex; gap: 8px; }
.date-buttons button { min-width: 48px; height: 26px; padding: 0 12px; color: #333; border: 1px solid var(--line); border-radius: 13px; background: #fff; font-size: 12px; }
.date-buttons button.active, .date-buttons button:hover { border-color: var(--yellow); background: var(--yellow); }
.refund-statistics-list .home-stat-item { cursor: default; }
.commonly-list { display: flex; flex-wrap: wrap; margin-top: 24px; }
.commonly-item { min-width: 0; min-height: 48px; display: flex; flex: 0 0 20%; align-items: center; gap: 8px; margin-bottom: 26px; padding: 0 8px 0 0; color: #333; border: 0; background: transparent; text-align: left; }
.commonly-item:hover .commonly-copy strong { color: #0daeff; }
.commonly-item .home-stat-icon { width: 32px; height: 32px; flex-basis: 32px; margin: 0; border-radius: 6px; }
.commonly-item .home-stat-icon svg { width: 18px; height: 18px; }
.commonly-copy { min-width: 0; display: grid; gap: 2px; }
.commonly-copy strong { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.commonly-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.test-icon { width: 38px; height: 16px; color: #ff9b10; border: 1px solid #f9f3ed; border-radius: 3px; font-size: 12px; line-height: 14px; text-align: center; }
.client-download-state { display: flex; align-items: center; gap: 16px; margin: 24px 0; padding: 20px; background: #f7f7f7; border-radius: 8px; }
.client-download-state > svg { width: 36px; height: 36px; color: #49cc6a; }
.client-download-state > div { display: grid; gap: 4px; }
.client-download-state span { color: var(--muted); font-size: 12px; }

/* Inner pages follow the same Element-based shell and spacing. */
.business-view { padding: 16px; overflow: auto; }
.business-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 0 24px; background: #fff; border-radius: 8px; }
.business-head h1 { color: #333; font-size: 16px; font-weight: 600; }
.business-panel, .filter-panel { padding: 24px; background: #fff; border-radius: 8px; }
.business-panel + .business-panel { margin-top: 16px; }
.page-actions, .updated-tools { display: flex; align-items: center; gap: 8px; }
.updated-tools { color: var(--muted); font-size: 12px; }
.primary-button, .outline-button { min-width: 84px; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 16px; color: #333; border-radius: 16px; background: #fff; font-size: 14px; line-height: 30px; }
.dialog-capacity-hint { min-height: 34px; display: flex; align-items: center; padding: 0 11px; color: #665b00; border: 1px solid #f0dc7b; border-radius: 4px; background: #fffbea; font-size: 12px; }
.primary-button { border: 1px solid var(--yellow); background: var(--yellow); }
.primary-button:hover { opacity: .75; }
.outline-button { border: 1px solid var(--line); }
.outline-button:hover { border-color: var(--yellow-dark); }
.icon-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; color: #777; border: 0; border-radius: 50%; background: transparent; }
.icon-button:hover { color: #333; background: var(--yellow); }
.section-heading, .panel-title-row { display: flex; align-items: center; justify-content: space-between; }
.section-heading h2, .panel-title-row h2 { color: #333; font-size: 16px; font-weight: 600; }
.section-heading p, .panel-title-row p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.segmented { display: flex; align-items: center; }
.segmented button, .range-tabs button, .chart-switch button { height: 32px; padding: 0 16px; color: #666; border: 1px solid var(--line); border-right: 0; background: #fff; }
.segmented button:first-child, .range-tabs button:first-child, .chart-switch button:first-child { border-radius: 16px 0 0 16px; }
.segmented button:last-child, .range-tabs button:last-child, .chart-switch button:last-child { border-right: 1px solid var(--line); border-radius: 0 16px 16px 0; }
.segmented button.active, .range-tabs button.active, .chart-switch button.active { color: #333; border-color: var(--yellow); background: var(--yellow); }
.segmented button.active + button, .range-tabs button.active + button, .chart-switch button.active + button { border-left-color: var(--yellow); }
.search-field { width: 260px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.search-field:focus-within { border-color: var(--yellow-dark); }
.search-field svg { flex: 0 0 16px; color: #aaa; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.view-caption { font-weight: 600; }
.data-table-wrap, .table-scroll { overflow: auto; }
.data-table, .table-scroll table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th, .data-table td, .table-scroll th, .table-scroll td { height: 48px; padding: 0 16px; overflow: hidden; border-bottom: 1px solid var(--line); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.data-table th, .table-scroll th { color: #777; background: #fafafa; font-size: 12px; font-weight: 400; }
.data-table td, .table-scroll td { color: #555; }
.data-table tbody tr:hover, .table-scroll tbody tr:hover { background: #fffdf0; }
.data-table td strong { color: #333; font-weight: 500; }
.amount-cell { color: var(--red) !important; font-variant-numeric: tabular-nums; }
.empty-table { height: 160px !important; color: var(--muted) !important; text-align: center !important; }
.status-tag { display: inline-block; min-width: 54px; padding: 2px 8px; color: #777; border-radius: 11px; background: #f3f3f3; font-size: 12px; text-align: center; }
.status-paid, .status-success { color: #26904a; background: #edf9f0; }
.status-unpaid { color: #d38400; background: #fff6df; }
.status-refunded, .status-closed, .status-cancelled { color: #dc4b2d; background: #fff0ed; }
.status-shipped { color: #2775d2; background: #edf5ff; }

.product-catalog { border-top: 1px solid var(--line); }
.catalog-item { min-height: 86px; display: grid; grid-template-columns: 56px minmax(180px,1fr) repeat(3,110px); align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.catalog-item:hover { background: #fffdf0; }
.catalog-thumb, .product-thumb { width: 48px; height: 48px; display: grid; place-items: center; color: #777; border-radius: 6px; background: #f2f2f2; font-size: 20px; }
.catalog-main { min-width: 0; display: grid; gap: 6px; }
.catalog-main strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.catalog-main small, .catalog-stat span { color: var(--muted); font-size: 12px; }
.catalog-stat { display: grid; gap: 5px; }
.catalog-stat b { font-size: 16px; font-weight: 500; }
.catalog-stat.amount b { color: var(--red); }

.im-panel { padding: 0; overflow: hidden; }
.im-workspace { min-height: calc(100vh - 176px); display: grid; grid-template-columns: 300px minmax(0,1fr); }
.session-list { overflow: auto; border-right: 1px solid var(--line); }
.session-item { position: relative; width: 100%; min-height: 68px; display: grid; gap: 4px; padding: 13px 16px; color: #555; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.session-item:hover, .session-item.active { background: #fffbe2; }
.session-item strong, .session-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-item strong { padding-right: 30px; color: #333; font-weight: 500; }
.session-item small { color: var(--muted); }
.session-item b { position: absolute; top: 13px; right: 14px; min-width: 16px; height: 16px; padding: 0 3px; color: #fff; border-radius: 8px; background: var(--red); font-size: 10px; font-weight: 400; line-height: 16px; text-align: center; }
.conversation { min-width: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.conversation-body { overflow: auto; padding: 24px; background: #f7f7f7; }
.message-bubble { max-width: 72%; width: fit-content; margin-bottom: 12px; padding: 10px 13px; overflow-wrap: anywhere; color: #333; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.message-bubble.outbound { margin-left: auto; background: #fff3a8; }
.message-bubble small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.message-media { display: block; margin-top: 6px; color: #0daeff; font-size: 12px; }
.composer { display: flex; align-items: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.composer textarea { min-height: 40px; flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; outline: 0; resize: vertical; }
.composer textarea:focus { border-color: var(--yellow-dark); }
.conversation-empty, .empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); }
.conversation-empty svg, .empty-state > svg { width: 42px; height: 42px; color: #ccc; }
.conversation-loading { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 9px; color: #8a939d; font-size: 12px; }
.conversation-loading svg { width: 24px; height: 24px; animation: connector-spin .8s linear infinite; }
.empty-list, .empty-state-compact { padding: 28px; color: var(--muted); text-align: center; }

.filter-panel { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 16px; }
.filter-field { display: grid; gap: 7px; color: #666; font-size: 12px; }
.filter-field select { width: 170px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.range-tabs, .chart-switch { display: flex; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.metric-card { min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #777; }
.metric-top button { padding: 0; color: #aaa; border: 0; background: transparent; }
.metric-card > strong { display: block; margin-top: 12px; font-size: 26px; font-weight: 500; }
.metric-card > strong small { margin-left: 4px; color: var(--muted); font-size: 12px; }
.metric-card > p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.two-column { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(340px,.8fr); gap: 16px; margin-top: 16px; }
.two-column .business-panel { min-width: 0; margin: 0; }
.panel-title-row.compact { min-height: 36px; }
.link-button { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: #0daeff; border: 0; background: transparent; }
.trend-chart { position: relative; height: 290px; margin-top: 18px; padding: 0 0 30px 45px; }
.trend-chart svg { width: 100%; height: 240px; overflow: visible; }
.grid-line { stroke: #eee; stroke-width: 1; }
.trend-area { fill: rgba(255,230,15,.18); }
.trend-line { fill: none; stroke: #ffac05; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-dot { fill: #fff; stroke: #ffac05; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-y-axis { position: absolute; inset: 0 auto 50px 0; display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 11px; }
.trend-x-axis { height: 22px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.trend-x-axis .hidden-label { visibility: hidden; }
.channel-content { min-height: 208px; display: flex; align-items: center; justify-content: center; gap: 30px; }
.channel-ring { position: relative; width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; background: #eee; }
.channel-ring::before { position: absolute; inset: 25px; content: ""; border-radius: 50%; background: #fff; }
.channel-ring > div { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; }
.channel-ring strong { font-size: 22px; font-weight: 500; }
.channel-ring span { color: var(--muted); font-size: 11px; }
.channel-legend { min-width: 150px; display: grid; gap: 12px; }
.channel-legend > div { display: flex; justify-content: space-between; gap: 14px; }
.channel-legend span { color: #666; }
.channel-legend i { width: 8px; height: 8px; display: inline-block; margin-right: 7px; border-radius: 50%; }
.channel-legend b { font-weight: 500; }
.channel-legend small { color: var(--muted); font-weight: 400; }
.business-strip { display: grid; grid-template-columns: repeat(3,1fr); padding-top: 16px; border-top: 1px solid var(--line); }
.business-strip div { display: grid; gap: 5px; text-align: center; border-right: 1px solid var(--line); }
.business-strip div:last-child { border-right: 0; }
.business-strip span { color: var(--muted); font-size: 12px; }
.business-strip strong { font-size: 18px; font-weight: 500; }
.rank { width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; background: #f0f0f0; font-size: 11px; }
.rank-1 { color: #fff; background: #ff4f24; }.rank-2 { color: #fff; background: #ff9b10; }.rank-3 { color: #fff; background: #49cc6a; }
.service-score { color: #0daeff; }
.product-list { margin-top: 10px; }
.product-row { min-height: 60px; display: grid; grid-template-columns: 28px 42px minmax(0,1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.product-row .product-thumb { width: 38px; height: 38px; font-size: 16px; }
.product-name { min-width: 0; display: grid; gap: 3px; }
.product-name strong, .product-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-name strong { font-weight: 500; }.product-name small { color: var(--muted); font-size: 11px; }
.product-row > b { color: var(--red); font-weight: 500; }
.product-overview-panel, .pending-panel { margin-top: 16px; }
.product-overview { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 18px; }
.product-stat { padding: 5px 22px; border-right: 1px solid var(--line); }
.product-stat:last-child { border-right: 0; }
.product-stat span { display: block; color: #777; }
.product-stat strong { display: inline-block; margin: 8px 4px 0 0; font-size: 24px; font-weight: 500; }
.product-stat small { color: var(--muted); }
.dashboard-pending-list { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-top: 18px; }
.pending-item { min-height: 68px; display: flex; align-items: center; gap: 9px; padding: 0 13px; color: #555; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pending-item:hover { border-color: var(--yellow-dark); }
.pending-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 6px; background: #f2f2f2; }
.pending-item strong { margin-left: auto; font-size: 18px; font-weight: 500; }
.pending-item > svg { color: #aaa; }

.account-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.account-card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; }
.account-card-head { display: flex; justify-content: space-between; gap: 12px; }
.account-card-head h3 { font-size: 15px; font-weight: 600; }
.account-card-head p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.status-dot { display: inline-flex; align-items: center; gap: 5px; color: #777; font-size: 12px; }
.status-dot::before { width: 7px; height: 7px; content: ""; border-radius: 50%; background: #aaa; }
.status-dot.connected::before { background: var(--green); }.status-dot.connecting::before,.status-dot.reconnecting::before { background: #ff9b10; }.status-dot.error::before { background: var(--red); }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 18px; padding: 14px 0; border-block: 1px solid var(--line); }
.account-stats div { display: grid; gap: 3px; text-align: center; border-right: 1px solid var(--line); }.account-stats div:last-child { border: 0; }
.account-stats strong { font-size: 20px; font-weight: 500; }.account-stats span { color: var(--muted); font-size: 11px; }
.account-card-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 15px; }
.account-card-actions button { min-width: 62px; padding-inline: 12px; }
.account-error { overflow: hidden; margin-top: 10px; color: var(--red); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shop-list-panel { margin-top: 16px; }
.shop-list-panel .data-table-wrap { margin-top: 18px; }
.settings-layout { display: grid; gap: 16px; }
.settings-status { margin-top: 18px; }
.settings-row { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); }
.settings-row span:first-child { display: grid; gap: 3px; }.settings-row b { font-weight: 500; }.settings-row small { color: var(--muted); }
.settings-actions { display: flex; gap: 10px; margin-top: 18px; }

.toast { position: fixed; z-index: 2147483647; inset: auto 24px 24px auto; box-sizing: border-box; width: max-content; min-width: min(320px, calc(100vw - 48px)); max-width: min(480px, calc(100vw - 48px)); min-height: 56px; margin: 0; padding: 16px 20px; overflow-wrap: anywhere; pointer-events: none; color: #175f34; border: 1px solid #72c391; border-left: 5px solid #239653; border-radius: 8px; background: #f2fff7; box-shadow: 0 16px 42px rgba(0,0,0,.28), 0 3px 10px rgba(0,0,0,.16); font-size: 14px; font-weight: 600; line-height: 1.55; animation: toast-enter .18s ease-out both; }
.toast::backdrop { background: transparent; pointer-events: none; }
.sync-status { display: inline-flex; align-items: center; min-height: 30px; margin-left: 8px; color: var(--muted); font-size: 12px; vertical-align: middle; }
.sync-status.syncing::before { content: ""; width: 13px; height: 13px; margin-right: 5px; border: 2px solid #d9e1e8; border-top-color: var(--yellow-dark); border-radius: 50%; animation: connector-spin .8s linear infinite; }
.sync-status.success { color: #277744; }.sync-status.error { color: #ae3d28; }
.reference-toolbar button.is-syncing svg { animation: connector-spin .8s linear infinite; }
.toast.error { color: #922c20; border-color: #e29a8c; border-left-color: #cf3f2e; background: #fff4f1; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.metric-dialog, .import-dialog { width: min(620px,calc(100% - 36px)); padding: 0; color: #333; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.metric-dialog { width: min(420px,calc(100% - 36px)); }
.metric-dialog::backdrop, .import-dialog::backdrop { background: rgba(0,0,0,.2); }
.metric-dialog > div, .dialog-content, .import-dialog form { position: relative; box-sizing: border-box; width: 100%; padding: 24px; }
.metric-dialog h2, .import-dialog h2 { font-size: 16px; font-weight: 600; }
.metric-dialog p { margin: 16px 0 22px; color: #777; line-height: 1.8; }
.dialog-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; color: #777; border: 0; border-radius: 50%; background: transparent; }
.dialog-close:hover { color: #333; background: #f5f5f5; }
.import-dialog header { position: relative; padding-right: 38px; }
.import-dialog header p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.import-dialog header .dialog-close { top: -8px; right: -8px; }
.file-drop { position: relative; min-height: 126px; display: grid; place-items: center; align-content: center; gap: 6px; margin-top: 20px; overflow: hidden; color: #777; border: 1px dashed #bbb; border-radius: 8px; background: #fafafa; cursor: pointer; }
.file-drop:hover { border-color: var(--yellow-dark); background: #fffdf0; }
.file-drop input { position: absolute; width: 1px !important; max-width: 1px; height: 1px; overflow: hidden; opacity: 0; clip-path: inset(50%); }.file-drop svg { width: 28px; height: 28px; color: #ffac05; }.file-drop span { color: var(--muted); font-size: 12px; }
.import-dialog details { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.import-dialog summary { cursor: pointer; }.import-dialog code { display: block; overflow-wrap: anywhere; margin-top: 8px; color: #777; font-size: 12px; }.import-dialog details p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.import-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.import-result { display: grid; gap: 4px; margin-top: 14px; padding: 12px 14px; color: #277744; border: 1px solid #b9dfc7; border-radius: 8px; background: #f0faf4; font-size: 12px; }
.import-result pre { max-height: 120px; overflow: auto; margin: 5px 0 0; color: var(--red); white-space: pre-wrap; }
.dialog-field { min-width: 0; display: grid; gap: 7px; margin-top: 16px; color: #555; font-size: 12px; }
.dialog-field input, .dialog-field select, .dialog-field textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 11px; color: #333; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fff; }
.dialog-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.record-dialog { width: min(560px,calc(100% - 36px)); }
.record-detail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; margin-top: 18px; border-top: 1px solid var(--line); }
.record-detail > div { min-height: 58px; display: grid; align-content: center; gap: 5px; border-bottom: 1px solid var(--line); }
.record-detail span { color: var(--muted); font-size: 12px; }
.record-detail strong { overflow-wrap: anywhere; font-weight: 400; }
.record-dialog footer { display: flex; justify-content: flex-end; margin-top: 20px; }
.template-variables { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.template-variables button { height: 28px; padding: 0 10px; color: #666; border: 1px solid var(--line); border-radius: 4px; background: #fafafa; }
.compact-empty { min-height: 220px; }
.settings-page-block > .primary-button { margin-top: 16px; }
.dialog-field input:focus, .dialog-field select:focus, .dialog-field textarea:focus { border-color: var(--yellow-dark); }
.help-list { display: grid; gap: 10px; margin-top: 20px; }
.help-list button { min-height: 66px; display: flex; align-items: center; gap: 14px; padding: 12px 14px; color: #333; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; }
.help-list button:hover { border-color: var(--yellow-dark); background: #fffdf0; }.help-list button > svg { width: 22px; height: 22px; color: #ffac05; }.help-list span { display: grid; gap: 3px; }.help-list small { color: var(--muted); }

@media (max-width: 1260px) {
  .top-header { padding-right: 20px; }
  .top-nav-item { padding-inline: 10px; }
  .workbench-brand { grid-template-columns: minmax(300px, 1fr) minmax(310px, 40%); }
  .workbench-brand-copy { padding-left: 24px; }
  .workbench-brand-visual { padding-right: 10px; }
  .home-stat-item { flex-basis: calc(25% - 9px); margin-right: 12px; }
  .commonly-item { flex-basis: 25%; }
  .account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-grid { gap: 10px; }
  .two-column { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  html, body { min-width: 0; }
  .top-header { height: 54px; padding: 0 10px; }
  .top-header-inner { min-width: 0; gap: 4px; }
  .logo-ads { min-width: 0; margin-right: auto; }
  .logo { width: 36px; height: 36px; flex-basis: 36px; }
  .brand-wordmark { gap: 0; }
  .brand-wordmark strong { font-size: 17px; line-height: 20px; }
  .brand-wordmark small { display: none; }
  .top-nav { flex: 0 0 auto; }
  .top-nav-item { width: 34px; justify-content: center; padding: 0; border: 0; }
  .top-nav-item span, .user-info span:not(.user-avatar), .user-info > svg, #client-entry, #manual-entry { display: none; }
  .user-info { width: 34px; justify-content: center; padding: 0; }
  .account-popover { top: calc(100% - 2px); width: min(286px, calc(100vw - 16px)); max-height: calc(100dvh - 56px - env(safe-area-inset-bottom)); }
  .app-shell { padding-top: 54px; }
  .left-aside { inset: auto 0 0; width: 100%; height: 58px; }
  .first-nav { width: 100%; height: 58px; flex: 1; flex-direction: row; overflow-x: auto; }
  .first-nav-list { display: contents; }
  .first-nav { overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
  .first-nav::-webkit-scrollbar { display: none; }
  .nav-item { min-width: 20%; width: 20%; height: 58px; flex: 0 0 20%; flex-direction: column; gap: 2px; padding: 0 2px; border: 0; font-size: 11px; line-height: 16px; }
  .nav-item-wrap { min-width: 20%; width: 20%; height: 58px; flex: 0 0 20%; }
  .nav-item-wrap .nav-item { min-width: 100%; width: 100%; height: 58px; }
  .nav-read-all { display: none; }
  .nav-item:not([data-route="workbench"]):not([data-route="products"]):not([data-route="orders"]):not([data-route="im"]):not(.mobile-more-nav) { display: none; }
  .mobile-more-nav { display: flex; }
  .nav-item.active { border-top: 3px solid var(--yellow); }
  .nav-item svg { width: 18px; height: 18px; }
  .sec-nav, .fold-btn { display: none; }
  .main-content, body.no-secondary .main-content, body.nav-folded .main-content { width: 100%; min-height: calc(100vh - 54px); margin-left: 0; padding-bottom: 58px; }
  .app-view { min-height: calc(100vh - 112px); }
  .home-container { height: calc(100vh - 112px); padding: 12px; }
  .workbench-brand { min-height: 178px; display: block; }
  .workbench-brand-copy { min-height: 176px; width: 100%; padding: 20px; }
  .workbench-brand h1 { font-size: 20px; line-height: 28px; }
  .workbench-brand-copy > p { max-width: 300px; font-size: 13px; line-height: 20px; }
  .workbench-brand-actions { margin-top: 15px; }
  .workbench-brand-actions button { height: 34px; padding-inline: 11px; font-size: 12px; }
  .workbench-brand-visual { display: none; }
  .home-module { padding: 16px; }
  .module-head { align-items: flex-start; gap: 10px; }
  .module-head-tools { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .module-head-tools > span { display: none; }
  .module-head-tools select { min-width: 112px; max-width: 130px; }
  .pending-list, .statistics-list { gap: 10px; }
  .home-stat-item { height: 88px; flex-basis: calc(50% - 5px); margin: 0 !important; padding: 12px; }
  .home-stat-main strong { font-size: 21px; }.home-stat-main span { font-size: 12px; }.home-stat-icon { width: 34px; height: 34px; flex-basis: 34px; margin-left: 6px; }
  .pending-list .home-stat-item { height: 100px; }
  .pending-list .home-stat-main > span { overflow: visible; font-size: 11px; line-height: 16px; text-overflow: clip; white-space: normal; }
  .order-statistics-list { grid-template-columns: repeat(2,minmax(0,1fr)); }.order-stat-item:nth-child(2n) { border-right: 0; }.order-stat-item:nth-child(n+5) { border-bottom: 1px solid var(--line); }.order-stat-item:nth-child(n+7) { border-bottom: 0; }
  .date-buttons { order: 3; width: 100%; display: flex; justify-content: flex-end; }.date-buttons button { min-width: 42px; padding: 0 9px; }.commonly-item { flex-basis: 50%; margin-bottom: 18px; }
  .business-view { padding: 12px; }.business-head { padding: 0 16px; }.business-panel, .filter-panel { padding: 16px; }
  .workspace-toolbar { align-items: stretch; flex-direction: column; }.segmented { overflow-x: auto; }.segmented button { flex: 0 0 auto; }.search-field { width: 100%; }
  .catalog-item { grid-template-columns: 48px minmax(0,1fr); }.catalog-stat { display: none; }
  .im-workspace { min-height: calc(100vh - 188px); grid-template-columns: 1fr; grid-template-rows: 210px minmax(0,1fr); }.session-list { border-right: 0; border-bottom: 1px solid var(--line); }.message-bubble { max-width: 88%; }
  .filter-panel { align-items: stretch; flex-direction: column; gap: 12px; }.filter-field select { width: 100%; }.metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.dashboard-pending-list, .product-overview { grid-template-columns: repeat(2,1fr); }.product-stat:nth-child(2) { border-right: 0; }
  .account-grid { grid-template-columns: 1fr; }.data-table { min-width: 780px; }.toast { inset: auto 12px 70px; width: auto; min-width: 0; max-width: none; text-align: center; }
  .mobile-nav-drawer:not([hidden]) { position: fixed; z-index: 30; inset: 0 0 58px; display: block; background: rgba(0,0,0,.3); }
  .mobile-nav-drawer > section { position: absolute; right: 0; bottom: 0; left: 0; max-height: min(520px,calc(100dvh - 88px)); overflow: auto; border-top: 1px solid #e5e5e5; border-radius: 8px 8px 0 0; background: #fff; box-shadow: 0 -12px 32px rgba(0,0,0,.16); }
  .mobile-nav-drawer header { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #eee; }
  .mobile-nav-drawer header strong { font-size: 16px; }
  .mobile-drawer-brand { min-width: 0; display: flex; align-items: center; gap: 9px; }
  .mobile-drawer-brand img { width: 32px; height: 32px; display: block; flex: 0 0 32px; object-fit: contain; }
  .mobile-drawer-brand span { min-width: 0; display: grid; gap: 1px; }
  .mobile-drawer-brand strong { line-height: 18px; }
  .mobile-drawer-brand small { color: #777; font-size: 10px; line-height: 12px; }
  .mobile-nav-drawer header button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; color: #737373; border: 0; border-radius: 4px; background: transparent; }
  .mobile-nav-drawer nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 12px 10px calc(18px + env(safe-area-inset-bottom)); }
  .mobile-nav-drawer nav a { min-width: 0; height: 68px; display: grid; place-items: center; align-content: center; gap: 6px; color: #4f4f4f; border: 0; border-radius: 6px; background: #fff; font-size: 11px; }
  .mobile-nav-drawer nav a:active, .mobile-nav-drawer nav a.active { color: #333; background: #fff7ae; }
  .mobile-nav-drawer nav svg { width: 20px; height: 20px; }
}

/* v3.62 list workspaces: extracted from the product, order and shop chunks. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.reference-list-view { position: relative; height: 100%; padding: 24px; overflow: auto; color: #333; }
.reference-container-act { min-height: 100%; padding: 16px 24px 0; background: #fff; border-radius: 7px; }
.commerce-status-strip { display: grid; grid-template-columns: repeat(7,minmax(118px,1fr)); gap: 8px; margin: 0 0 16px; padding: 0 0 16px; overflow: auto hidden; border-bottom: 1px solid rgba(0,0,0,.06); scrollbar-width: none; }
#product-status-strip { grid-template-columns: repeat(4,minmax(150px,1fr)); }
.commerce-status-strip::-webkit-scrollbar { display: none; }
.commerce-status-item { min-width: 0; height: 66px; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; padding: 0 12px; color: #525860; border: 1px solid #eceef0; border-radius: 6px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.commerce-status-item:hover { color: #333; border-color: #d9dce0; box-shadow: 0 3px 10px rgba(0,0,0,.05); }
.commerce-status-item.active { color: #282828; border-color: #f0d900; background: #fffdf0; box-shadow: inset 0 -3px #ffe20d; }
.commerce-status-item > span { width: 34px; height: 34px; display: grid; place-items: center; color: #6f7780; border-radius: 5px; background: #f4f5f6; }
.commerce-status-item.active > span { color: #7a6700; background: #fff3a8; }
.commerce-status-item > span svg { width: 17px; height: 17px; }
.commerce-status-item > div { min-width: 0; display: grid; gap: 2px; }
.commerce-status-item strong { color: #20242a; font-size: 19px; line-height: 22px; }
.commerce-status-item small { overflow: hidden; color: #7c838b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.commerce-status-item > svg { display: none; }
.commerce-status-loading { grid-column: 1 / -1; min-height: 66px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #8c939b; }
.commerce-status-loading svg { width: 17px; animation: connector-spin .8s linear infinite; }
.reference-search-box { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; padding-bottom: 14px; }
.reference-search-box label { display: grid; gap: 7px; min-width: 160px; color: #666; font-size: 12px; line-height: 17px; }
.reference-search-box label > span { color: #666; }
.reference-search-box input:not([type="checkbox"]), .reference-search-box select { width: 180px; height: 32px; padding: 0 12px; color: #333; border: 1px solid rgba(0,0,0,.12); border-radius: 4px; background: #fff; outline: 0; }
.reference-search-box input:focus, .reference-search-box select:focus { border-color: #0daeff; box-shadow: 0 0 0 2px rgba(13,174,255,.08); }
.reference-search-box .range-control { grid-template-columns: 140px auto 140px; align-items: center; min-width: 304px; }
.reference-search-box .range-control > span { grid-column: 1 / -1; }
.reference-search-box .range-control input { width: 140px; }
.reference-search-box .range-control b { color: #a3a3a3; font-weight: 400; }
.reference-search-actions { display: flex; align-items: center; height: 32px; gap: 8px; }
.reference-search-extra { flex-basis: 100%; display: flex; gap: 16px; }
.reference-search-extra[hidden] { display: none; }
.primary-button.compact, .outline-button.compact, .plain-button { min-width: 70px; height: 32px; padding: 0 14px; border-radius: 4px; font-size: 14px; }
.plain-button { color: #333; border: 1px solid rgba(0,0,0,.12); background: #fff; }
.plain-button:hover, .outline-button.compact:hover { color: #0daeff; border-color: #0daeff; }
.plain-button svg, .primary-button.compact svg, .outline-button.compact svg, .link-button svg { width: 15px; height: 15px; vertical-align: -2px; }
.reference-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 6px 0 8px; border-top: 1px solid rgba(0,0,0,.06); }
.reference-toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; }
.reference-hint { margin: 0 0 8px; color: #a3a3a3; font-size: 12px; line-height: 18px; }
.reference-table-wrap { min-height: 350px; overflow: auto; border-top: 1px solid rgba(0,0,0,.08); }
.reference-table { min-width: 1040px; }
.order-table th:last-child, .order-table td:last-child,
.product-table th:last-child, .product-table td:last-child,
.refund-table th:last-child, .refund-table td:last-child { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -8px 0 12px rgba(32,35,38,.035); }
.order-table th:last-child, .product-table th:last-child, .refund-table th:last-child { z-index: 3; background: #fafafa; }
.order-table td:last-child, .product-table td:last-child, .refund-table td:last-child { min-width: 132px; }
.reference-table th { height: 46px; padding: 0 12px; color: #666; background: #fafafa; font-size: 12px; }
.reference-table td { height: 78px; padding: 7px 12px; color: #333; line-height: 20px; white-space: normal; }
.reference-table .check-column { width: 44px; text-align: center; text-overflow: clip; }
.product-table { width: 100%; min-width: 1320px; table-layout: fixed; }
.product-table .product-select-track { width: 44px; }
.product-table .product-info-track { width: 26.25%; }
.product-table .product-id-track { width: 29.25%; }
.product-table .product-price-track { width: 9.75%; }
.product-table .product-stock-track, .product-table .product-sales-track { width: 5.85%; }
.product-table .product-status-track { width: 8.8%; }
.product-table .product-operation-track { width: 11.5%; }
.product-id-list { display: grid; gap: 2px; color: #8a8f96; font-size: 12px; line-height: 18px; }
.product-id-list span { display: block; white-space: nowrap; }
.product-id-list strong { color: #333; font-weight: 500; }
.detail-row strong { white-space: pre-line; }
@media (min-width: 761px) {
  .product-table th:first-child, .product-table td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; }
  .product-table th:nth-child(2), .product-table td.product-info-column { position: sticky; left: 44px; z-index: 1; background: #fff; box-shadow: 8px 0 12px rgba(32,35,38,.035); }
  .product-table th:first-child, .product-table th:nth-child(2) { z-index: 4; background: #fafafa; }
  .product-table tbody tr:has(input[type="checkbox"]:checked) td:is(:first-child, .product-info-column) { background: #fffdf0; }
}
.reference-empty { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 280px; color: #a3a3a3; }
.reference-empty svg { width: 42px; height: 42px; color: #d4d4d4; stroke-width: 1.2; }
.reference-loading { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 10px; color: #8c939b; }
.reference-loading svg { width: 24px; height: 24px; color: #d2b900; animation: connector-spin .8s linear infinite; }
.reference-pagination { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 16px; }
.reference-pagination > div, .pager { display: flex; align-items: center; gap: 8px; }
.commerce-selection-bar { min-height: 40px; padding: 4px 8px; border: 1px solid #f0df67; border-radius: 5px; background: #fffbea; }
.commerce-selection-bar[hidden] { display: none; }
.commerce-selection-bar > strong { padding: 0 8px 0 4px; color: #5f5300; font-size: 13px; white-space: nowrap; }
.selection-clear-button { width: 30px; height: 30px; display: grid; flex: 0 0 30px; place-items: center; padding: 0; color: #756900; border: 0; border-radius: 4px; background: transparent; }
.selection-clear-button:hover { background: #f8edaa; }
.selection-clear-button svg { width: 15px; height: 15px; }
.reference-table tbody tr:has(input[type="checkbox"]:checked) { background: #fffdf0; box-shadow: inset 3px 0 #ffe20d; }
.plain-button.danger { color: #d9433f; }
.plain-button.danger:hover { color: #c92824; border-color: #e46b68; }
.pager { color: #666; font-size: 12px; }
.pager button, .pager strong { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 3px; background: #f4f4f5; font-weight: 400; }
.pager button svg { width: 14px; }
.pager strong { color: #333; background: #ffe60f; }
.pager select { height: 28px; border: 1px solid rgba(0,0,0,.1); border-radius: 3px; background: #fff; }
.table-product-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.table-product-thumb { display: grid; width: 64px; height: 64px; flex: 0 0 64px; place-items: center; overflow: hidden; color: #666; border: 1px solid rgba(0,0,0,.08); border-radius: 4px; background: #f5f5f5; font-size: 22px; }
.table-product-thumb { position: relative; }
.table-product-thumb img, .shop-store-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.table-product-cell div { display: grid; gap: 4px; min-width: 0; }
.table-product-cell strong { display: -webkit-box; overflow: hidden; color: #333; font-weight: 400; line-height: 20px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.table-product-cell small, .table-muted { overflow: hidden; color: #a3a3a3; text-overflow: ellipsis; white-space: nowrap; }
.order-buyer-cell { min-width: 0; display: grid; gap: 2px; }
.order-buyer-cell strong, .order-buyer-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-buyer-cell strong { font-weight: 400; }
.order-buyer-cell small { color: #a3a3a3; }
.reference-operation { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.reference-operation button { padding: 0; color: #0daeff; border: 0; background: transparent; font-size: 14px; line-height: 23px; }
.reference-operation button:hover { color: #008bd0; }
.reference-list-view .status-tag { border-radius: 3px; }

.after-sale-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0 0 14px; }
.after-sale-metric { min-width: 0; min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.after-sale-metric > span { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; color: #555; border-radius: 5px; background: #f5f5f5; }
.after-sale-metric > span svg { width: 18px; height: 18px; }
.after-sale-metric > div { min-width: 0; display: grid; gap: 2px; }
.after-sale-metric strong { overflow: hidden; color: #222; font-size: 20px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.after-sale-metric small { color: #888; font-size: 12px; }
.after-sale-metric.warning > span { color: #a86600; background: #fff4d4; }
.after-sale-metric.danger > span { color: #d6452d; background: #fff0ed; }
.after-sale-metric.success > span { color: #238a49; background: #e9f8ee; }
.after-sale-type, .after-sale-state, .after-sale-sla { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; min-height: 22px; padding: 2px 7px; border-radius: 3px; font-size: 11px; line-height: 16px; white-space: nowrap; }
.after-sale-type { color: #755300; background: #fff5c2; }
.after-sale-state { color: #32628c; background: #ebf5ff; }
.after-sale-state.state-completed { color: #247841; background: #eaf8ef; }
.after-sale-state.state-refunding, .after-sale-state.state-pending_refund_approval { color: #8b6100; background: #fff3cf; }
.after-sale-state.state-rejected, .after-sale-state.state-cancelled { color: #777; background: #f1f1f1; }
.after-sale-state.state-platform_intervention { color: #b13e2b; background: #fff0ed; }
.after-sale-sla { color: #65717d; background: #f2f4f6; }
.after-sale-sla.warning { color: #9a6500; background: #fff4d4; }
.after-sale-sla.breached { color: #c33b26; background: #fff0ed; }
.after-sale-sla.done { color: #238a49; background: #eaf8ef; }
.after-sale-status-stack { display: grid; justify-items: start; gap: 5px; }
.after-sale-action-group { display: contents; }
.after-sale-action-group .primary-button { min-height: 32px; padding: 0 13px; }
.after-sale-dialog { width: min(720px,calc(100% - 36px)); }
.after-sale-order-preview { min-height: 68px; display: flex; align-items: center; gap: 11px; margin-top: 12px; padding: 10px 12px; color: #999; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; }
.after-sale-order-preview .table-product-thumb { width: 46px; height: 46px; flex-basis: 46px; font-size: 17px; }
.after-sale-order-preview > div { min-width: 0; display: grid; flex: 1; gap: 4px; }
.after-sale-order-preview strong, .after-sale-order-preview small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.after-sale-order-preview strong { color: #333; font-weight: 500; }
.after-sale-order-preview small { color: #999; }
.after-sale-order-preview em { flex: 0 0 auto; color: #e44c24; font-size: 16px; font-style: normal; font-weight: 600; }
.after-sale-action-fields:empty { display: none; }
.after-sale-action-notice { min-height: 56px; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 13px; color: #755300; border: 1px solid #f0d56d; border-radius: 6px; background: #fffbea; font-size: 12px; line-height: 19px; }
.after-sale-action-notice.success { color: #247841; border-color: #b9dfc7; background: #f0faf4; }
.after-sale-action-notice svg { width: 18px; height: 18px; flex: 0 0 18px; }
.after-sale-detail-layout { display: grid; gap: 16px; }
.after-sale-detail-section { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.after-sale-detail-section > h2 { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.after-sale-detail-heading { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.after-sale-detail-heading > div:first-child { min-width: 0; display: grid; gap: 6px; }
.after-sale-detail-heading > div:last-child { display: grid; flex: 0 0 auto; justify-items: end; gap: 6px; }
.after-sale-detail-heading h2 { overflow: hidden; font-size: 18px; line-height: 25px; text-overflow: ellipsis; white-space: nowrap; }
.after-sale-detail-heading p { color: #777; }
.after-sale-detail-section .detail-summary { border: 0; }
.after-sale-evidence { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px; }
.after-sale-evidence a, .after-sale-evidence span { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 10px; color: #2f78a8; border: 1px solid #dcecf7; border-radius: 4px; background: #f7fbfe; }
.after-sale-evidence svg { width: 14px; height: 14px; }
.after-sale-timeline { margin: 0; padding: 18px 24px 18px 44px; list-style: none; }
.after-sale-timeline li { position: relative; min-height: 68px; padding: 0 0 18px 18px; border-left: 1px solid #dedede; }
.after-sale-timeline li:last-child { min-height: 0; padding-bottom: 0; border-left-color: transparent; }
.timeline-dot { position: absolute; top: 2px; left: -5px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #e7bd00; box-shadow: 0 0 0 1px #e7bd00; }
.after-sale-timeline li > div { display: grid; gap: 4px; }
.after-sale-timeline strong { font-weight: 500; }
.after-sale-timeline small { color: #999; }
.after-sale-timeline p { color: #555; line-height: 20px; overflow-wrap: anywhere; }
.after-sale-timeline em { width: fit-content; padding: 2px 6px; color: #777; border-radius: 3px; background: #f5f5f5; font-size: 11px; font-style: normal; }

.shop-reference-view { height: 100%; overflow: auto; }
.shop-reference-columns { display: flex; justify-content: space-between; gap: 16px; width: 100%; min-height: 100%; padding: 16px 16px 24px; }
.shop-reference-main { flex: 1; min-width: 0; }
.shop-user-strip { display: flex; align-items: center; justify-content: space-between; height: 78px; margin-bottom: 16px; padding: 0 24px; background: #fff; border-radius: 8px; }
.shop-user-strip > div:first-child { display: grid; gap: 6px; }
.shop-user-strip strong { font-size: 16px; line-height: 22px; }
.shop-user-strip span { color: #666; font-size: 13px; }
.shop-user-strip > div:last-child { display: flex; gap: 8px; }
.round { min-width: 120px; height: 40px; border-radius: 22px; font-weight: 600; font-size: 15px; }
.shop-ability-panel { padding: 24px 24px 24px 32px; background: #fff; border-radius: 8px; }
.shop-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; line-height: 20px; }
.shop-section-title > span { color: #a3a3a3; font-size: 14px; }
.shop-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.shop-store-card { position: relative; display: flex; flex-direction: column; min-height: 224px; padding: 16px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); border-radius: 8px; background: #fff; }
.shop-store-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.shop-store-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; color: #333; border-radius: 50%; background: #ffe60f; font-size: 18px; font-weight: 600; }
.shop-store-avatar { position: relative; overflow: hidden; }
.shop-store-card header div { display: grid; gap: 2px; min-width: 0; }
.shop-store-card header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-store-card header small { color: #a3a3a3; font-size: 12px; }
.shop-connection { margin-left: auto; padding: 2px 7px; color: #777; border-radius: 9px; background: #f1f1f1; font-size: 11px; }
.shop-connection.connected { color: #238a49; background: #e9f8ee; }
.shop-store-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 4px 0 12px; padding: 10px 0; border-block: 1px solid #f0f0f0; }
.shop-store-metrics > span { min-width: 0; display: grid; justify-items: center; gap: 2px; border-right: 1px solid #f0f0f0; }
.shop-store-metrics > span:last-child { border-right: 0; }
.shop-store-metrics strong { max-width: 100%; overflow: hidden; color: #333; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.shop-store-metrics small { color: #999; font-size: 10px; }
.shop-store-card p { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1; color: #666; line-height: 22px; }
.shop-store-card p small { overflow: hidden; color: #999; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shop-store-card footer { display: flex; gap: 8px; }
.shop-store-card footer button { position: relative; flex: 1; justify-content: center; }
.shop-store-card footer button svg { width: 14px; height: 14px; }
.shop-store-card footer button b { min-width: 16px; height: 16px; display: grid; place-items: center; margin-left: 3px; padding: 0 3px; color: #fff; border-radius: 8px; background: #ff512f; font-size: 9px; }
.shop-empty-card { grid-column: 1 / -1; padding: 24px; border: 1px solid rgba(0,0,0,.08); border-radius: 8px; }
.shop-empty-card strong, .shop-empty-card span { display: block; line-height: 22px; }
.shop-empty-card span { color: #a3a3a3; font-size: 13px; }
.shop-empty-card button { margin-top: 14px; }
.service-heading { margin-top: 4px; margin-bottom: 14px; }
.service-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.service-card-grid > button { position: relative; min-height: 116px; padding: 16px; text-align: left; border: 1px solid rgba(0,0,0,.08); border-radius: 8px; background: #fff; }
.service-card-grid > button:hover { border-color: rgba(13,174,255,.35); box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.service-card-grid > button > span { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.service-card-grid svg { width: 22px; height: 22px; color: #f58300; }
.service-card-grid small { display: block; padding-right: 60px; color: #666; font-size: 12px; line-height: 17px; }
.service-card-grid em { position: absolute; top: 16px; right: 16px; width: 60px; color: #333; border-radius: 16px; background: #ffe60f; font-size: 12px; font-style: normal; line-height: 24px; text-align: center; }
.shop-learning-panel { width: 288px; flex: 0 0 288px; padding: 24px; background: #fff; border-radius: 8px; }
.shop-learning-panel header { display: flex; align-items: center; justify-content: space-between; }
.shop-learning-panel header strong { font-size: 16px; }
.shop-learning-panel header button { color: #0daeff; border: 0; background: transparent; }
.shop-learning-panel nav { display: flex; gap: 22px; margin: 20px 0 10px; border-bottom: 1px solid rgba(0,0,0,.08); }
.shop-learning-panel nav button { position: relative; padding: 0 0 12px; color: #a3a3a3; border: 0; background: transparent; }
.shop-learning-panel nav button.active { color: #333; font-weight: 600; }
.shop-learning-panel nav button.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: #ffe60f; }
.learning-list { display: grid; }
.learning-list button { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0; color: #666; border: 0; border-bottom: 1px solid rgba(0,0,0,.06); background: transparent; font-size: 13px; text-align: left; }
.learning-list button svg { width: 14px; color: #bbb; }
.customer-service { display: grid; justify-items: center; gap: 8px; margin-top: 30px; padding: 20px 12px; background: #fafafa; border-radius: 8px; }
.customer-service svg { width: 26px; color: #0daeff; }
.customer-service span { color: #a3a3a3; font-size: 12px; }

.im-reference-view { height: calc(100vh - 64px); padding: 16px; overflow: hidden; }
.im-shell { display: grid; grid-template-columns: 280px minmax(380px,1fr) 300px; height: 100%; overflow: hidden; background: #fff; border-radius: 8px; }
.im-session-pane, .im-context-pane { min-width: 0; display: flex; flex-direction: column; }
.im-session-pane { border-right: 1px solid rgba(0,0,0,.08); }
.im-session-pane > header, .im-context-pane > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid rgba(0,0,0,.08); }
.im-session-pane > header strong, .im-context-pane > header strong { font-size: 16px; }
.im-session-pane > header div { display: flex; gap: 6px; }
.im-session-pane > header button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: #666; border: 0; border-radius: 4px; background: transparent; }
.im-session-pane > header button:hover { color: #333; background: #ffe60f; }
.im-session-pane > header svg { width: 17px; height: 17px; }
.im-search { position: relative; display: block; margin: 12px; }
.im-search svg { position: absolute; top: 8px; left: 10px; width: 16px; color: #a3a3a3; }
.im-search input { width: 100%; height: 32px; padding: 0 12px 0 34px; border: 0; border-radius: 4px; background: #f5f5f5; outline: 0; }
.im-account-tabs { display: flex; min-height: 38px; gap: 6px; padding: 0 12px 8px; overflow: auto hidden; }
.im-account-tabs button { flex: 0 0 auto; height: 28px; padding: 0 12px; color: #666; border: 1px solid rgba(0,0,0,.08); border-radius: 14px; background: #fff; font-size: 12px; }
.im-account-tabs button.active { color: #333; border-color: #ffe60f; background: #ffe60f; }
.im-reference-view .session-list { flex: 1; min-height: 0; border: 0; }
.im-reference-view .session-item { min-height: 72px; padding: 14px 16px; }
.im-reference-view .conversation { min-height: 0; }
.im-reference-view .conversation-empty { height: 100%; min-height: 0; background: #f7f7f7; }
.im-reference-view .conversation-empty strong { color: #555; font-size: 16px; }
.im-context-pane { border-left: 1px solid rgba(0,0,0,.08); }
.im-context-pane nav { display: flex; height: 44px; border-bottom: 1px solid rgba(0,0,0,.08); }
.im-context-pane nav button { position: relative; flex: 1; color: #a3a3a3; border: 0; background: #fff; }
.im-context-pane nav button.active { color: #333; font-weight: 600; }
.im-context-pane nav button.active::after { position: absolute; right: 34px; bottom: 0; left: 34px; height: 2px; content: ""; background: #ffe60f; }
#im-context-content { flex: 1; overflow: auto; }
.context-empty { display: grid; height: 100%; min-height: 260px; place-items: center; align-content: center; gap: 9px; color: #a3a3a3; }
.context-empty svg { width: 38px; height: 38px; color: #ccc; }
.context-order-card { margin: 12px; padding: 14px; border: 1px solid rgba(0,0,0,.08); border-radius: 6px; }
.context-order-card strong, .context-order-card span { display: block; }
.context-order-card span { margin-top: 6px; color: #a3a3a3; font-size: 12px; }

.im-reference-view { display: grid; grid-template-rows: 58px minmax(0, 1fr); gap: 10px; background: #f5f6f7; }
.service-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.service-kpi { min-width: 0; height: 58px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 12px; color: #6b7280; border: 1px solid rgba(0,0,0,.08); border-radius: 6px; background: #fff; text-align: left; }
.service-kpi:hover { border-color: #e9ce00; background: #fffdf0; }
.service-kpi.active { color: #2f2a00; background: #fff9bd; box-shadow: inset 0 -2px #e3c600; }
.service-kpi.loading { cursor: wait; opacity: .72; }
.service-kpi.loading strong { color: #9ca3af; }
.service-kpi svg { width: 20px; height: 20px; color: #4b5563; }
.service-kpi span { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.service-kpi strong { color: #111827; font-size: 20px; font-weight: 650; }
.service-kpi.warning svg, .service-kpi.warning strong { color: #d97706; }
.service-kpi.danger svg, .service-kpi.danger strong { color: #dc2626; }
.service-shell { min-height: 0; grid-template-columns: 304px minmax(420px, 1fr) 284px; grid-template-rows: minmax(0, 1fr); border: 1px solid #e8e8e8; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.service-shell > * { min-height: 0; }
.service-session-pane > header > div:first-child { min-width: 0; display: grid; gap: 2px; }
.service-session-pane > header > div:first-child span { color: #9ca3af; font-size: 11px; }
.service-session-pane > header > div:first-child span span { display: inline; }
.service-session-pane > header > div:first-child em { color: #9ca3af; font-style: normal; }
.service-session-pane > header > div:first-child em.online { color: #16a34a; }
.service-session-pane > header > div:first-child b { color: #d1d5db; font-weight: 400; }
.service-session-item { min-height: 88px !important; display: block; padding: 10px 12px !important; border-left: 3px solid transparent !important; }
.service-session-item:hover { background: #fafafa !important; }
.service-session-item.active { border-left-color: #f2d300 !important; background: #fffbea !important; }
.service-session-main { min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
.service-session-copy { min-width: 0; flex: 1 1 auto; }
.service-session-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-session-line strong { min-width: 0; overflow: hidden; color: #202124; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.service-session-line time { flex: 0 0 auto; color: #9ca3af; font-size: 11px; }
.service-buyer-id { display: block; max-width: 100%; overflow: hidden; margin-top: 2px; color: #9ca3af; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.service-session-copy > p { margin: 4px 0 5px; overflow: hidden; color: #6b7280; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.service-session-meta { display: flex; align-items: center; gap: 5px; overflow: hidden; }
.service-session-meta span { flex: 0 0 auto; max-width: 88px; overflow: hidden; padding: 2px 5px; color: #6b7280; border-radius: 3px; background: #f3f4f6; font-size: 10px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.service-session-meta .service-state.open { color: #166534; background: #dcfce7; }
.service-session-meta .service-state.unassigned { color: #92400e; background: #fef3c7; }
.service-session-meta .service-state.waiting_customer { color: #1d4ed8; background: #dbeafe; }
.service-session-meta .service-state.resolved { color: #6b7280; background: #e5e7eb; }
.service-session-meta .service-sla.at_risk { color: #b45309; background: #ffedd5; }
.service-session-meta .service-sla.breached { color: #b91c1c; background: #fee2e2; }
.service-tags { display: none; }
.service-tags em { padding: 1px 5px; color: #6b7280; border: 1px solid #e5e7eb; border-radius: 3px; font-size: 10px; font-style: normal; }
.connection-mark { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #cbd5e1; }
.connection-mark.connected { background: #22c55e; }
.connection-mark.reconnecting { background: #f59e0b; }
.service-empty { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 20px; color: #9ca3af; text-align: center; }
.service-empty svg { width: 30px; height: 30px; }
.service-empty strong { color: #6b7280; font-size: 13px; }
.service-empty span { font-size: 12px; }
.conversation-loading, .conversation-load-error { height: 100%; min-height: 300px; display: grid; place-items: center; align-content: center; gap: 9px; padding: 24px; color: #9097a0; text-align: center; background: #f5f6f7; }
.conversation-loading svg { width: 30px; height: 30px; color: #d4b900; animation: connector-spin .8s linear infinite; }
.conversation-refresh-status { position: absolute; z-index: 8; top: 44px; right: 14px; height: 26px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; color: #5f6368; border: 1px solid #e4e7eb; border-radius: 4px; background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(0,0,0,.06); font-size: 11px; }
.conversation-refresh-status svg { width: 13px; height: 13px; color: #c4aa00; animation: connector-spin .8s linear infinite; }
.conversation-load-error > span { width: 48px; height: 48px; display: grid; place-items: center; color: #b77900; border-radius: 50%; background: #fff3b0; }
.conversation-load-error > span svg { width: 24px; height: 24px; }
.conversation-load-error strong { color: #30343a; font-size: 15px; }
.conversation-load-error p { max-width: 360px; margin: 0 0 4px; color: #8a919a; font-size: 12px; }
.conversation-load-error button { display: inline-flex; align-items: center; gap: 6px; }
.conversation-load-error button svg { width: 14px; height: 14px; }
.service-conversation { position: relative; height: 100%; grid-template-rows: 58px minmax(0, 1fr) auto; min-width: 0; overflow: hidden; background: #f5f6f7; }
.conversation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border-bottom: 1px solid rgba(0,0,0,.08); background: #fff; }
.conversation-head > div { min-width: 0; display: flex; align-items: center; gap: 10px; }
.conversation-head > div:first-child { flex: 1 1 auto; overflow: hidden; }
.conversation-actions { flex: 0 0 auto; }
.conversation-actions .primary-button { min-width: 66px; padding-inline: 10px; white-space: nowrap; }
.conversation-head span { min-width: 0; display: grid; gap: 2px; }
.conversation-head strong, .conversation-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-head strong { color: #202124; font-size: 14px; }
.conversation-head small { color: #9ca3af; font-size: 11px; }
.buyer-avatar { position: relative; width: 34px; height: 34px; display: grid; flex: 0 0 auto; overflow: hidden; place-items: center; border-radius: 50%; background: #ffe60f; color: #3f3f3f; font-weight: 650; }
.buyer-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; background: #f3f4f6; object-fit: cover; }
.service-list-avatar { width: 38px; height: 38px; margin-top: 1px; }
.conversation-actions label select { height: 30px; min-width: 94px; padding: 0 26px 0 8px; border: 1px solid #e5e7eb; border-radius: 4px; background: #fff; font-size: 12px; }
.conversation-actions button.is-syncing svg, .conversation-actions button.is-busy svg { animation: connector-spin .8s linear infinite; }
.conversation-back { display: none; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; background: transparent; }
.service-message-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px clamp(16px, 3vw, 44px); }
.message-row { display: flex; margin-bottom: 14px; }
.message-row.outbound { justify-content: flex-end; }
.service-message-body .message-bubble { max-width: min(70%, 620px); padding: 10px 12px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.service-message-body .message-bubble.inbound { background: #fff; }
.service-message-body .message-bubble.outbound { background: #fff6a8; }
.service-message-body .message-bubble p { margin: 0; color: #303030; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.xianyu-emoticon { width: 24px; height: 24px; display: inline-block; margin: 0 1px; vertical-align: -6px; object-fit: contain; }
.xianyu-emoticon.standalone { width: 42px; height: 42px; margin: 1px 2px; vertical-align: middle; }
.xianyu-emoticon.compact { width: 18px; height: 18px; margin: 0 1px; vertical-align: -5px; }
.service-message-body .message-bubble small { display: block; margin-top: 5px; color: #9ca3af; font-size: 10px; text-align: right; }
.message-media { max-width: 100%; color: #52525b; text-decoration: none; }
.message-media.image { display: grid; gap: 6px; }
.message-media.image img { width: auto; max-width: min(320px, 100%); max-height: 360px; display: block; border-radius: 4px; object-fit: contain; }
.message-media.video { width: min(360px, 100%); max-height: 360px; display: block; border-radius: 4px; background: #111; }
.message-media.audio { width: min(310px, 100%); display: block; }
.message-attachment { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; color: #2563eb; font-size: 12px; text-decoration: none; }
.message-attachment svg { width: 14px; height: 14px; }
.service-new-message { position: absolute; z-index: 5; right: 22px; bottom: 145px; height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; border: 1px solid #ead000; border-radius: 16px; background: #fff; color: #6b5c00; box-shadow: 0 4px 14px rgba(0,0,0,.12); font-size: 12px; }
.service-new-message[hidden] { display: none; }
.service-new-message svg { width: 14px; height: 14px; }
.service-composer-shell { position: relative; min-width: 0; }
.service-composer { display: grid; grid-template-rows: 38px auto; padding: 0; border-top: 1px solid rgba(0,0,0,.08); background: #fff; }
.composer-tools { display: flex; align-items: center; gap: 2px; padding: 0 10px; border-bottom: 1px solid #f1f1f1; }
.composer-tools button { height: 30px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; color: #626262; border: 0; border-radius: 4px; background: #fff; font-size: 12px; }
.composer-tools button:hover { background: #f3f4f6; }
.composer-tools svg { width: 15px; height: 15px; }
.composer-tools > span { margin-left: auto; color: #9ca3af; font-size: 10px; }
.composer-input { display: grid; grid-template-columns: minmax(0, 1fr) 82px; gap: 10px; padding: 10px; }
.composer-input textarea { min-height: 70px; max-height: 160px; resize: vertical; padding: 8px; border: 0; outline: 0; font: inherit; }
.composer-input button { align-self: end; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.composer-input button svg { width: 15px; }
.composer-popover { position: absolute; z-index: 10; right: 10px; bottom: calc(100% - 38px); left: 10px; max-height: 330px; overflow: auto; border: 1px solid #dedede; border-radius: 6px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
#service-image-form { display: grid; gap: 10px; padding: 12px; }
#service-image-form label { min-width: 0; display: grid; gap: 5px; color: #6b7280; font-size: 11px; }
#service-image-form input { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid #dfe3e7; border-radius: 4px; outline: 0; }
#service-image-form input:focus { border-color: #d5ba00; box-shadow: 0 0 0 2px rgba(255,225,0,.14); }
#service-image-preview { width: 100%; max-height: 170px; display: block; border: 1px solid #e5e7eb; border-radius: 4px; background: #f7f8f9; object-fit: contain; }
#service-image-form > button { justify-self: end; }
.xianyu-emoticon-picker { display: grid; grid-template-columns: repeat(auto-fill,minmax(48px,1fr)); gap: 2px; max-height: 286px; padding: 8px; overflow: auto; }
.xianyu-emoticon-picker button { aspect-ratio: 1; min-width: 0; display: grid; place-items: center; padding: 5px; border: 1px solid transparent; border-radius: 4px; background: #fff; cursor: pointer; }
.xianyu-emoticon-picker button:hover, .xianyu-emoticon-picker button:focus-visible { border-color: #e0c400; background: #fffbed; outline: 0; }
.xianyu-emoticon-picker img { width: 38px; height: 38px; object-fit: contain; }
.composer-input button.is-sending svg { animation: connector-spin .8s linear infinite; }
.primary-button.is-busy svg, .outline-button.is-busy svg, button.is-busy svg { animation: connector-spin .8s linear infinite; }
.primary-button.is-success, .outline-button.is-success, button.is-success { color: #11693d; border-color: #8fd0ae; background: #eaf8f0; }
.primary-button.is-error, .outline-button.is-error, button.is-error { color: #a92b25; border-color: #edaaa6; background: #fff0ef; }
.message-row.message-send-failed .message-bubble { border-color: #dc2626; background: #fff1f1; opacity: 1; }
.message-row.message-send-failed small { color: #b91c1c; }
.message-failure-action { width: 24px; height: 24px; display: grid; flex: 0 0 24px; place-items: center; margin-top: 8px; padding: 0; color: #e02424; border: 0; border-radius: 50%; background: transparent; }
.message-failure-action:hover, .message-failure-action:focus-visible { color: #b91c1c; background: #fee2e2; outline: 0; }
.message-failure-action svg { width: 18px; height: 18px; fill: #e02424; color: #fff; stroke-width: 2.8; }
.message-recalled { width: 100%; justify-content: center !important; }
.message-recalled > button { display: inline-flex; align-items: center; gap: 7px; padding: 3px 6px; color: #969ca4; border: 0; background: transparent; font-size: 11px; }
.message-recalled > button:not(:disabled):hover span { color: #747b84; }
.message-recalled em { color: #8a7200; font-style: normal; }
.message-recalled > button:not(:disabled):hover em { text-decoration: underline; }
.message-row.message-optimistic { animation: message-send-enter .2s ease-out both; }
.message-row.message-removing { pointer-events: none; animation: message-remove .18s ease-in both; }
.message-quote { min-width: 150px; display: grid; gap: 2px; margin: 0 0 7px; padding: 6px 8px; overflow: hidden; color: #60656d; border-left: 3px solid #c8ae00; background: rgba(255,255,255,.58); font-size: 10px; }
.message-quote strong { color: #42464c; font-size: 10px; }
.message-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-quote { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 10px; border-bottom: 1px solid #eee; background: #fffdf0; }
.composer-quote > span { min-width: 0; display: grid; grid-template-columns: 18px auto minmax(0,1fr); align-items: center; gap: 6px; }
.composer-quote > span > svg { width: 14px; color: #9a8200; }
.composer-quote strong { font-size: 11px; }
.composer-quote small { min-width: 0; overflow: hidden; color: #7d8289; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.composer-quote > button { width: 26px; height: 26px; display: grid; flex: 0 0 26px; place-items: center; padding: 0; color: #737981; border: 0; background: transparent; }
.composer-quote > button:hover { background: #f1f2f3; }
.composer-quote > button svg { width: 14px; }
.message-context-menu { position: fixed; z-index: 1200; width: 148px; display: grid; padding: 5px; border: 1px solid #dfe2e5; border-radius: 6px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: context-menu-enter .12s ease-out both; }
.message-context-menu button { height: 34px; display: flex; align-items: center; gap: 9px; padding: 0 10px; color: #34383d; border: 0; border-radius: 4px; background: transparent; font-size: 12px; text-align: left; }
.message-context-menu button:hover:not(:disabled), .message-context-menu button:focus-visible { background: #f4f5f6; outline: 0; }
.message-context-menu button.danger { color: #b8322d; }
.message-context-menu button:disabled { cursor: not-allowed; opacity: .38; }
.message-context-menu svg { width: 15px; height: 15px; }
.session-context-menu { width: 202px; }
.session-context-menu hr { width: calc(100% - 12px); height: 1px; margin: 5px 6px; border: 0; background: #eceef0; }
.service-message-action-dialog { width: min(460px, calc(100% - 28px)); }
.service-session-action-dialog { width: min(520px, calc(100% - 28px)); }
.service-session-action-target { min-width: 0; display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 10px 0 14px; border-bottom: 1px solid #eceef0; }
.service-session-action-target .buyer-avatar { width: 38px; height: 38px; flex: 0 0 38px; }
.service-session-action-target > span { min-width: 0; display: grid; gap: 3px; }
.service-session-action-target strong, .service-session-action-target small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-session-action-target strong { color: #30343a; font-size: 13px; }
.service-session-action-target small { color: #8c939c; font-size: 11px; }
#service-session-action-body { min-width: 0; display: grid; gap: 14px; padding-top: 16px; }
.session-action-options { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; border: 0; }
.session-action-options legend { grid-column: 1 / -1; margin-bottom: 4px; color: #3f444a; font-size: 12px; font-weight: 600; }
.session-action-options label { min-width: 0; }
.session-action-options input { position: absolute; opacity: 0; pointer-events: none; }
.session-action-options span { min-height: 36px; display: grid; place-items: center; padding: 0 8px; color: #5f666f; border: 1px solid #dfe3e7; border-radius: 4px; background: #fff; font-size: 12px; cursor: pointer; }
.session-action-options input:checked + span { color: #272a2e; border-color: #d4ba00; background: #fff6af; font-weight: 600; }
.session-action-options input:focus-visible + span { outline: 2px solid rgba(212,186,0,.3); outline-offset: 1px; }
.service-message-action-dialog blockquote { max-height: 96px; margin: 18px 0 0; padding: 10px 12px; overflow: auto; color: #555b63; border-left: 3px solid #e0c200; background: #f7f8f9; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.service-forward-search { position: relative; display: block; margin-top: 14px; }
.service-forward-search svg { position: absolute; top: 10px; left: 10px; width: 15px; height: 15px; color: #9299a2; }
.service-forward-search input { width: 100%; height: 36px; padding: 0 10px 0 34px; border: 1px solid #dfe3e7; border-radius: 4px; outline: 0; }
.service-forward-search input:focus { border-color: #d5ba00; box-shadow: 0 0 0 2px rgba(255,225,0,.14); }
.service-forward-targets { max-height: min(360px, 46vh); margin-top: 10px; overflow: auto; border: 1px solid #e5e7ea; border-radius: 4px; }
.service-forward-targets > label { min-height: 56px; display: grid; grid-template-columns: 18px 34px minmax(0,1fr); align-items: center; gap: 9px; padding: 7px 10px; border-bottom: 1px solid #eceef0; cursor: pointer; }
.service-forward-targets > label:last-child { border-bottom: 0; }
.service-forward-targets > label:hover { background: #fffceb; }
.service-forward-targets > label:has(input:checked) { background: #fff8c7; }
.service-forward-targets > label[hidden] { display: none; }
.service-forward-targets .buyer-avatar { width: 34px; height: 34px; }
.service-forward-targets label > span { min-width: 0; display: grid; gap: 3px; }
.service-forward-targets strong, .service-forward-targets small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-forward-targets strong { color: #343940; font-size: 12px; }
.service-forward-targets small { color: #939aa3; font-size: 10px; }
@keyframes message-send-enter { from { opacity: 0; translate: 12px 4px; scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes message-remove { to { opacity: 0; translate: 10px 0; scale: .98; } }
@keyframes context-menu-enter { from { opacity: 0; translate: 0 -3px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
.composer-popover > header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid #eee; }
.composer-popover > header button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; }
.composer-result-list { display: grid; max-height: 260px; overflow: auto; }
.composer-result-list > button { display: grid; gap: 4px; padding: 10px 12px; border: 0; border-bottom: 1px solid #f1f1f1; background: #fff; text-align: left; }
.composer-result-list > button:hover { background: #fffdf0; }
.composer-result-list strong { color: #303030; font-size: 12px; }
.composer-result-list span { overflow: hidden; color: #737373; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.popover-search { position: relative; display: block; margin: 8px; }
.popover-search svg { position: absolute; top: 8px; left: 9px; width: 15px; }
.popover-search input { width: 100%; height: 32px; padding: 0 10px 0 32px; border: 1px solid #e5e7eb; border-radius: 4px; }
#service-note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
#service-note-form textarea { min-height: 76px; resize: vertical; padding: 8px; border: 1px solid #e5e7eb; border-radius: 4px; }
#service-note-form button { align-self: end; }
.service-context-pane > header button { display: none; width: 30px; height: 30px; place-items: center; border: 0; background: transparent; }
.service-context-pane #im-context-content { min-height: 0; overflow: auto; }
.context-section { padding: 14px; border-bottom: 1px solid #eee; }
.context-section h3 { display: flex; align-items: center; gap: 5px; margin: 0 0 12px; color: #303030; font-size: 13px; }
.context-section h3 span { color: #9ca3af; font-size: 11px; font-weight: 400; }
.context-definition { margin: 0; }
.context-definition > div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px dashed #eee; }
.context-definition dt { color: #9ca3af; font-size: 11px; }
.context-definition dd { min-width: 0; margin: 0; overflow: hidden; color: #4b5563; font-size: 12px; text-overflow: ellipsis; }
.context-definition select, .context-control select { width: 100%; height: 30px; border: 1px solid #e5e7eb; border-radius: 4px; background: #fff; }
.inline-context-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.inline-context-form input { min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #e5e7eb; border-radius: 4px; }
.context-order-card { width: calc(100% - 0px); margin: 0 0 8px; background: #fff; text-align: left; }
.context-product { display: grid; gap: 4px; padding: 9px 0; border-bottom: 1px dashed #eee; }
.context-product strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.context-product span { color: #9ca3af; font-size: 11px; }
.context-empty.compact { height: auto; min-height: 110px; padding: 12px; }
.context-product-detail { display: grid; grid-template-columns: 54px minmax(0, 1fr) 28px; align-items: center; gap: 9px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.context-product-detail > img, .context-product-placeholder { width: 54px; height: 54px; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: #f3f4f6; object-fit: cover; }
.context-product-placeholder svg { width: 22px; color: #9ca3af; }
.context-product-detail > div { min-width: 0; display: grid; gap: 3px; }
.context-product-detail strong, .context-product-detail small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-product-detail strong { color: #303030; font-size: 12px; }
.context-product-detail small { color: #9ca3af; font-size: 10px; }
.context-product-detail b { color: #ef4444; font-size: 13px; }
.context-product-detail > a { width: 28px; height: 28px; display: grid; place-items: center; color: #6b7280; border-radius: 4px; }
.context-product-detail > a:hover { color: #111827; background: #fff6a8; }
.context-product-detail > a svg { width: 15px; }
.context-control { display: grid; gap: 5px; margin-bottom: 10px; }
.context-control > span { color: #6b7280; font-size: 11px; }
.service-state-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; overflow: hidden; border: 1px solid #dfe3e7; border-radius: 4px; }
.service-state-actions button { min-width: 0; height: 30px; padding: 0 4px; color: #6b7280; border: 0; border-right: 1px solid #dfe3e7; background: #fff; font-size: 11px; }
.service-state-actions button:last-child { border-right: 0; }
.service-state-actions button:hover { color: #202124; background: #f7f7f7; }
.service-state-actions button.active { color: #202124; background: #ffe316; font-weight: 600; }
.service-state-actions button:disabled { cursor: wait; opacity: .65; }
.sla-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.sla-timeline > div { display: grid; gap: 4px; padding: 8px; border: 1px solid #e5e7eb; border-radius: 4px; }
.sla-timeline > div.at_risk { border-color: #fdba74; background: #fff7ed; }
.sla-timeline > div.breached { border-color: #fca5a5; background: #fef2f2; }
.sla-timeline span, .sla-timeline small { color: #9ca3af; font-size: 10px; }
.sla-timeline strong { color: #4b5563; font-size: 12px; }
.context-title-actions { display: flex; align-items: center; justify-content: space-between; }
.context-title-actions button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 4px; background: #f3f4f6; }
.note-list { display: grid; gap: 8px; }
.note-list article { padding: 9px; border-left: 3px solid #ffe60f; background: #fafafa; }
.note-list article p { margin: 0 0 6px; color: #4b5563; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.note-list article span { color: #9ca3af; font-size: 10px; }
.service-config-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin-bottom: 14px; border-bottom: 1px solid #eee; }
.service-config-tabs button { height: 36px; border: 0; border-bottom: 2px solid transparent; background: #fff; }
.service-config-tabs button.active { border-color: #f0d000; font-weight: 600; }
#service-config-body { min-height: 270px; }
.settings-reference-row.compact { margin: 8px 0; padding: 10px 0; }
.service-agent-summary { min-height: 70px; display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 16px; padding: 16px; background: #f7f7f7; }
.service-agent-summary strong { font-size: 28px; }
.service-content-count { margin-bottom: 12px; padding: 8px 10px; color: #6b7280; border-radius: 4px; background: #f7f7f7; font-size: 12px; }

.settings-reference-view { height: calc(100vh - 64px); padding: 24px; overflow: auto; }
.settings-reference-panel { min-height: 100%; padding: 0 24px 24px; background: #fff; border-radius: 8px; }
.settings-group { padding: 24px 0 4px; }
.settings-group + .settings-group { border-top: 1px solid rgba(0,0,0,.08); }
.settings-group h2 { margin-bottom: 10px; font-size: 16px; line-height: 24px; }
.settings-group-hint { margin: -4px 0 8px; color: #a3a3a3; font-size: 12px; }
.settings-reference-row { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 8px; border-bottom: 1px solid rgba(0,0,0,.05); }
.settings-reference-row > div:first-child { display: grid; gap: 5px; }
.settings-reference-row strong { font-weight: 400; }
.settings-reference-row span { color: #a3a3a3; font-size: 12px; }
.settings-reference-row > div:last-child { display: flex; align-items: center; gap: 14px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 40px; }
.switch input { position: absolute; opacity: 0; }
.switch > span { position: absolute; inset: 0; border-radius: 12px; background: #ddd; cursor: pointer; transition: background .2s; }
.switch > span::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; content: ""; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: left .2s; }
.switch input:checked + span { background: #ffe60f; }
.switch input:checked + span::after { left: 21px; }
.local-connection-group .settings-status { margin-top: 10px; border: 1px solid rgba(0,0,0,.08); border-radius: 6px; }
.local-connection-group .settings-actions { margin-top: 14px; }

.route-detail-view { height: calc(100vh - 64px); padding: 16px; overflow: auto; }
.route-detail-shell { min-height: 100%; background: #fff; border-radius: 8px; }
.route-detail-head { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 0 24px; border-bottom: 1px solid rgba(0,0,0,.08); }
.route-detail-head h1 { margin: 0; font-size: 18px; line-height: 26px; }
.route-detail-head p { margin: 2px 0 0; color: #a3a3a3; font-size: 12px; }
.detail-back { width: 34px; height: 34px; flex: 0 0 34px; }
.detail-back svg { width: 18px; height: 18px; }
.route-detail-body { padding: 24px; }
.route-detail-footer, .detail-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid rgba(0,0,0,.08); }
.detail-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid rgba(0,0,0,.08); border-left: 1px solid rgba(0,0,0,.08); }
.detail-row { min-height: 68px; display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; border-right: 1px solid rgba(0,0,0,.08); border-bottom: 1px solid rgba(0,0,0,.08); }
.detail-row span { align-self: stretch; display: flex; align-items: center; padding: 0 18px; color: #666; background: #fafafa; font-size: 13px; }
.detail-row strong { padding: 14px 18px; font-weight: 400; overflow-wrap: anywhere; }
.route-editor { max-width: 920px; margin: 0 auto; border: 1px solid rgba(0,0,0,.08); border-radius: 8px; }
.detail-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; padding: 28px; }
.detail-form-grid label { display: grid; gap: 8px; color: #666; font-size: 13px; }
.detail-form-grid label.wide { grid-column: 1 / -1; }
.detail-form-grid input, .detail-form-grid select { width: 100%; height: 38px; padding: 0 12px; color: #333; border: 1px solid rgba(0,0,0,.12); border-radius: 4px; background: #fff; outline: 0; }
.detail-form-grid input:focus, .detail-form-grid select:focus { border-color: #0daeff; box-shadow: 0 0 0 2px rgba(13,174,255,.08); }
.detail-empty { min-height: 420px; }
.operation-workspace { min-height: calc(100vh - 144px); }
.operation-workspace > header, .operation-head-inline { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 0 20px; border-bottom: 1px solid rgba(0,0,0,.08); }
.operation-workspace > header h2, .operation-head-inline h2 { margin: 0; font-size: 18px; line-height: 26px; }
.operation-workspace > header p { margin: 4px 0 0; color: #a3a3a3; font-size: 12px; }
.operation-list, .settings-list { display: grid; margin-top: 14px; border-top: 1px solid rgba(0,0,0,.08); }
.operation-list label, .settings-list article { min-height: 68px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid rgba(0,0,0,.08); }
.operation-list label:hover, .settings-list article:hover { background: #fafafa; }
.operation-list label:has(input[type="checkbox"]:checked) { background: #fffbea; }
.operation-list span, .settings-list article > div { display: grid; flex: 1; min-width: 0; gap: 5px; }
.operation-list strong, .settings-list strong { overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.operation-list small, .settings-list small { color: #a3a3a3; font-size: 12px; }
.operation-list em { color: #666; font-size: 12px; font-style: normal; }
.operation-history { margin-top: 16px; border: 1px solid #eceef1; border-radius: 4px; background: #fff; }
.operation-history h3 { margin: 0; padding: 12px 14px; border-bottom: 1px solid #eceef1; font-size: 13px; }
.operation-history article { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #f2f3f4; }
.operation-history article:last-child { border-bottom: 0; }
.operation-history article span { min-width: 0; display: grid; gap: 3px; }
.operation-history article strong { color: #30343a; font-size: 12px; }
.operation-history article small { color: #8a9099; font-size: 11px; }
.operation-history article em { color: #746400; font-size: 11px; font-style: normal; white-space: nowrap; }
.settings-list .link-button { flex: 0 0 auto; }

.enterprise-view { height: calc(100vh - 64px); padding: 16px; overflow: auto; }
.enterprise-page-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px; background: #fff; border-radius: 8px; }
.enterprise-page-head h1 { font-size: 20px; line-height: 28px; }
.enterprise-page-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.enterprise-page-head > div:last-child { display: flex; gap: 8px; }
.enterprise-page-head button svg { width: 16px; height: 16px; }
.enterprise-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 12px 0; }
.enterprise-metric { min-width: 0; min-height: 94px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.enterprise-metric > span { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; color: #666; border-radius: 8px; background: #f3f3f3; }
.enterprise-metric > span svg { width: 20px; height: 20px; }
.enterprise-metric.active > span { color: #8a6900; background: #fff9c7; }
.enterprise-metric.success > span { color: #26904a; background: #edf9f0; }
.enterprise-metric.warning > span { color: #c47c00; background: #fff6df; }
.enterprise-metric.danger > span { color: #dc4b2d; background: #fff0ed; }
.enterprise-metric > div { min-width: 0; display: grid; gap: 4px; }
.enterprise-metric strong { overflow: hidden; font-size: 24px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-metric small { color: #777; font-size: 12px; }
.enterprise-table-panel { min-height: 420px; padding: 0 20px 20px; background: #fff; border-radius: 8px; }
.enterprise-tabs { height: 56px; display: flex; align-items: flex-end; gap: 28px; border-bottom: 1px solid var(--line); }
.enterprise-tabs a { position: relative; height: 56px; display: flex; align-items: center; color: #777; }
.enterprise-tabs a.active { color: #333; font-weight: 600; }
.enterprise-tabs a.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; content: ""; background: var(--yellow); }
.enterprise-table-scroll { overflow: auto; }
.enterprise-table { width: 100%; min-width: 1040px; border-collapse: collapse; }
.enterprise-table th { height: 46px; padding: 0 14px; color: #666; background: #fafafa; font-size: 12px; font-weight: 400; text-align: left; }
.enterprise-table td { min-height: 66px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: #555; }
.enterprise-table tbody tr:hover { background: #fffdf0; }
.enterprise-primary-cell { min-width: 180px; display: grid; gap: 4px; }
.enterprise-primary-cell strong { color: #333; font-weight: 500; overflow-wrap: anywhere; }
.enterprise-primary-cell small { max-width: 360px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.event-chip, .priority-chip, .severity-chip, .enterprise-state { display: inline-flex; min-width: 54px; height: 24px; align-items: center; justify-content: center; padding: 0 9px; border-radius: 3px; background: #f2f2f2; font-size: 12px; white-space: nowrap; }
.event-chip { color: #356c9c; background: #eef7ff; }
.priority-chip.high, .severity-chip.warning { color: #b56f00; background: #fff6df; }
.priority-chip.urgent, .severity-chip.critical, .enterprise-state.failed { color: #d64528; background: #fff0ed; }
.priority-chip.low { color: #777; background: #f5f5f5; }
.severity-chip.info { color: #2878c7; background: #edf5ff; }
.enterprise-state.succeeded, .enterprise-state.completed, .enterprise-state.resolved { color: #26904a; background: #edf9f0; }
.enterprise-state.in_progress, .enterprise-state.acknowledged { color: #2878c7; background: #edf5ff; }
.enterprise-state.open, .enterprise-state.running { color: #b56f00; background: #fff6df; }
.enterprise-state.pending, .enterprise-state.queued, .enterprise-state.retry_wait { color: #b56f00; background: #fff6df; }
.enterprise-state.approved, .enterprise-state.active { color: #26904a; background: #edf9f0; }
.enterprise-state.rejected, .enterprise-state.dead_letter, .enterprise-state.suspended { color: #d64528; background: #fff0ed; }
.enterprise-state.cancelled { color: #777; }
.enterprise-switch { vertical-align: middle; }
.fulfillment-toolbar { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.fulfillment-toolbar > div { display: flex; align-items: center; gap: 10px; }
.fulfillment-toolbar > div:first-child { min-width: 0; }
.fulfillment-toolbar strong { color: #333; font-size: 15px; }
.fulfillment-toolbar span { color: var(--muted); font-size: 12px; }
.fulfillment-table { min-width: 1180px; }
.fulfillment-state { display: inline-flex; min-width: 64px; height: 24px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 3px; color: #555; background: #f2f2f2; font-size: 12px; white-space: nowrap; }
.fulfillment-state.reserved, .fulfillment-state.picking { color: #9b6b00; background: #fff7d6; }
.fulfillment-state.packed, .fulfillment-state.dispatched, .fulfillment-state.in_transit { color: #2878c7; background: #edf5ff; }
.fulfillment-state.delivered { color: #26904a; background: #edf9f0; }
.fulfillment-state.exception { color: #d64528; background: #fff0ed; }
.fulfillment-state.cancelled { color: #777; background: #f2f2f2; }
.fulfillment-tracking { display: grid; gap: 3px; }
.fulfillment-tracking strong { color: #555; font-size: 13px; font-weight: 500; }
.fulfillment-tracking small { color: var(--muted); font-size: 11px; }
.pick-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 16px 0; }
.pick-card { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pick-card > header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pick-card > header > div { min-width: 0; display: grid; gap: 3px; }
.pick-card > header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-card > header span { color: var(--muted); font-size: 11px; }
.pick-items { min-height: 90px; display: grid; align-content: start; padding: 8px 14px; }
.pick-items > div { display: grid; gap: 3px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pick-items > div:last-child { border-bottom: 0; }
.pick-items span { overflow: hidden; color: #444; text-overflow: ellipsis; white-space: nowrap; }
.pick-items small { color: var(--muted); font-size: 11px; }
.pick-card > footer { min-height: 46px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.pick-card > footer button { min-height: 28px; padding: 0 9px; color: #555; border: 1px solid #ddd; border-radius: 3px; background: #fff; font-size: 12px; }
.pick-card > footer button:first-child { border-color: var(--yellow); background: var(--yellow); }
.inventory-available { color: #26904a; }
.inventory-available.low { color: #d64528; }
.ledger-panel { margin-top: 20px; border-top: 1px solid var(--line); }
.ledger-panel > header { min-height: 50px; display: flex; align-items: center; justify-content: space-between; }
.ledger-panel > header strong { font-size: 14px; }
.ledger-panel > header span { color: var(--muted); font-size: 12px; }
.ledger-list { border: 1px solid var(--line); border-radius: 4px; }
.ledger-list > div { min-height: 48px; display: grid; grid-template-columns: 150px 110px minmax(180px,1fr) 120px minmax(180px,1.4fr); align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ledger-list > div:last-child { border-bottom: 0; }
.ledger-list time, .ledger-list small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-list strong { color: #555; font-size: 12px; font-weight: 500; }
.ledger-list span, .ledger-list em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger-list em { color: #2878c7; font-size: 12px; font-style: normal; }
.shipment-order-picker { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.shipment-order-picker label { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.shipment-order-picker label:last-child { border-bottom: 0; }
.shipment-order-picker label:hover { background: #fffdf0; }
.shipment-order-picker label:has(input[type="checkbox"]:checked) { background: #fffbea; }
.shipment-order-picker label > span { min-width: 0; display: grid; flex: 1; gap: 3px; }
.shipment-order-picker strong { overflow: hidden; color: #444; text-overflow: ellipsis; white-space: nowrap; }
.shipment-order-picker small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shipment-order-picker em { color: #777; font-size: 11px; font-style: normal; }
.warehouse-shop-picker { min-height: 42px; display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; }
.warehouse-shop-picker label { display: flex; align-items: center; gap: 6px; color: #555; }
.warehouse-shop-picker label:has(input[type="checkbox"]:checked) { color: #3d3700; }
.fulfillment-detail-dialog { width: min(820px,calc(100vw - 32px)); }
.fulfillment-detail-dialog #fulfillment-detail-body { max-height: calc(100vh - 160px); overflow: auto; padding: 20px; background: #fff; }
.shipment-detail-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); }
.shipment-detail-summary > div { min-width: 0; display: grid; gap: 5px; padding: 12px; border-right: 1px solid var(--line); }
.shipment-detail-summary > div:last-child { border-right: 0; }
.shipment-detail-summary span { color: var(--muted); font-size: 11px; }
.shipment-detail-summary strong { overflow: hidden; color: #444; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
#fulfillment-detail-body section { margin-top: 20px; }
#fulfillment-detail-body h3 { margin-bottom: 10px; font-size: 14px; }
.shipment-detail-items { border: 1px solid var(--line); }
.shipment-detail-items > div { min-height: 46px; display: grid; grid-template-columns: minmax(0,1fr) 180px 50px; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.shipment-detail-items > div:last-child { border-bottom: 0; }
.shipment-detail-items span { color: var(--muted); font-size: 12px; }
.shipment-detail-items em { color: #444; font-style: normal; text-align: right; }
.order-shipment-section { margin-top: 16px; padding: 16px; }
.order-shipment-row { width: 100%; min-height: 54px; display: grid; grid-template-columns: minmax(0,1fr) auto 18px; align-items: center; gap: 12px; padding: 8px 12px; color: #444; border: 0; border-top: 1px solid var(--line); background: #fff; text-align: left; }
.order-shipment-row span { min-width: 0; display: grid; gap: 3px; }
.order-shipment-row strong, .order-shipment-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-shipment-row small { color: var(--muted); font-size: 11px; }
.order-shipment-row em { color: #2878c7; font-size: 12px; font-style: normal; }
.enterprise-empty { min-height: 330px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); text-align: center; }
.enterprise-empty svg { width: 42px; height: 42px; color: #c9c9c9; stroke-width: 1.4; }
.enterprise-empty strong { color: #555; font-size: 15px; font-weight: 500; }
.enterprise-empty span { max-width: 420px; line-height: 20px; }
.enterprise-empty button { margin-top: 8px; }
.enterprise-dialog { width: min(760px,calc(100% - 32px)); }
.enterprise-dialog > form { width: 100%; max-height: calc(100vh - 48px); overflow: auto; }
.governance-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: flex-end; border-bottom: 1px solid var(--line); }
.governance-toolbar label { display: flex; align-items: center; gap: 10px; color: #666; font-size: 12px; }
.governance-toolbar select, .enterprise-table select { min-width: 120px; height: 34px; padding: 0 30px 0 10px; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.permission-list { max-width: 520px; display: flex; flex-wrap: wrap; gap: 6px; }
.permission-list span { display: inline-flex; min-height: 24px; align-items: center; padding: 2px 8px; border: 1px solid #e5e5e5; border-radius: 3px; background: #fafafa; color: #666; font-size: 12px; }
.service-team-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.service-team-toolbar > div { min-width: 0; display: grid; gap: 4px; }
.service-team-toolbar strong { color: #333; font-size: 15px; }
.service-team-toolbar span { color: var(--muted); font-size: 12px; }
.service-team-warning { min-height: 48px; display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 12px; color: #7a5900; border: 1px solid #f0df9a; border-radius: 5px; background: #fffbea; }
.service-team-warning svg { width: 18px; height: 18px; flex: 0 0 auto; }
.service-team-table { min-width: 960px; }
.service-owner-chip { display: inline-flex; min-height: 20px; align-items: center; margin-left: 7px; padding: 0 6px; color: #735d00; border-radius: 3px; background: #fff3a6; font-size: 10px; font-weight: 500; vertical-align: middle; }
.service-portal-path { display: inline-block; max-width: 210px; overflow: hidden; color: #356c9c; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.health-status-band { min-height: 76px; display: flex; align-items: center; gap: 14px; margin: 16px 0 4px; padding: 14px 16px; border: 1px solid #dceee1; border-radius: 6px; background: #f5fbf7; }
.health-status-band.degraded, .health-status-band.unhealthy { border-color: #f0dfba; background: #fffaf0; }
.health-status-band > span { width: 40px; height: 40px; display: grid; flex: 0 0 40px; place-items: center; border-radius: 6px; color: #26904a; background: #e5f6ea; }
.health-status-band.degraded > span, .health-status-band.unhealthy > span { color: #b56f00; background: #fff0ca; }
.health-status-band > div { min-width: 0; display: grid; gap: 5px; }
.health-status-band strong { color: #333; font-size: 15px; }
.health-status-band small { overflow: hidden; color: #777; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.health-runtime-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 16px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--line); }
.health-runtime-grid > div { min-width: 0; display: grid; gap: 6px; padding: 15px; background: #fff; }
.health-runtime-grid span { color: #888; font-size: 12px; }
.health-runtime-grid strong { overflow-wrap: anywhere; color: #444; font-size: 14px; font-weight: 500; }
.integration-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.integration-toolbar > div { min-width: 0; display: grid; gap: 3px; }
.integration-toolbar strong { color: #444; font-size: 14px; }
.integration-toolbar span { color: #888; font-size: 12px; }
.integration-subscriptions { min-width: 1240px; }
.erp-profile-table { min-width: 1120px; }
.erp-run-table { min-width: 880px; }
.procurement-info-band { min-height: 76px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; margin: 14px 0; padding: 14px 16px; border: 1px solid #dceee1; border-radius: 6px; background: #f7fbf8; }
.procurement-info-band > svg { width: 42px; height: 42px; padding: 10px; color: #26904a; border-radius: 6px; background: #e8f7ec; }
.procurement-info-band > div { min-width: 0; display: grid; gap: 5px; }
.procurement-info-band strong { color: #333; font-size: 14px; }
.procurement-info-band span { color: #777; font-size: 12px; line-height: 18px; }
.procurement-table { min-width: 1120px; }
.procurement-purchase-table, .procurement-receipt-table, .procurement-supplier-table { min-width: 900px; }
.procurement-risk-row { background: #fffaf0; }
.procurement-suggestion { color: #d64528; font-size: 15px; }
.procurement-state { display: inline-flex; min-width: 64px; height: 24px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 3px; color: #555; background: #f2f2f2; font-size: 12px; white-space: nowrap; }
.procurement-state.submitted { color: #b56f00; background: #fff6df; }
.procurement-state.approved, .procurement-state.ordered, .procurement-state.partially_received { color: #2878c7; background: #edf5ff; }
.procurement-state.received { color: #26904a; background: #edf9f0; }
.procurement-state.cancelled { color: #777; background: #f2f2f2; }
.inline-checkbox-field { display: flex; align-items: center; justify-content: center; gap: 8px; }
.procurement-order-dialog { width: min(820px,calc(100vw - 32px)); }
.procurement-order-items { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.procurement-order-item { min-height: 60px; display: grid; grid-template-columns: 18px minmax(0,1fr) 92px 112px; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.procurement-order-item:last-child { border-bottom: 0; }
.procurement-order-item > span { min-width: 0; display: grid; gap: 3px; }
.procurement-order-item strong, .procurement-order-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.procurement-order-item small { color: var(--muted); font-size: 11px; }
.procurement-order-item > input[type="number"] { width: 100%; height: 34px; padding: 0 8px; border: 1px solid #ddd; border-radius: 4px; }
.procurement-order-item:has(> input[type="checkbox"]:checked) { background: #fffbea; }
.procurement-receipt-lines { display: grid; gap: 8px; margin-bottom: 14px; }
.procurement-receipt-lines > div { display: grid; grid-template-columns: minmax(0,1fr) 100px 100px; align-items: end; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; }
.procurement-receipt-lines span, .procurement-receipt-lines label { display: grid; gap: 4px; }
.procurement-receipt-lines small { color: var(--muted); font-size: 11px; }
.procurement-receipt-lines label { color: #777; font-size: 11px; }
.procurement-receipt-lines input { height: 34px; padding: 0 8px; border: 1px solid #ddd; border-radius: 4px; }
#procurement-detail-body { max-height: calc(100vh - 160px); overflow: auto; padding: 20px; }
#procurement-detail-body section { margin-top: 20px; }
#procurement-detail-body h3 { margin-bottom: 10px; font-size: 14px; }
.finance-view .enterprise-table-panel { display: flex; min-height: 0; flex-direction: column; }
.finance-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.finance-toolbar > div:first-child { display: grid; gap: 4px; }
.finance-toolbar > div:first-child strong { color: #333; font-size: 14px; }
.finance-toolbar > div:first-child span { color: var(--muted); font-size: 11px; }
.finance-toolbar > div:last-child { display: flex; gap: 8px; }
.finance-cash-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin: 14px 0; border: 1px solid var(--line); background: #fff; }
.finance-cash-grid > div { min-width: 0; display: grid; gap: 7px; padding: 15px 16px; border-right: 1px solid var(--line); }
.finance-cash-grid > div:last-child { border-right: 0; }
.finance-cash-grid span { color: var(--muted); font-size: 11px; }
.finance-cash-grid strong { color: #333; font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.finance-cash-grid .total { background: #f0f8ff; }
.finance-cash-grid .total strong { color: #087fc4; }
.finance-panel { margin-top: 14px; border: 1px solid var(--line); background: #fff; }
.finance-panel > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); }
.finance-panel > header strong { font-size: 13px; }
.finance-panel > header span { color: var(--muted); font-size: 11px; }
.finance-info-band, .finance-profit-notice { min-height: 62px; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 12px; margin: 14px 0; padding: 10px 14px; border: 1px solid #cce8f8; background: #f3fbff; }
.finance-info-band > svg, .finance-profit-notice > svg { width: 36px; height: 36px; padding: 8px; color: #1686bd; border-radius: 4px; background: #dff3ff; }
.finance-info-band > div, .finance-profit-notice > div { display: grid; gap: 4px; min-width: 0; }
.finance-info-band strong, .finance-profit-notice strong { color: #345; font-size: 13px; }
.finance-info-band span, .finance-profit-notice span { color: #64717a; font-size: 11px; line-height: 18px; }
.finance-profit-notice { border-color: #f0dba8; background: #fffbef; }
.finance-profit-notice > svg { color: #9b7100; background: #fff1c8; }
.finance-table { min-width: 900px; }
.finance-profit-table { min-width: 1180px; }
.finance-table .amount-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.finance-table .amount-cell.positive { color: #178347; }
.finance-table .amount-cell.negative { color: #cc4b43; }
.finance-state, .finance-case-kind, .cost-unknown { width: fit-content; display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 3px; color: #555; background: #f3f3f3; font-size: 11px; white-space: nowrap; }
.finance-state.reconciled, .finance-state.resolved, .finance-state.approved { color: #178347; background: #eaf8ef; }
.finance-state.exception, .finance-state.open, .finance-state.rejected, .finance-case-kind.unmatched, .finance-case-kind.amount_difference, .finance-case-kind.payout_difference { color: #b24b33; background: #fff0ec; }
.finance-state.pending_approval, .finance-case-kind.duplicate_transaction, .finance-case-kind.duplicate_line_conflict { color: #916500; background: #fff6d9; }
.cost-unknown { color: #7b5d00; background: #fff4ca; }
.finance-empty { min-height: 220px; }
.finance-empty strong { margin-top: 8px; color: #555; font-size: 13px; }
.finance-empty span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.finance-dialog { width: min(680px,calc(100vw - 32px)); }
.finance-dialog .file-drop { margin-top: 14px; }
.enterprise-state.healthy { color: #26904a; background: #edf9f0; }
.enterprise-state.degraded, .enterprise-state.unhealthy, .enterprise-state.delivering { color: #b56f00; background: #fff6df; }
.governance-bootstrap { min-height: 470px; padding: 32px; }
.governance-bootstrap > header { max-width: 940px; display: flex; align-items: center; gap: 14px; margin: 0 auto 24px; }
.governance-bootstrap > header > span, .governance-mode-heading > span, .governance-account-title > span { display: grid; flex: 0 0 auto; place-items: center; color: #705700; background: #fff4a8; }
.governance-bootstrap > header > span { width: 48px; height: 48px; border-radius: 8px; }
.governance-bootstrap > header svg { width: 24px; height: 24px; }
.governance-bootstrap h2 { margin-bottom: 4px; font-size: 20px; }
.governance-bootstrap p { color: #6c727a; line-height: 21px; }
.governance-mode-grid { max-width: 940px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 0 auto; }
.governance-mode-option { min-width: 0; display: flex; flex-direction: column; padding: 22px; border: 1px solid #e2e5e9; border-radius: 8px; background: #fff; }
.governance-mode-option.personal { border-top: 3px solid var(--yellow); }
.governance-mode-option.team { border-top: 3px solid #18a66a; }
.governance-mode-heading { display: flex; align-items: center; gap: 12px; }
.governance-mode-heading > span { width: 40px; height: 40px; border-radius: 6px; }
.governance-mode-option.team .governance-mode-heading > span { color: #17754e; background: #e7f7ef; }
.governance-mode-heading small { display: block; margin-bottom: 2px; color: #7a8088; font-size: 11px; }
.governance-mode-heading h3 { font-size: 17px; }
.governance-mode-option > p { min-height: 44px; margin: 14px 0 18px; }
.governance-mode-option > button { align-self: flex-start; margin-top: auto; }
.governance-personal-accounts { min-height: 74px; display: grid; align-content: center; gap: 5px; margin-bottom: 18px; padding: 12px 14px; border-left: 3px solid var(--yellow); background: #fffdf0; }
.governance-personal-accounts strong { font-size: 13px; }
.governance-personal-accounts span { color: #737981; font-size: 12px; overflow-wrap: anywhere; }
.governance-personal-account-list { display: grid; gap: 2px; margin-top: 2px; }
.governance-personal-account { min-width: 0; min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.governance-personal-account > span { min-width: 0; color: #3e444b; font-size: 13px; }
.governance-account-delete { width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center; padding: 0; color: #a83d39; border: 0; border-radius: 4px; background: transparent; }
.governance-account-delete:hover { color: #8f2521; background: #fff0ef; }
.governance-account-delete svg { width: 16px; height: 16px; }
.governance-delete-dialog { width: min(460px, calc(100vw - 32px)); }
.governance-delete-account-name { min-height: 52px; display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 0 14px; border: 1px solid #e4e7ea; border-radius: 6px; background: #fafbfc; }
.governance-delete-account-name svg { width: 20px; height: 20px; color: #6e747c; }
.governance-delete-impact { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 14px 0 0; }
.governance-delete-impact > div { padding: 10px; text-align: center; border: 1px solid #e4e7ea; border-radius: 6px; }
.governance-delete-impact dt { color: #777e86; font-size: 11px; }
.governance-delete-impact dd { margin: 3px 0 0; color: #30353a; font-size: 18px; font-weight: 600; }
.governance-delete-warning { margin: 14px 0 0; padding: 10px 12px; color: #9a342f; border-left: 3px solid #d7534d; background: #fff4f3; font-size: 12px; line-height: 1.6; }
.danger-button { min-height: 36px; padding: 0 15px; color: #fff; border: 1px solid #c43f39; border-radius: 4px; background: #c43f39; }
.danger-button:hover { border-color: #a92d28; background: #a92d28; }
.danger-button:disabled { opacity: .55; cursor: wait; }
.governance-bootstrap form { display: grid; gap: 12px; }
.governance-bootstrap label { display: grid; gap: 6px; color: #555; font-size: 12px; }
.governance-bootstrap input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #d9dde2; border-radius: 4px; outline: 0; }
.governance-bootstrap input:focus { border-color: #18a66a; box-shadow: 0 0 0 2px rgba(24,166,106,.1); }
.governance-owner-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.governance-enterprise-accounts { min-width: 0; display: grid; gap: 8px; margin: 2px 0; padding: 0; border: 0; }
.governance-enterprise-accounts legend { margin-bottom: 2px; color: #40464d; font-size: 12px; font-weight: 650; }
.governance-enterprise-accounts > p { margin: 0; color: #818790; font-size: 11px; line-height: 17px; }
.governance-enterprise-account-list { max-height: 150px; display: grid; gap: 6px; overflow: auto; }
.governance-bootstrap .governance-enterprise-account { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 18px minmax(0,1fr) 18px; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid #e0e4e8; border-radius: 5px; background: #fafbfc; cursor: pointer; }
.governance-enterprise-account > span, .governance-scan-after-create > span { min-width: 0; display: grid; gap: 2px; }
.governance-enterprise-account strong, .governance-scan-after-create strong { color: #343a40; font-size: 12px; }
.governance-enterprise-account small, .governance-scan-after-create small { overflow: hidden; color: #818790; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.governance-enterprise-account > svg { width: 16px; height: 16px; color: #aeb4bc; }
.governance-enterprise-account:has(input:checked) { border-color: #e0c300; background: #fffdf0; }
.governance-enterprise-account:has(input:checked) > svg { color: #9b8100; }
.governance-scan-after-create { min-width: 0; display: grid !important; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 9px !important; padding: 9px 10px; border-top: 1px solid #edf0f2; cursor: pointer; }
.governance-enterprise-empty { min-height: 52px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; color: #777e87; background: #f7f8f9; font-size: 11px; line-height: 17px; }
.governance-enterprise-empty svg { width: 18px; height: 18px; flex: 0 0 auto; }
#governance-bootstrap-form > button[type="submit"] span { min-width: 0; }
.governance-account-band { min-height: 74px; display: grid; grid-template-columns: minmax(220px,auto) minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.governance-account-title { display: flex; align-items: center; gap: 10px; }
.governance-account-title > span { width: 38px; height: 38px; border-radius: 6px; }
.governance-account-title div { min-width: 0; display: grid; gap: 3px; }
.governance-account-title strong { font-size: 13px; }
.governance-account-title small, .governance-account-empty { color: #777f88; font-size: 11px; }
.governance-account-list { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.governance-account-list span { min-width: 0; max-width: 160px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #e1e5e9; border-radius: 4px; color: #51575e; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.governance-account-list svg { width: 14px; height: 14px; flex: 0 0 auto; color: #18a66a; }
.governance-dialog fieldset { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 4px; }
.governance-dialog legend { padding: 0 6px; color: #555; font-size: 13px; }
.governance-check-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; color: #555; }
.governance-check-grid label { min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid #e1e4e8; border-radius: 5px; background: #fff; cursor: pointer; overflow-wrap: anywhere; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.governance-check-grid label:hover:not(:has(input:disabled)):not(:has(input:checked)) { border-color: #dac200; background: #fffdf0; }
.governance-check-grid label:has(input:checked) { color: #302b00; border-color: #d9bd00; background: #fff8c7; box-shadow: inset 0 0 0 1px rgba(255, 230, 15, .18); }
.automation-builder-group { margin: 14px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.automation-builder-group legend { padding: 0 6px; color: #555; font-size: 13px; }
.automation-condition-row { display: grid; grid-template-columns: 1fr 130px minmax(180px,1fr); gap: 8px; }
.automation-condition-row input, .automation-condition-row select, .automation-action-row input, .automation-action-row select { min-width: 0; height: 36px; padding: 0 10px; border: 1px solid rgba(0,0,0,.12); border-radius: 4px; background: #fff; outline: 0; }
.automation-condition-row input:focus, .automation-condition-row select:focus, .automation-action-row input:focus, .automation-action-row select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(13,174,255,.08); }
#automation-action-list { display: grid; gap: 8px; margin-bottom: 10px; }
.automation-action-row { display: grid; grid-template-columns: 170px minmax(0,1fr) 30px; align-items: center; gap: 8px; }
.automation-action-config { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 8px; }
.automation-action-config > :only-child { grid-column: 1 / -1; }
.automation-version-record { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.automation-version-record > div { display: flex; align-items: center; gap: 8px; }
.automation-version-record > div span { color: #667085; font-size: 12px; }
.automation-version-record small { color: #667085; }
.schedule-toolbar, .schedule-section-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.schedule-toolbar > div, .schedule-section-head { color: #333; }
.schedule-toolbar > div { display: grid; gap: 3px; }
.schedule-toolbar strong, .schedule-section-head strong { font-size: 14px; font-weight: 600; }
.schedule-toolbar span, .schedule-section-head span { color: var(--muted); font-size: 12px; }
.schedule-table { min-width: 1320px; }
.schedule-run-table { min-width: 1200px; }
.schedule-cron { display: block; width: max-content; padding: 3px 6px; color: #444; border: 1px solid #e7e7e7; border-radius: 3px; background: #fafafa; font: 12px/1.4 Consolas, monospace; }
.schedule-timezone { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.schedule-section-head { margin-top: 10px; }
.schedule-number-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.schedule-hint { margin: -4px 0 12px; color: var(--muted); font-size: 11px; }
.schedule-dialog { width: min(660px,calc(100vw - 32px)); }
.run-inspector { width: min(680px,calc(100vw - 32px)); padding: 0; border: 0; border-radius: 8px; }
.run-inspector > div > header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.run-inspector h2 { font-size: 18px; }
.run-inspector header p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.run-inspector pre { min-height: 240px; margin: 0; padding: 20px; overflow: auto; color: #444; background: #fafafa; font: 13px/1.8 Consolas, monospace; white-space: pre-wrap; }
.run-inspector footer { display: flex; justify-content: flex-end; padding: 14px 20px; }

@media (max-width: 1100px) {
  .finance-cash-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .finance-cash-grid > div:nth-child(3) { border-right: 0; }
  .finance-cash-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .pick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .after-sale-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .enterprise-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shop-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shop-learning-panel { display: none; }
  .im-shell { grid-template-columns: 260px minmax(0,1fr); }
  .im-context-pane { display: none; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .erp-profile-table, .erp-run-table { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0 10px; }
  .erp-profile-table thead, .erp-run-table thead { display: none; }
  .erp-profile-table tbody, .erp-profile-table tr, .erp-profile-table td,
  .erp-run-table tbody, .erp-run-table tr, .erp-run-table td { display: block; width: 100%; }
  .erp-profile-table tbody tr, .erp-run-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .erp-profile-table tbody td, .erp-run-table tbody td { min-height: 42px; display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f1f1; overflow-wrap: anywhere; white-space: normal; }
  .erp-profile-table tbody td:last-child, .erp-run-table tbody td:last-child { border-bottom: 0; }
  .erp-profile-table tbody td::before, .erp-run-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .erp-profile-table tbody td[colspan], .erp-run-table tbody td[colspan] { display: block; padding: 0; }
  .erp-profile-table tbody td[colspan]::before, .erp-run-table tbody td[colspan]::before { display: none; }
  .finance-toolbar { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .finance-toolbar > div:last-child { width: 100%; }
  .finance-toolbar > div:last-child button { flex: 1; }
  .finance-cash-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .finance-cash-grid > div { padding: 12px; border-bottom: 1px solid var(--line); }
  .finance-cash-grid > div:nth-child(3) { border-right: 1px solid var(--line); }
  .finance-cash-grid > div:nth-child(2n) { border-right: 0; }
  .finance-cash-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .finance-cash-grid strong { font-size: 16px; }
  .finance-info-band, .finance-profit-notice { grid-template-columns: 34px minmax(0,1fr); padding: 10px; }
  .finance-info-band > svg, .finance-profit-notice > svg { width: 32px; height: 32px; padding: 7px; }
  .enterprise-table-scroll:has(.finance-table) { overflow: visible; }
  .finance-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .finance-table thead { display: none; }
  .finance-table tbody, .finance-table tr, .finance-table td { width: 100%; display: block; }
  .finance-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .finance-table tbody td { min-height: 42px; display: grid; grid-template-columns: 86px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f1f1; overflow-wrap: anywhere; white-space: normal; }
  .finance-table tbody td:last-child { border-bottom: 0; }
  .finance-table tbody td::before { color: var(--muted); font-size: 11px; }
  .finance-table tbody td:only-child { display: block; padding: 0; border: 0; }
  .finance-table tbody td:only-child::before { display: none; }
  .finance-statement-table td:nth-child(1)::before { content: "账单号"; }
  .finance-statement-table td:nth-child(2)::before { content: "闲鱼账号"; }
  .finance-statement-table td:nth-child(3)::before { content: "账期"; }
  .finance-statement-table td:nth-child(4)::before { content: "结算行"; }
  .finance-statement-table td:nth-child(5)::before { content: "计算净额"; }
  .finance-statement-table td:nth-child(6)::before { content: "实际付款"; }
  .finance-statement-table td:nth-child(7)::before { content: "付款差异"; }
  .finance-statement-table td:nth-child(8)::before { content: "状态"; }
  .finance-reconciliation-table td:nth-child(1)::before { content: "异常类型"; }
  .finance-reconciliation-table td:nth-child(2)::before { content: "账号/店铺"; }
  .finance-reconciliation-table td:nth-child(3)::before { content: "业务单据"; }
  .finance-reconciliation-table td:nth-child(4)::before { content: "预期金额"; }
  .finance-reconciliation-table td:nth-child(5)::before { content: "实际金额"; }
  .finance-reconciliation-table td:nth-child(6)::before { content: "状态"; }
  .finance-reconciliation-table td:nth-child(7)::before { content: "操作"; }
  .finance-profit-table td:nth-child(1)::before { content: "订单/时间"; }
  .finance-profit-table td:nth-child(2)::before { content: "账号/店铺"; }
  .finance-profit-table td:nth-child(3)::before { content: "收入"; }
  .finance-profit-table td:nth-child(4)::before { content: "退款"; }
  .finance-profit-table td:nth-child(5)::before { content: "平台费"; }
  .finance-profit-table td:nth-child(6)::before { content: "运费"; }
  .finance-profit-table td:nth-child(7)::before { content: "净收入"; }
  .finance-profit-table td:nth-child(8)::before { content: "销售成本"; }
  .finance-profit-table td:nth-child(9)::before { content: "毛利"; }
  .finance-profit-table td:nth-child(10)::before { content: "毛利率"; }
  .finance-ledger-table td:nth-child(1)::before { content: "发生时间"; }
  .finance-ledger-table td:nth-child(2)::before { content: "类型"; }
  .finance-ledger-table td:nth-child(3)::before { content: "账号/店铺"; }
  .finance-ledger-table td:nth-child(4)::before { content: "摘要"; }
  .finance-ledger-table td:nth-child(5)::before { content: "金额"; }
  .finance-ledger-table td:nth-child(6)::before { content: "来源"; }
  .finance-adjustment-table td:nth-child(1)::before { content: "账号"; }
  .finance-adjustment-table td:nth-child(2)::before { content: "发生时间"; }
  .finance-adjustment-table td:nth-child(3)::before { content: "金额"; }
  .finance-adjustment-table td:nth-child(4)::before { content: "原因"; }
  .finance-adjustment-table td:nth-child(5)::before { content: "提交人"; }
  .finance-adjustment-table td:nth-child(6)::before { content: "状态"; }
  .finance-adjustment-table td:nth-child(7)::before { content: "操作"; }
  .finance-table .reference-operation { flex-wrap: wrap; justify-content: flex-start; }
  .finance-table .reference-operation button { min-height: 30px; padding: 0 8px; border: 1px solid #e5e5e5; border-radius: 3px; }
  .fulfillment-toolbar { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .fulfillment-toolbar > div:last-child { width: 100%; }
  .fulfillment-toolbar > div:last-child button { flex: 1; }
  .procurement-info-band { grid-template-columns: 36px minmax(0,1fr); padding: 12px; }
  .procurement-info-band > svg { width: 36px; height: 36px; padding: 8px; }
  .procurement-info-band > button { grid-column: 1 / -1; width: 100%; }
  .procurement-order-item { grid-template-columns: 18px minmax(0,1fr); }
  .procurement-order-item > input[type="number"] { grid-column: 2; }
  .procurement-receipt-lines > div { grid-template-columns: 1fr 1fr; }
  .procurement-receipt-lines > div > span { grid-column: 1 / -1; }
  .enterprise-table-scroll:has(.procurement-table) { overflow: visible; }
  .procurement-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .procurement-table thead { display: none; }
  .procurement-table tbody, .procurement-table tr, .procurement-table td { width: 100%; display: block; }
  .procurement-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .procurement-table tbody td { min-height: 42px; display: grid; grid-template-columns: 82px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f1f1; overflow-wrap: anywhere; }
  .procurement-table tbody td:last-child { border-bottom: 0; }
  .procurement-table tbody td::before { color: var(--muted); font-size: 11px; }
  .procurement-table tbody td:only-child { display: block; padding: 0; border: 0; }
  .procurement-table tbody td:only-child::before { display: none; }
  .procurement-replenishment-table td:nth-child(1)::before { content: "商品/仓库"; }
  .procurement-replenishment-table td:nth-child(2)::before { content: "供应商"; }
  .procurement-replenishment-table td:nth-child(3)::before { content: "可用"; }
  .procurement-replenishment-table td:nth-child(4)::before { content: "在途"; }
  .procurement-replenishment-table td:nth-child(5)::before { content: "日均需求"; }
  .procurement-replenishment-table td:nth-child(6)::before { content: "可售天数"; }
  .procurement-replenishment-table td:nth-child(7)::before { content: "置信度"; }
  .procurement-replenishment-table td:nth-child(8)::before { content: "建议采购"; }
  .procurement-replenishment-table td:nth-child(9)::before { content: "操作"; }
  .procurement-purchase-table td:nth-child(1)::before { content: "采购单"; }
  .procurement-purchase-table td:nth-child(2)::before { content: "供应商"; }
  .procurement-purchase-table td:nth-child(3)::before { content: "收货仓"; }
  .procurement-purchase-table td:nth-child(4)::before { content: "状态"; }
  .procurement-purchase-table td:nth-child(5)::before { content: "金额"; }
  .procurement-purchase-table td:nth-child(6)::before { content: "预计到货"; }
  .procurement-purchase-table td:nth-child(7)::before { content: "已收/订购"; }
  .procurement-purchase-table td:nth-child(8)::before { content: "操作"; }
  .procurement-receipt-table td:nth-child(1)::before { content: "收货单"; }
  .procurement-receipt-table td:nth-child(2)::before { content: "供应商"; }
  .procurement-receipt-table td:nth-child(3)::before { content: "仓库"; }
  .procurement-receipt-table td:nth-child(4)::before { content: "合格入库"; }
  .procurement-receipt-table td:nth-child(5)::before { content: "拒收"; }
  .procurement-receipt-table td:nth-child(6)::before { content: "收货人"; }
  .procurement-receipt-table td:nth-child(7)::before { content: "时间"; }
  .procurement-receipt-table td:nth-child(8)::before { content: "关联"; }
  .procurement-supplier-table td:nth-child(1)::before { content: "供应商"; }
  .procurement-supplier-table td:nth-child(2)::before { content: "所属账号"; }
  .procurement-supplier-table td:nth-child(3)::before { content: "联系人"; }
  .procurement-supplier-table td:nth-child(4)::before { content: "标准交期"; }
  .procurement-supplier-table td:nth-child(5)::before { content: "最小订单额"; }
  .procurement-supplier-table td:nth-child(6)::before { content: "状态"; }
  .procurement-supplier-table td:nth-child(7)::before { content: "采购单"; }
  .procurement-supplier-table td:nth-child(8)::before { content: "操作"; }
  .procurement-table .enterprise-primary-cell { min-width: 0; }
  .procurement-table .reference-operation { flex-wrap: wrap; justify-content: flex-start; }
  .procurement-table .reference-operation button, .procurement-table .link-button { min-height: 30px; padding: 0 8px; border: 1px solid #e5e5e5; border-radius: 3px; }
  .enterprise-table-scroll:has(.fulfillment-table) { overflow: visible; }
  .fulfillment-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .fulfillment-table thead { display: none; }
  .fulfillment-table tbody, .fulfillment-table tr, .fulfillment-table td { width: 100%; display: block; }
  .fulfillment-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .fulfillment-table tbody td { min-height: 42px; display: grid; grid-template-columns: 82px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f1f1; overflow-wrap: anywhere; }
  .fulfillment-table tbody td:last-child { border-bottom: 0; }
  .fulfillment-table tbody td::before { color: var(--muted); font-size: 11px; }
  .fulfillment-table tbody td:only-child { display: block; padding: 0; border: 0; }
  .fulfillment-table tbody td:only-child::before { display: none; }
  .fulfillment-shipment-table td:nth-child(1)::before { content: "发货单"; }
  .fulfillment-shipment-table td:nth-child(2)::before { content: "发货仓"; }
  .fulfillment-shipment-table td:nth-child(3)::before { content: "店铺"; }
  .fulfillment-shipment-table td:nth-child(4)::before { content: "状态"; }
  .fulfillment-shipment-table td:nth-child(5)::before { content: "物流"; }
  .fulfillment-shipment-table td:nth-child(6)::before { content: "更新时间"; }
  .fulfillment-shipment-table td:nth-child(7)::before { content: "操作"; }
  .fulfillment-inventory-table td:nth-child(1)::before { content: "商品/SKU"; }
  .fulfillment-inventory-table td:nth-child(2)::before { content: "仓库"; }
  .fulfillment-inventory-table td:nth-child(3)::before { content: "在库"; }
  .fulfillment-inventory-table td:nth-child(4)::before { content: "预占"; }
  .fulfillment-inventory-table td:nth-child(5)::before { content: "可用"; }
  .fulfillment-inventory-table td:nth-child(6)::before { content: "安全库存"; }
  .fulfillment-inventory-table td:nth-child(7)::before { content: "版本"; }
  .fulfillment-inventory-table td:nth-child(8)::before { content: "操作"; }
  .fulfillment-warehouse-table td:nth-child(1)::before { content: "仓库"; }
  .fulfillment-warehouse-table td:nth-child(2)::before { content: "账号"; }
  .fulfillment-warehouse-table td:nth-child(3)::before { content: "适用店铺"; }
  .fulfillment-warehouse-table td:nth-child(4)::before { content: "地址"; }
  .fulfillment-warehouse-table td:nth-child(5)::before { content: "联系人"; }
  .fulfillment-warehouse-table td:nth-child(6)::before { content: "优先级"; }
  .fulfillment-warehouse-table td:nth-child(7)::before { content: "状态"; }
  .fulfillment-warehouse-table td:nth-child(8)::before { content: "操作"; }
  .fulfillment-exception-table td:nth-child(1)::before { content: "发货单/运单"; }
  .fulfillment-exception-table td:nth-child(2)::before { content: "异常类型"; }
  .fulfillment-exception-table td:nth-child(3)::before { content: "异常说明"; }
  .fulfillment-exception-table td:nth-child(4)::before { content: "负责人"; }
  .fulfillment-exception-table td:nth-child(5)::before { content: "上报时间"; }
  .fulfillment-exception-table td:nth-child(6)::before { content: "状态"; }
  .fulfillment-exception-table td:nth-child(7)::before { content: "操作"; }
  .fulfillment-table .enterprise-primary-cell { min-width: 0; }
  .fulfillment-table .reference-operation { flex-wrap: wrap; justify-content: flex-start; }
  .fulfillment-table .reference-operation button { min-height: 30px; padding: 0 8px; border: 1px solid #e5e5e5; border-radius: 3px; }
  .pick-grid { grid-template-columns: 1fr; }
  .ledger-list { min-width: 720px; }
  .ledger-panel { overflow: auto; }
  .shipment-detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shipment-detail-summary > div:nth-child(2) { border-right: 0; }
  .shipment-detail-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .shipment-detail-items > div { grid-template-columns: minmax(0,1fr) 44px; }
  .shipment-detail-items span { grid-column: 1 / -1; }
  .enterprise-view { height: calc(100vh - 112px); padding: 10px; }
  .enterprise-page-head { min-height: 96px; align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px; }
  .enterprise-page-head > div:last-child { width: 100%; }
  .enterprise-page-head > div:last-child button { flex: 1; }
  .enterprise-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 8px 0; }
  .enterprise-metric { min-height: 78px; gap: 10px; padding: 12px; }
  .enterprise-metric > span { width: 34px; height: 34px; flex-basis: 34px; }
  .enterprise-metric strong { font-size: 20px; }
  .enterprise-table-panel { padding: 0 12px 12px; }
  .enterprise-tabs { gap: 20px; overflow: auto hidden; scrollbar-width: none; overscroll-behavior-inline: contain; }
  .enterprise-tabs::-webkit-scrollbar { display: none; }
  .enterprise-tabs a { flex: 0 0 auto; }
  .governance-toolbar { justify-content: stretch; padding: 10px 0; }
  .governance-toolbar label, .governance-toolbar select { width: 100%; }
  .service-team-toolbar { align-items: stretch; flex-direction: column; padding: 12px 0; }
  .service-team-toolbar > button { width: 100%; }
  .service-team-warning { align-items: flex-start; }
  .service-portal-path { max-width: min(210px, 100%); }
  .governance-bootstrap { min-height: 420px; padding: 22px 2px; }
  .governance-bootstrap > header { align-items: flex-start; margin-bottom: 18px; }
  .governance-mode-grid { grid-template-columns: 1fr; }
  .governance-mode-option { padding: 18px; }
  .governance-mode-option > p { min-height: 0; }
  .governance-account-band { grid-template-columns: 1fr auto; gap: 10px; }
  .governance-account-list, .governance-account-empty { grid-column: 1 / -1; grid-row: 2; }
  .governance-check-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .health-runtime-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .integration-toolbar { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .operations-table-scroll { overflow: visible; }
  .operations-job-table, .operations-health-table, .operations-worker-table { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0 10px; }
  .operations-job-table thead, .operations-health-table thead, .operations-worker-table thead { display: none; }
  .operations-job-table tbody, .operations-job-table tr, .operations-job-table td,
  .operations-health-table tbody, .operations-health-table tr, .operations-health-table td,
  .operations-worker-table tbody, .operations-worker-table tr, .operations-worker-table td { width: 100%; display: block; }
  .operations-job-table tbody tr, .operations-health-table tbody tr, .operations-worker-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .operations-job-table tbody td, .operations-health-table tbody td, .operations-worker-table tbody td { min-height: 42px; display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f1f1; overflow-wrap: anywhere; white-space: normal; }
  .operations-job-table tbody td:last-child, .operations-health-table tbody td:last-child, .operations-worker-table tbody td:last-child { border-bottom: 0; }
  .operations-job-table tbody td::before, .operations-health-table tbody td::before, .operations-worker-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .operations-job-table tbody td[colspan], .operations-health-table tbody td[colspan], .operations-worker-table tbody td[colspan] { display: block; padding: 0; }
  .operations-job-table tbody td[colspan]::before, .operations-health-table tbody td[colspan]::before, .operations-worker-table tbody td[colspan]::before { display: none; }
  .operations-job-table .reference-operation { justify-content: flex-start; }
  .automation-condition-row, .automation-action-row, .automation-action-config { grid-template-columns: 1fr; }
  .automation-action-row { position: relative; padding-right: 38px; }
  .automation-action-row > .icon-button { position: absolute; top: 2px; right: 0; }
  .schedule-toolbar { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .schedule-toolbar button { width: 100%; }
  .schedule-number-grid { grid-template-columns: 1fr; gap: 0; }
  .schedule-table-scroll { overflow: visible; }
  .schedule-table, .schedule-run-table { min-width: 0; border-collapse: separate; border-spacing: 0 10px; }
  .schedule-table thead, .schedule-run-table thead { display: none; }
  .schedule-table tbody, .schedule-table tr, .schedule-table td, .schedule-run-table tbody, .schedule-run-table tr, .schedule-run-table td { width: 100%; display: block; }
  .schedule-table tbody tr, .schedule-run-table tbody tr { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .schedule-table tbody td, .schedule-run-table tbody td { min-height: 40px; display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f1f1; overflow-wrap: anywhere; white-space: normal; }
  .schedule-table tbody td:last-child, .schedule-run-table tbody td:last-child { border-bottom: 0; }
  .schedule-table tbody td::before, .schedule-run-table tbody td::before { color: var(--muted); font-size: 11px; }
  .schedule-table tbody td:only-child, .schedule-run-table tbody td:only-child { display: block; padding: 0; border: 0; }
  .schedule-table tbody td:only-child::before, .schedule-run-table tbody td:only-child::before { display: none; }
  .schedule-table td:nth-child(1)::before { content: "计划 / 规则"; }
  .schedule-table td:nth-child(2)::before { content: "Cron / 时区"; }
  .schedule-table td:nth-child(3)::before { content: "数据范围"; }
  .schedule-table td:nth-child(4)::before { content: "误触发策略"; }
  .schedule-table td:nth-child(5)::before { content: "并发策略"; }
  .schedule-table td:nth-child(6)::before { content: "下次执行"; }
  .schedule-table td:nth-child(7)::before { content: "最近结果"; }
  .schedule-table td:nth-child(8)::before { content: "状态"; }
  .schedule-table td:nth-child(9)::before { content: "操作"; }
  .schedule-run-table td:nth-child(1)::before { content: "计划 / 规则"; }
  .schedule-run-table td:nth-child(2)::before { content: "方式"; }
  .schedule-run-table td:nth-child(3)::before { content: "计划时间"; }
  .schedule-run-table td:nth-child(4)::before { content: "结果"; }
  .schedule-run-table td:nth-child(5)::before { content: "原因 / 错误"; }
  .schedule-run-table td:nth-child(6)::before { content: "耗时"; }
  .schedule-run-table td:nth-child(7)::before { content: "Worker"; }
  .schedule-run-table td:nth-child(8)::before { content: "完成时间"; }
  .schedule-run-table td:nth-child(9)::before { content: "操作"; }
  .reference-list-view { padding: 12px; }
  .after-sale-metrics { grid-auto-flow: column; grid-auto-columns: 150px; grid-template-columns: none; gap: 8px; overflow: auto hidden; scrollbar-width: none; }
  .after-sale-metrics::-webkit-scrollbar { display: none; }
  .after-sale-metric { min-height: 64px; padding: 9px 10px; }
  .after-sale-metric > span { width: 32px; height: 32px; flex-basis: 32px; }
  .after-sale-metric strong { font-size: 17px; }
  .after-sale-dialog .dialog-field-row { grid-template-columns: 1fr; gap: 0; }
  .after-sale-order-preview { align-items: flex-start; flex-wrap: wrap; }
  .after-sale-order-preview em { margin-left: 57px; }
  .reference-container-act { padding: 14px 14px 0; }
  .commerce-status-strip { grid-auto-flow: column; grid-auto-columns: 126px; grid-template-columns: none; gap: 7px; margin-bottom: 13px; padding-bottom: 13px; scroll-snap-type: x proximity; }
  .commerce-status-item { height: 58px; grid-template-columns: 30px minmax(0,1fr); gap: 8px; padding: 0 9px; scroll-snap-align: start; }
  .commerce-status-item > span { width: 30px; height: 30px; }
  .commerce-status-item > svg { display: none; }
  .commerce-status-item strong { font-size: 17px; }
  .commerce-status-item small { font-size: 10px; }
  .reference-search-box { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .reference-search-box label { min-width: 0; }
  .reference-search-box input:not([type="checkbox"]), .reference-search-box select { width: 100%; }
  .reference-search-box .range-control { grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); min-width: 0; }
  .reference-search-box .range-control input { width: 100%; }
  .reference-search-actions { grid-column: 1 / -1; }
  .reference-search-extra { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reference-toolbar { width: 100%; align-items: stretch; flex-direction: column; gap: 8px; }
  .reference-toolbar > div { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .reference-toolbar > div > button { width: 100%; min-width: 0; }
  .reference-toolbar #products-import { grid-column: 1 / -1; }
  .reference-toolbar > .link-button { width: 100%; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #333; border: 1px solid rgba(0,0,0,.12); border-radius: 4px; background: #fff; }
  .reference-toolbar > .link-button:hover { color: #0daeff; border-color: #0daeff; }
  .reference-pagination { align-items: flex-start; flex-direction: column; padding: 10px 0 14px; }
  .commerce-selection-bar { width: 100%; flex-wrap: wrap; }
  .commerce-selection-bar > strong { width: 100%; padding: 3px 4px 5px; }
  .reference-table-wrap:has(.order-table), .reference-table-wrap:has(.product-table), .reference-table-wrap:has(.refund-table) { min-height: 240px; overflow: visible; border-top: 0; }
  .order-table, .product-table, .refund-table { width: 100%; min-width: 0; display: block; border-collapse: separate; }
  .order-table thead, .product-table thead, .refund-table thead { display: none; }
  .order-table tbody, .product-table tbody, .refund-table tbody { width: 100%; display: grid; gap: 10px; }
  .order-table tbody tr, .product-table tbody tr, .refund-table tbody tr { position: relative; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #e5e7ea; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.025); }
  .order-table tbody td, .product-table tbody td, .refund-table tbody td { width: 100%; height: auto; min-height: 44px; display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #f0f1f2; overflow-wrap: anywhere; }
  .order-table tbody td::before, .product-table tbody td::before, .refund-table tbody td::before { color: #9299a2; font-size: 10px; }
  .order-table tbody td:first-child, .product-table tbody td:first-child, .refund-table tbody td:first-child { position: absolute; z-index: 2; top: 12px; right: 10px; width: 24px; min-height: 24px; display: grid; grid-template-columns: 1fr; place-items: center; padding: 0; border: 0; background: transparent; }
  .order-table tbody td:first-child::before, .product-table tbody td:first-child::before, .refund-table tbody td:first-child::before { display: none; }
  .order-table tbody td:nth-child(2), .product-table tbody td:nth-child(2), .refund-table tbody td:nth-child(2) { grid-column: 1 / -1; display: block; padding: 10px 44px 10px 10px; background: #fafbfc; }
  .order-table tbody td:last-child, .product-table tbody td:last-child, .refund-table tbody td:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .order-table th:last-child, .order-table td:last-child,
  .product-table th:last-child, .product-table td:last-child,
  .refund-table th:last-child, .refund-table td:last-child { position: static; min-width: 0; box-shadow: none; }
  .order-table tbody td:nth-child(3)::before { content: "订单编号"; }
  .order-table tbody td:nth-child(4)::before { content: "买家"; }
  .order-table tbody td:nth-child(5)::before { content: "实收金额"; }
  .order-table tbody td:nth-child(6)::before { content: "订单状态"; }
  .order-table tbody td:nth-child(7)::before { content: "付款时间"; }
  .order-table tbody td:nth-child(8)::before { content: "操作"; }
  .order-table tbody td:nth-child(3), .order-table tbody td:nth-child(4), .order-table tbody td:nth-child(7) { grid-column: 1 / -1; }
  .product-table tbody td:nth-child(3)::before { content: "商品ID"; }
  .product-table tbody td:nth-child(4)::before { content: "售价"; }
  .product-table tbody td:nth-child(5)::before { content: "库存"; }
  .product-table tbody td:nth-child(6)::before { content: "销量"; }
  .product-table tbody td:nth-child(7)::before { content: "商品状态"; }
  .product-table tbody td:nth-child(8)::before { content: "操作"; }
  .product-table tbody td:nth-child(3) { grid-column: 1 / -1; }
  .refund-table tbody td:nth-child(3)::before { content: "订单 / 售后编号"; }
  .refund-table tbody td:nth-child(4)::before { content: "售后类型"; }
  .refund-table tbody td:nth-child(5)::before { content: "退款金额"; }
  .refund-table tbody td:nth-child(6)::before { content: "状态 / SLA"; }
  .refund-table tbody td:nth-child(7)::before { content: "负责人"; }
  .refund-table tbody td:nth-child(8)::before { content: "操作"; }
  .refund-table tbody td:nth-child(3), .refund-table tbody td:nth-child(6) { grid-column: 1 / -1; }
  .order-table .table-product-cell, .product-table .table-product-cell { min-width: 0; align-items: flex-start; }
  .product-table th:nth-child(n+2), .product-table td:nth-child(n+2) { width: 100%; min-width: 0; }
  .product-table colgroup { display: none; }
  .product-id-list span { white-space: normal; overflow-wrap: anywhere; }
  .order-table .table-product-thumb, .product-table .table-product-thumb { width: 54px; height: 54px; flex-basis: 54px; }
  .order-table .table-product-cell > div, .product-table .table-product-cell > div { min-width: 0; }
  .order-table .table-product-cell strong, .product-table .table-product-cell strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .order-table .reference-operation, .product-table .reference-operation { justify-content: flex-start; gap: 6px; }
  .order-table .reference-operation button, .product-table .reference-operation button, .product-table .reference-operation a { min-height: 30px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid #e0e3e6; border-radius: 3px; background: #fff; }
  .order-table tr:has(td[colspan]), .product-table tr:has(td[colspan]), .refund-table tr:has(td[colspan]) { display: block; }
  .order-table td[colspan], .product-table td[colspan], .refund-table td[colspan] { position: static !important; width: 100% !important; min-height: 220px; display: block !important; padding: 0 !important; }
  .order-table td[colspan] .reference-empty, .product-table td[colspan] .reference-empty, .refund-table td[colspan] .reference-empty { width: 100%; min-height: 220px; padding: 24px; text-align: center; }
  .order-table td[colspan]::before, .product-table td[colspan]::before, .refund-table td[colspan]::before { display: none; }
  .reference-loading { min-height: 220px; }
  #order-search-form > label:nth-of-type(5), #order-search-form > label:nth-of-type(6) { display: none; }
  #order-search-form.is-expanded > label:nth-of-type(5), #order-search-form.is-expanded > label:nth-of-type(6) { display: grid; }
  .shop-reference-columns { padding: 12px; }
  .shop-user-strip { align-items: flex-start; height: auto; flex-direction: column; gap: 14px; padding: 16px; }
  .shop-user-strip > div:last-child { width: 100%; }
  .shop-user-strip > div:last-child button { flex: 1; min-width: 0; }
  .shop-ability-panel { padding: 18px 16px; }
  .shop-card-grid, .service-card-grid { grid-template-columns: 1fr; }
  .shop-store-card { min-height: 216px; }
  .shop-store-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 8px; }
  .shop-store-metrics > span:last-child { grid-column: 1 / -1; display: flex; justify-content: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
  .shop-store-metrics > span:last-child strong { max-width: none; overflow: visible; text-overflow: clip; }
  .im-reference-view { height: calc(100vh - 112px); padding: 10px; }
  .im-shell { grid-template-columns: 1fr; grid-template-rows: 220px minmax(0,1fr); }
  .im-session-pane { border-right: 0; border-bottom: 1px solid rgba(0,0,0,.08); }
  .im-session-pane > header { min-height: 48px; }
  .im-search { margin: 8px 10px; }
  .im-account-tabs { min-height: 34px; padding-inline: 10px; }
  .settings-reference-view { height: calc(100vh - 112px); padding: 12px; }
  .settings-reference-panel { padding: 0 14px 18px; }
  .settings-reference-row { align-items: flex-start; min-height: 72px; }
  .settings-reference-row > div:last-child { align-items: flex-end; flex-direction: column; }
  .route-detail-view { height: calc(100vh - 112px); padding: 10px; }
  .route-detail-head { min-height: 58px; padding: 0 14px; }
  .route-detail-body { padding: 14px; }
  .after-sale-detail-heading { align-items: flex-start; flex-direction: column; }
  .after-sale-detail-heading > div:last-child { width: 100%; grid-auto-flow: column; justify-content: start; }
  .after-sale-detail-heading h2 { white-space: normal; }
  .after-sale-timeline { padding: 16px 14px 16px 28px; }
  .detail-summary, .detail-form-grid { grid-template-columns: 1fr; }
  .detail-form-grid { padding: 16px; }
  .detail-form-grid label.wide { grid-column: auto; }
  .detail-row { grid-template-columns: 116px minmax(0,1fr); }
  .route-detail-footer, .detail-actions { flex-wrap: wrap; justify-content: stretch; padding: 12px 14px; }
  .route-detail-footer > button, .route-detail-footer .after-sale-action-group button { flex: 1 1 120px; }
  .operation-workspace > header, .operation-head-inline { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 1100px) {
  .service-context-pane { position: fixed; z-index: 40; top: 64px; right: 0; bottom: 0; width: min(360px, 92vw); display: flex; translate: 100% 0; border-left: 1px solid #ddd; background: #fff; box-shadow: -12px 0 28px rgba(0,0,0,.14); transition: translate .18s ease; }
  .service-context-open .service-context-pane { translate: 0 0; }
  .service-context-pane > header button { display: grid; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  body.service-conversation-open { overflow: hidden; }
  .app-view[data-view="im"] { min-width: 0; overflow: hidden; }
  .im-reference-view { height: calc(100dvh - 112px); min-height: 0; grid-template-rows: 48px minmax(0, 1fr); gap: 6px; overflow: hidden; padding: 6px; }
  .service-overview { grid-auto-flow: column; grid-auto-columns: 108px; grid-template-columns: none; gap: 6px; overflow: auto hidden; scrollbar-width: none; }
  .service-overview::-webkit-scrollbar { display: none; }
  .service-kpi { height: 48px; grid-template-columns: 18px minmax(0,1fr) auto; padding: 0 7px; }
  .service-kpi svg { width: 17px; height: 17px; }
  .service-kpi strong { font-size: 16px; }
  .service-shell { position: relative; width: 100%; height: 100%; min-width: 0; display: block; overflow: hidden; border-radius: 0; }
  .service-session-pane, .service-conversation { width: 100%; min-width: 0; position: absolute; inset: 0; background: #fff; }
  .service-session-pane { border: 0; }
  .service-session-pane > header { min-height: 48px; }
  .service-session-item { min-height: 82px !important; padding: 9px 10px !important; }
  .service-list-avatar { width: 42px; height: 42px; }
  .service-conversation { z-index: 2; display: grid; grid-template-rows: 54px minmax(0, 1fr) auto; visibility: hidden; transform: translateX(100%); transition: transform .18s ease, visibility 0s linear .18s; }
  .service-conversation-open .service-conversation { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .conversation-back { display: grid; }
  .conversation-head { padding: 0 10px; }
  .conversation-head .buyer-avatar { width: 32px; height: 32px; }
  .conversation-head small { max-width: 52vw; }
  .conversation-actions label { display: block; }
  .conversation-actions:has(.primary-button) label { display: none; }
  .conversation-actions label select { min-width: 78px; max-width: 88px; padding-left: 6px; font-size: 11px; }
  .conversation-actions .primary-button { padding-inline: 8px; }
  .service-message-body { min-height: 0; padding: 12px 10px; }
  .service-message-body .message-bubble { max-width: 88%; }
  .composer-tools > span { display: none; }
  .service-composer { grid-template-rows: 36px auto; padding-bottom: env(safe-area-inset-bottom); }
  .composer-tools { max-width: 100vw; overflow-x: auto; overflow-y: hidden; }
  .composer-tools button { flex: 0 0 auto; padding-inline: 6px; font-size: 11px; }
  .composer-input { grid-template-columns: minmax(0,1fr) 64px; gap: 6px; padding: 7px 8px; }
  .composer-input textarea { min-height: 50px; max-height: 96px; resize: none; }
  .service-new-message { right: 12px; bottom: calc(112px + env(safe-area-inset-bottom)); }
  .service-context-pane { top: 112px; width: 100vw; }

  /* Keep control-tower records readable after the shared mobile table rules. */
  .control-table { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0; }
  .control-table thead { display: none; }
  .control-table tbody { width: 100%; display: block; padding: 8px; }
  .control-table tbody tr { width: 100%; display: block; margin: 0 0 8px; padding: 0; overflow: hidden; border: 1px solid #dfe3e8; border-radius: 5px; background: #fff; }
  .control-table tbody tr:last-child { margin-bottom: 0; }
  .control-table tbody td { width: 100%; min-height: 42px; display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; position: static; border-bottom: 1px solid #edf0f2; overflow-wrap: anywhere; white-space: normal; }
  .control-table tbody td:last-child { border-bottom: 0; }
  .control-table tbody td::before { content: attr(data-label); width: auto; position: static; color: #8a939f; font-size: 11px; }
  .control-table tbody td[colspan] { display: block; padding: 0; }
  .control-table tbody td[colspan]::before { display: none; }
  .control-table .cell-note { display: inline; margin: 0 0 0 6px; }
  .control-table .reference-operation { justify-content: flex-start; flex-wrap: wrap; }
  .control-table .reference-operation button, .control-table td > button { min-height: 30px; padding: 0 8px; border: 1px solid #e5e7eb; border-radius: 3px; }
}

/* Multi-store customer service workbench */
body.service-workbench-active { overflow: hidden; background: #fff; }
body.service-workbench-active .top-header { display: block; }
body.service-workbench-active .app-shell { min-height: 100vh; padding-top: 64px; }
body.service-workbench-active .left-aside { inset: 64px auto 0 0; width: 268px; height: calc(100vh - 64px); }
body.service-workbench-active .first-nav { width: 134px; flex-basis: 134px; background: #333; }
body.service-workbench-active .nav-item { width: 134px; min-height: 40px; flex-direction: row; gap: 4px; padding: 0 8px; color: #a3a3a3; font-size: 14px; line-height: 40px; }
body.service-workbench-active .nav-item svg { width: 16px; height: 16px; }
body.service-workbench-active .nav-item.active { color: #333; background: #ffe316; }
body.service-workbench-active .nav-item > em { top: 4px; right: 12px; }
body.service-workbench-active .sec-nav { display: block; }
body.service-workbench-active .fold-btn { display: grid; }
body.service-workbench-active .main-content, body.service-workbench-active.no-secondary .main-content, body.service-workbench-active.nav-folded .main-content { width: calc(100% - 268px); height: calc(100vh - 64px); min-height: calc(100vh - 64px); margin-left: 268px; }
body.service-workbench-active .data-source-strip { display: flex; }

.im-reference-view { height: calc(100vh - 44px); padding: 0; grid-template-rows: 58px 38px minmax(0, 1fr); gap: 0; background: #f2f3f5; }
body.service-workbench-active .im-reference-view { height: calc(100vh - 64px); }
.service-storebar { min-width: 0; display: flex; align-items: stretch; justify-content: space-between; border-bottom: 1px solid #dfe1e5; background: #fff; }
.service-storebar .im-account-tabs { min-width: 0; min-height: 58px; flex: 1; gap: 0; padding: 0; overflow: auto hidden; scrollbar-width: thin; }
.service-storebar .im-account-tabs button { border-radius: 0; }
.store-tab { position: relative; min-width: 188px; max-width: 230px; height: 58px !important; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 12px !important; color: #4e535b !important; border: 0 !important; border-right: 1px solid #e5e7ea !important; background: #fff !important; text-align: left; }
.store-tab::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; content: ""; background: transparent; }
.store-tab:hover { background: #f8f9fa !important; }
.store-tab.active { background: #fffbe8 !important; }
.store-tab.active::after { background: #ffe100; }
.store-tab > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.store-tab strong, .store-tab small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-tab strong { color: #292d32; font-size: 13px; font-weight: 600; }
.store-tab small { display: flex; align-items: center; color: #8f969f; font-size: 10px; }
.store-tab > b { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; color: #fff; border-radius: 9px; background: #ff4d3e; font-size: 10px; font-weight: 500; }
.store-avatar { position: relative; width: 34px; height: 34px; display: grid; overflow: hidden; place-items: center; color: #3a3d42; border-radius: 50%; background: #ffe316; font-size: 13px; font-weight: 600; }
.store-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-avatar.all { color: #77700a; background: #fff7aa; }
.store-avatar.all svg { width: 17px; height: 17px; }
.store-tab-all { min-width: 154px; }
.store-tab-add { width: 58px; height: 58px !important; display: grid; flex: 0 0 58px !important; place-items: center; padding: 0 !important; color: #7b8189 !important; border: 0 !important; border-right: 1px solid #e5e7ea !important; background: #fff !important; }
.store-tab-add:hover { color: #202124 !important; background: #fff9bd !important; }
.store-tab-add svg { width: 20px; height: 20px; }
.service-store-actions { display: flex; flex: 0 0 auto; align-items: center; padding: 0 8px; background: #fff; box-shadow: -8px 0 14px rgba(36,39,44,.04); }
.service-store-actions > button { width: 34px; height: 34px; display: grid; place-items: center; color: #5f656d; border: 0; border-radius: 4px; background: transparent; }
.service-store-actions > button:hover { color: #212327; background: #fff2a0; }
.service-store-actions svg { width: 17px; height: 17px; }
.service-live-pill { display: inline-flex; align-items: center; gap: 5px; margin-right: 5px; padding: 0 8px; color: #68717a; font-size: 11px; }
.service-live-pill > svg { color: #21aa53; }
.service-live-pill em { font-style: normal; }
.service-live-pill em.online { color: #17853e; }
.connection-mark { width: 6px; height: 6px; flex: 0 0 6px; margin-right: 4px; }

.service-overview { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 0; overflow: auto hidden; border-bottom: 1px solid #e1e3e6; background: #fff; scrollbar-width: none; }
.service-overview::-webkit-scrollbar { display: none; }
.service-kpi { height: 46px; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 7px; padding: 0 12px; border: 0; border-right: 1px solid #eceef0; border-radius: 0; background: #fff; }
.service-kpi:hover { border-color: #eceef0; background: #fffcde; }
.service-kpi svg { width: 17px; height: 17px; }
.service-kpi span { font-size: 12px; }
.service-kpi strong { font-size: 17px; }

.service-shell { grid-template-columns: 338px minmax(440px, 1fr) 340px; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.service-session-pane { background: #fff; }
.service-session-pane > header { min-height: 50px; padding: 0 14px; }
.service-session-pane > header > div:first-child { gap: 1px; }
.service-session-pane > header > div:first-child strong { font-size: 16px; }
.service-session-pane > header > div:first-child span { color: #858c95; font-size: 10px; }
.service-session-pane > header button { width: 30px; height: 30px; }
.im-search { margin: 8px 12px 6px; }
.im-search input { height: 34px; padding-left: 33px; border: 1px solid #e6e8eb; border-radius: 4px; background: #f7f8f9; font-size: 11px; }
.im-search input:focus { border-color: #e3c500; background: #fff; box-shadow: 0 0 0 2px rgba(255,225,0,.12); }
.im-search svg { top: 9px; width: 15px; }
.service-session-item { min-height: 94px !important; padding: 10px 10px !important; border-left-width: 3px !important; }
.service-session-item { transition: background-color .16s ease, border-color .16s ease, transform .16s ease; }
.service-session-item:active { transform: scale(.995); }
.service-session-item.active { border-left-color: #f0d000 !important; background: #fff8cf !important; }
.service-session-main { gap: 9px; }
.service-list-avatar { width: 42px; height: 42px; }
.service-session-line strong { font-size: 14px; }
.service-buyer-id { font-size: 10px; }
.service-session-copy > p { margin: 4px 0 6px; font-size: 12px; }
.message-direction { color: #a3a8af; }
.service-item-thumb { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid #e5e7e9; border-radius: 4px; object-fit: cover; }
.service-session-meta { padding-left: 51px; }
.service-session-meta span { max-width: 92px; background: #f1f2f4; font-size: 10px; line-height: 16px; }
.service-session-meta .service-trade-state { color: #9a6b00; background: #fff4be; }

.service-conversation { grid-template-rows: 58px minmax(0, 1fr) auto; background: #f5f6f7; }
.conversation-head { padding: 0 14px; }
.conversation-head strong { font-size: 14px; }
.conversation-head small { font-size: 10px; }
.conversation-actions { gap: 6px !important; }
.conversation-actions .icon-button { width: 30px; height: 30px; }
.service-message-body { padding: 22px clamp(18px, 3.4vw, 56px); }
.service-message-body.message-enter { animation: message-panel-enter .18s ease-out both; }
.message-row { align-items: flex-start; gap: 8px; }
.message-row.outbound { justify-content: flex-end; }
.message-avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: 11px; }
.service-message-body .message-bubble { max-width: min(72%, 620px); padding: 10px 12px; border-radius: 7px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.service-message-body .message-bubble.outbound { background: #ffe515; }
.service-message-body .message-bubble.inbound { background: #fff; }
.service-message-body .message-bubble p { font-size: 12px; }
.service-composer { grid-template-rows: 38px auto; }
.composer-tools button { font-size: 11px; }
.composer-input textarea { min-height: 66px; font-size: 12px; }

.service-context-pane { min-width: 0; overflow: hidden; border-left: 1px solid #dfe1e5; background: #fff; }
.service-context-pane > header { min-height: 50px; padding: 0 14px; }
.service-context-pane > header strong { font-size: 14px; }
.service-context-pane nav { height: 42px; }
.service-context-pane nav button { min-width: 0; padding: 0 3px; color: #7f858d; font-size: 11px; }
.service-context-pane nav button.active::after { right: 13px; left: 13px; background: #f1d100; }
.context-section { padding: 13px 14px; }
.context-section h3 { font-size: 12px; }
.context-action-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.context-action-head > div { min-width: 0; }
.context-action-head p { color: #9aa0a8; font-size: 10px; }
.context-action-head > button { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; color: #6b7179; border: 0; border-radius: 4px; background: #f2f3f5; }
.context-action-head svg { width: 14px; height: 14px; }
.context-reply-list { display: grid; }
.context-reply-list > button { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) 18px; align-items: center; gap: 8px; padding: 11px 14px; border: 0; border-bottom: 1px solid #eef0f2; background: #fff; text-align: left; }
.context-reply-list > button:hover { background: #fffce3; }
.context-reply-copy { min-width: 0; display: grid; gap: 4px; }
.context-reply-list strong, .context-reply-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-reply-list strong { color: #30343a; font-size: 11px; }
.context-reply-copy > span { color: #858c95; font-size: 10px; }
.context-reply-list > button > svg { width: 14px; color: #9a8500; }
.context-navigation-row { width: 100%; border: 0; background: #fff; text-align: left; }
.context-wide-button { width: 100%; height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.context-wide-button svg { width: 15px; height: 15px; }
.context-order-card { position: relative; padding: 11px; border-radius: 4px; }
.context-order-card .context-order-state { position: absolute; top: 8px; right: 8px; margin: 0; padding: 2px 5px; color: #946800; border-radius: 3px; background: #fff2a6; font-size: 9px; }
.context-order-card strong { max-width: calc(100% - 62px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.context-order-card b { color: #e8472f; }

@media (min-width: 1441px) {
  .service-shell { transition: grid-template-columns .18s ease; }
  .service-shell.service-context-collapsed { grid-template-columns: 338px minmax(440px, 1fr) 0; }
  .service-shell.service-context-collapsed .service-context-pane { visibility: hidden; opacity: 0; border-left-color: transparent; pointer-events: none; }
  .service-context-pane { transition: opacity .12s ease, visibility .12s ease; }
}

@media (max-width: 1440px) and (min-width: 761px) {
  .service-shell { grid-template-columns: 320px minmax(0, 1fr); }
  .service-context-pane { position: fixed; z-index: 40; top: 160px; right: 0; bottom: 0; width: min(360px, 38vw); display: flex; translate: 100% 0; border-left: 1px solid #dfe1e5; background: #fff; box-shadow: -12px 0 28px rgba(0,0,0,.14); transition: translate .18s ease; }
  .service-context-open .service-context-pane { translate: 0 0; }
  .service-context-pane > header button { display: grid; }
}

@media (max-width: 1180px) {
  .service-shell { grid-template-columns: 300px minmax(0, 1fr); }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  body.service-workbench-active .top-header { display: none; }
  body.service-workbench-active .app-shell { min-height: 100dvh; padding-top: 0; }
  body.service-workbench-active .sec-nav, body.service-workbench-active .fold-btn { display: none; }
  body.service-workbench-active .left-aside { inset: auto 0 0; width: 100%; height: 58px; }
  body.service-workbench-active .first-nav { width: 100%; height: 58px; flex-basis: auto; }
  body.service-workbench-active .nav-item { min-width: calc(100% / 5); width: calc(100% / 5); height: 58px; flex: 0 0 calc(100% / 5); }
  body.service-workbench-active .nav-item-wrap { min-width: calc(100% / 5); width: calc(100% / 5); height: 58px; flex: 0 0 calc(100% / 5); }
  body.service-workbench-active .nav-item-wrap .nav-item { min-width: 100%; width: 100%; flex: 1 1 auto; }
  body.service-workbench-active .main-content, body.service-workbench-active.no-secondary .main-content, body.service-workbench-active.nav-folded .main-content { width: 100%; height: calc(100dvh - 58px); min-height: 0; margin-left: 0; padding-bottom: 0; }
  body.service-workbench-active .im-reference-view { height: calc(100dvh - 58px); grid-template-rows: 58px 38px minmax(0, 1fr); padding: 0; }
  .service-storebar { min-width: 0; }
  .service-storebar .im-account-tabs { min-width: 0; }
  .service-storebar .im-account-tabs { scrollbar-width: none; }
  .service-storebar .im-account-tabs::-webkit-scrollbar { display: none; }
  .store-tab { min-width: 148px; max-width: 166px; padding-inline: 8px !important; }
  .store-tab-all { min-width: 118px; }
  .store-tab-add { width: 40px; flex-basis: 40px !important; }
  .service-store-actions { padding-inline: 3px; }
  .service-store-actions .service-live-pill, .service-store-actions #service-config { display: none; }
  .service-store-actions > button { width: 32px; }
  .service-overview { grid-auto-columns: 112px; grid-template-columns: none; }
  .service-kpi { grid-template-columns: 17px minmax(0, 1fr) auto; gap: 4px; padding-inline: 7px; }
  .service-kpi span { overflow: visible; font-size: 11px; text-overflow: clip; }
  .service-kpi strong { font-size: 16px; }
  .service-shell { position: relative; display: block; height: 100%; }
  .service-session-pane > header { min-height: 46px; }
  .service-session-item { min-height: 91px !important; }
  .service-conversation { grid-template-rows: 54px minmax(0, 1fr) auto; }
  .conversation-head { padding-inline: 8px; }
  .conversation-head .buyer-avatar { display: none; }
  .conversation-head small { max-width: 45vw; }
  .conversation-actions .primary-button { font-size: 10px; }
  .service-message-body { padding: 14px 8px; }
  .service-message-body .message-bubble { max-width: calc(88% - 36px); }
  .message-avatar { width: 28px; height: 28px; flex-basis: 28px; }
  .composer-tools { padding-inline: 5px; }
  .composer-tools button { padding-inline: 5px; }
  .composer-input textarea { min-height: 48px; }
  .composer-input button { width: 100%; min-width: 0; padding-inline: 8px; }
  .composer-input button > span { display: none; }
  .service-context-pane { z-index: 50; top: 0; bottom: 0; width: 100vw; }
  .service-context-pane > header button { display: grid; }
  .service-context-pane nav button { font-size: 10px; }
}

.im-outbox-mode { box-sizing: border-box; width: 100%; height: calc(100vh - 64px); display: block; padding: 16px; overflow: auto; background: #f5f6f7; }
.im-outbox-mode .im-outbox-content { min-width: 0; min-height: 100%; display: grid; align-content: start; gap: 12px; }
.outbox-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.outbox-head h1 { margin: 0; font-size: 18px; font-weight: 650; }
.outbox-head p { margin: 4px 0 0; color: #7b8490; font-size: 12px; }
.outbox-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #e2e5e8; background: #fff; }
.outbox-metrics article { min-height: 78px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 10px; padding: 12px 16px; border-right: 1px solid #eceef0; }
.outbox-metrics article:last-child { border-right: 0; }
.outbox-metrics span, .outbox-metrics small { color: #7f8791; font-size: 11px; }
.outbox-metrics strong { grid-row: 1 / 3; grid-column: 2; color: #1d232a; font-size: 24px; }
.outbox-metrics article.danger strong { color: #d93025; }
.outbox-table-panel { min-width: 0; border: 1px solid #e2e5e8; background: #fff; }
.outbox-table-wrap { max-width: 100%; overflow: auto; }
.outbox-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 11px; }
.outbox-table th { height: 40px; padding: 0 12px; color: #7e8791; background: #f8f9fa; font-weight: 500; text-align: left; white-space: nowrap; }
.outbox-table td { min-width: 88px; height: 62px; padding: 8px 12px; border-top: 1px solid #edf0f2; vertical-align: middle; }
.outbox-table td:nth-child(3) { min-width: 220px; }
.outbox-table td:nth-child(6) { min-width: 190px; }
.outbox-table td strong, .outbox-table td small { display: block; }
.outbox-table td small { margin-top: 3px; color: #929aa4; }
.outbox-table code { display: block; max-width: 190px; overflow: hidden; color: #4d5966; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.outbox-message { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outbox-state { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 3px; color: #5b6470; background: #f0f2f4; }
.outbox-state svg { width: 13px; height: 13px; }
.outbox-state.acknowledged { color: #177245; background: #e8f6ef; }
.outbox-state.dead_letter { color: #c62f27; background: #fff0ef; }
.outbox-state.sending, .outbox-state.retry_wait { color: #a26300; background: #fff6dc; }
.outbox-error { max-width: 180px; color: #c62f27 !important; overflow-wrap: anywhere; }
.outbox-actions { display: flex; align-items: center; gap: 6px; }
.outbox-empty { min-height: 280px; display: grid; place-items: center; align-content: center; gap: 8px; color: #9aa1a9; text-align: center; }
.outbox-loading { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 10px; color: #8a939d; border: 1px solid #e2e5e8; background: #fff; font-size: 12px; }
.outbox-loading svg { width: 24px; height: 24px; animation: connector-spin .9s linear infinite; }
.outbox-empty svg { width: 34px; height: 34px; }
.outbox-empty strong { color: #626b75; font-size: 14px; }
.outbox-empty span { font-size: 11px; }
.im-outbox-dialog { width: min(620px,calc(100vw - 32px)); }
.im-outbox-timeline { max-height: min(520px,60vh); overflow: auto; padding: 20px 24px; }
.im-outbox-timeline article { position: relative; min-height: 74px; display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 12px; }
.im-outbox-timeline article:not(:last-child)::before { position: absolute; top: 14px; bottom: -2px; left: 6px; width: 1px; content: ""; background: #dde1e5; }
.im-outbox-timeline article > i { z-index: 1; width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #e3c500; box-shadow: 0 0 0 1px #c9b000; }
.im-outbox-timeline strong { font-size: 12px; }
.im-outbox-timeline p { margin: 4px 0; color: #626b75; font-size: 11px; }
.im-outbox-timeline time { color: #9aa1a9; font-size: 10px; }
.message-bubble.outbox-pending { opacity: .78; border: 1px dashed #d8bd00; box-shadow: none; }

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .im-outbox-mode { height: calc(100vh - 112px); padding: 10px; }
  .outbox-head { align-items: flex-start; }
  .outbox-head p { max-width: 240px; }
  .outbox-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .outbox-metrics article:nth-child(2) { border-right: 0; }
  .outbox-metrics article:nth-child(-n+2) { border-bottom: 1px solid #eceef0; }
  .outbox-table { min-width: 0; }
  .outbox-table thead { display: none; }
  .outbox-table tbody { display: block; padding: 8px; }
  .outbox-table tbody tr { display: block; margin-bottom: 8px; overflow: hidden; border: 1px solid #dfe3e7; border-radius: 5px; }
  .outbox-table tbody td { width: 100%; min-height: 42px; height: auto; display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-top: 0; border-bottom: 1px solid #edf0f2; overflow-wrap: anywhere; }
  .outbox-table tbody td:last-child { border-bottom: 0; }
  .outbox-table tbody td::before { content: attr(data-label); color: #8a939f; font-size: 11px; }
  .outbox-message, .outbox-table code { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}

/* Enterprise v12 channel connector control plane. */
.connector-page { display: grid; gap: 16px; padding: 18px 20px 24px; color: #252b33; }
.connector-head { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.connector-head > div:first-child { min-width: 0; }
.connector-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.connector-head p { margin: 0; color: #8a929d; font-size: 12px; }
.connector-head > div:last-child { display: flex; align-items: center; gap: 8px; }
.connector-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #e7e9ec; background: #fff; }
.connector-metrics article { min-height: 84px; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 12px; padding: 14px 18px; border-right: 1px solid #eceef0; }
.connector-metrics article:last-child { border-right: 0; }
.connector-metrics article > svg { width: 24px; height: 24px; color: #5a6573; }
.connector-metrics article > div { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 2px 8px; }
.connector-metrics span { color: #69727d; font-size: 12px; }
.connector-metrics strong { grid-row: span 2; font-size: 23px; font-weight: 600; }
.connector-metrics small { max-width: 150px; overflow: hidden; color: #a0a7af; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.connector-recovery-banner { min-height: 72px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #efc3b9; border-left: 3px solid #df563c; background: #fff7f5; }
.connector-recovery-banner > span { width: 34px; height: 34px; display: grid; place-items: center; color: #c7432e; border-radius: 4px; background: #ffe8e2; }
.connector-recovery-banner > span svg { width: 19px; height: 19px; }
.connector-recovery-banner > div:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.connector-recovery-banner strong { color: #8f3023; font-size: 13px; }
.connector-recovery-banner p { overflow: hidden; color: #a14b3d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.connector-recovery-banner > div:last-child { display: flex; align-items: center; gap: 8px; }
.connector-recovery-banner.automatic { border-color: #e8d59a; border-left-color: #c79412; background: #fffbed; }
.connector-recovery-banner.automatic > span { color: #926a08; background: #fff2bd; }
.connector-recovery-banner.automatic > span svg { animation: connector-spin .9s linear infinite; }
.connector-recovery-banner.automatic strong { color: #775500; }
.connector-recovery-banner.automatic p { color: #876c25; }
.connector-vault-strip { min-height: 58px; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid #dfe4e8; background: #f8fafb; }
.connector-vault-strip.locked { border-left: 3px solid #f3a63a; background: #fffaf2; }
.connector-vault-strip.unlocked { border-left: 3px solid #30a46c; background: #f5fbf8; }
.connector-vault-strip > svg { width: 22px; height: 22px; color: #59636f; }
.connector-vault-strip > div { min-width: 0; display: grid; gap: 2px; }
.connector-vault-strip strong { font-size: 13px; }
.connector-vault-strip span { overflow: hidden; color: #7e8792; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.connector-table-wrap { overflow: auto; border: 1px solid #e3e6e9; background: #fff; }
.connector-table { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: 12px; }
.connector-table th { height: 42px; padding: 0 14px; border-bottom: 1px solid #e3e6e9; background: #f7f8f9; color: #727b86; font-weight: 500; text-align: left; white-space: nowrap; }
.connector-table td { height: 66px; padding: 10px 14px; border-bottom: 1px solid #eceef0; vertical-align: middle; }
.connector-table tr:last-child td { border-bottom: 0; }
.connector-table tr.connector-row-focus td { background: #fffbed; }
.connector-table tr.connector-row-focus td:first-child { box-shadow: inset 3px 0 #e4bd00; }
.connector-table td > strong, .connector-table td > small { display: block; }
.connector-table td > small { margin-top: 4px; color: #9098a2; font-size: 10px; }
.connector-credential-missing { color: #8d959f; }
.connector-credential-health { min-width: 252px; display: grid; gap: 7px; }
.connector-credential-health > header { display: flex; align-items: center; gap: 5px; color: #13734a; }
.connector-credential-health > header svg { width: 13px; height: 13px; }
.connector-credential-health > header strong { font-size: 11px; }
.connector-credential-health > header span { margin-left: auto; color: #8b939d; font-family: Consolas, "SFMono-Regular", monospace; font-size: 9px; }
.connector-credential-health dl { display: grid; gap: 3px; margin: 0; }
.connector-credential-health dl > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 7px; line-height: 15px; }
.connector-credential-health dt { color: #89919a; font-size: 10px; }
.connector-credential-health dd { min-width: 0; margin: 0; color: #434a52; font-size: 10px; overflow-wrap: anywhere; }
.connector-credential-health .credential-valid { display: grid; gap: 1px; }
.connector-credential-health .credential-valid strong { color: #167848; font-size: 10px; }
.connector-credential-health .credential-valid small { color: #737c86; font-size: 9px; }
.connector-credential-health .danger { display: inline-flex; align-items: center; gap: 3px; color: #b8322d; font-size: 10px; }
.connector-credential-health .danger svg { width: 11px; height: 11px; flex: 0 0 auto; }
.connector-credential-health .warning { color: #9b5a09; }
.connector-credential-error { max-width: 252px; display: flex; align-items: center; gap: 4px; margin: 0; overflow: hidden; color: #b8322d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.connector-credential-error svg { width: 10px; height: 10px; flex: 0 0 auto; }
.connector-account { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; }
.connector-account > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dadde1; border-radius: 4px; background: #f4f6f7; color: #59636f; font-weight: 600; }
.connector-account div { min-width: 0; }
.connector-account strong, .connector-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connector-account small { margin-top: 3px; color: #9aa1aa; font-size: 10px; }
.connector-state { width: max-content; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid #dfe3e7; border-radius: 3px; color: #626c77; background: #f7f8f9; font-size: 11px; white-space: nowrap; }
.connector-state svg { width: 13px; height: 13px; }
.connector-state.success { border-color: #b8e1ca; color: #167848; background: #effaf4; }
.connector-state.warning { border-color: #f1d3a6; color: #9b5a09; background: #fff8ed; }
.connector-state.danger { border-color: #f0b9b9; color: #b23838; background: #fff3f3; }
.connector-error { max-width: 260px; display: block; margin-top: 5px; overflow: hidden; color: #c14646 !important; text-overflow: ellipsis; white-space: nowrap; }
.connector-recovery { max-width: 280px; display: grid; gap: 2px; margin-top: 6px; line-height: 16px; }
.connector-recovery strong, .connector-recovery small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connector-recovery strong { color: #535b65; font-size: 10px; font-weight: 600; }
.connector-recovery small { color: #7d858f; font-size: 10px; }
.connector-recovery.automatic strong, .connector-recovery.automatic small { color: #9b5a09; }
.connector-recovery.manual strong, .connector-recovery.manual small { color: #b23838; }
.connector-recovery.success strong, .connector-recovery.success small { color: #167848; }
.connector-diagnostics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.connector-diagnostics.muted { color: #9aa1aa; font-size: 10px; }
.connector-diagnostic { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; border: 1px solid #dfe3e7; border-radius: 3px; color: #727b86; background: #f7f8f9; font-size: 9px; white-space: nowrap; }
.connector-diagnostic svg { width: 10px; height: 10px; }
.connector-diagnostic.success { border-color: #b8e1ca; color: #167848; background: #effaf4; }
.connector-diagnostic.warning { border-color: #f1d3a6; color: #9b5a09; background: #fff8ed; }
.connector-diagnostic.danger { border-color: #f0b9b9; color: #b23838; background: #fff3f3; }
.connector-actions { display: flex; align-items: center; gap: 6px; }
.connector-actions.needs-recovery { min-width: 210px; flex-wrap: wrap; }
.connector-actions button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #dfe3e7; border-radius: 3px; background: #fff; color: #5c6671; cursor: pointer; }
.connector-actions .connector-action-text { width: auto; min-width: 88px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; }
.connector-actions .connector-action-text.primary { color: #fff; border-color: #dc563e; background: #dc563e; }
.connector-actions .connector-action-text.primary:hover { color: #fff; border-color: #c74731; background: #c74731; }
.connector-actions button:hover { border-color: #ff7958; color: #e6502c; }
.connector-actions .connector-delete-button { color: #b8322d; }
.connector-actions .connector-delete-button:hover { color: #982720; border-color: #e2aaa6; background: #fff3f2; }
.connector-actions button svg { width: 15px; height: 15px; }
.compact-switch { margin-left: 2px; transform: scale(.82); transform-origin: left center; }
.service-supervisor-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 10px 9px; }
.service-supervisor-filters select { min-width: 0; height: 32px; padding: 0 7px; border: 1px solid #d8dde3; border-radius: 4px; color: #4d535c; background: #fff; font-size: 12px; }
.service-routing-total { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 12px; border-left: 3px solid #d9433c; background: #fff2f1; }
.service-routing-total strong { font-size: 18px; }
.service-routing-total em { margin-left: auto; color: #a7332d; font-size: 12px; font-style: normal; }
.service-routing-total.valid { border-left-color: #21a366; background: #eaf7f0; }
.service-routing-total.valid em { color: #177a4c; }
.service-routing-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
.service-routing-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
.service-routing-table .service-routing-percentage-column { width: 150px; }
.service-routing-table .service-routing-unit-column { width: 54px; }
.service-routing-table th, .service-routing-table td { min-width: 0; }
.service-routing-table th:nth-child(2), .service-routing-table td:nth-child(2) { width: 150px; }
.service-routing-table th:nth-child(3), .service-routing-table td:nth-child(3) { width: 54px; }
.service-routing-table td:first-child { overflow-wrap: anywhere; }
.service-routing-table td strong { display: block; }
.service-routing-table td small { display: block; margin-top: 2px; color: #8a919a; }
.service-routing-table input { width: 100%; height: 34px; box-sizing: border-box; padding: 0 8px; border: 1px solid #cfd5dc; border-radius: 4px; }
.dialog-hint { margin: 0; color: #7a818a; font-size: 13px; }
.service-credential-dialog { width: min(520px, calc(100% - 36px)); }
.service-credential-context { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 10px 12px; color: #725c22; border: 1px solid #eadcae; border-radius: 6px; background: #fffaf0; font-size: 12px; line-height: 1.6; }
.service-credential-context svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.service-credential-target { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 11px 12px; border: 1px solid #e1e5e9; border-radius: 6px; background: #f7f8fa; }
.service-credential-target > svg { width: 20px; height: 20px; color: #159b68; }
.service-credential-target > span { min-width: 0; display: grid; gap: 2px; }
.service-credential-target small { color: #8a9199; font-size: 11px; }
.service-credential-target strong { min-width: 0; overflow-wrap: anywhere; color: #31363b; font-size: 13px; }
.service-credential-password input, .access-result-dialog input[readonly] { font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: 0; }
.service-credential-random { width: 100%; height: 40px; justify-content: center; gap: 7px; margin-top: 12px; }
.service-credential-random svg { width: 16px; height: 16px; }
.access-result-dialog input[readonly] { background: #f5f6f7; }
.connector-empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 10px; color: #9aa1aa; }
.connector-empty > svg { width: 38px; height: 38px; stroke-width: 1.4; }
.connector-empty strong { color: #6f7882; font-size: 13px; font-weight: 500; }
.connector-loading { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 10px; color: #858e98; }
.connector-loading svg { animation: connector-spin 1s linear infinite; }
@keyframes connector-spin { to { transform: rotate(360deg); } }
@keyframes source-health-pulse { 50% { opacity: .45; transform: scale(.82); } }
@keyframes data-progress { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes initial-shimmer { from { background-position: 130% 0; } to { background-position: -110% 0; } }
@keyframes message-panel-enter { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes route-nav-pulse { 0% { transform: scaleX(.2); opacity: .35; } 100% { transform: scaleX(1); opacity: 1; } }
.connector-checkpoints { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.connector-checkpoints > article { min-width: 0; border: 1px solid #e3e6e9; background: #fff; }
.connector-checkpoints > article > header { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #eceef0; }
.connector-checkpoints dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
.connector-checkpoints dl div { min-width: 0; padding: 10px 12px; border-right: 1px solid #eff1f2; border-bottom: 1px solid #eff1f2; }
.connector-checkpoints dt { margin-bottom: 4px; color: #9098a2; font-size: 10px; }
.connector-checkpoints dd { margin: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mono-value { display: block; max-width: 220px; overflow: hidden; font-family: ui-monospace,Consolas,monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.incident-severity { display: inline-flex; padding: 3px 7px; border-radius: 3px; color: #9b5a09; background: #fff2d9; font-size: 11px; }
.incident-severity.critical { color: #b23838; background: #ffe9e9; }
.connector-resolved { display: inline-flex; color: #167848; font-size: 11px; }
.connector-dialog.enterprise-dialog { width: min(520px, calc(100vw - 24px)); }
.connector-dialog > form { padding: 18px 20px 16px; }
.connector-dialog header { min-height: 38px; padding-right: 32px; }
.connector-dialog header h2 { line-height: 22px; }
.connector-dialog header p { max-width: 440px; margin-top: 2px; line-height: 1.45; }
.connector-dialog header .dialog-close { top: -4px; right: -5px; }
.connector-dialog .dialog-field { gap: 5px; margin-top: 12px; }
.connector-dialog .dialog-field :is(input, select, textarea) { padding: 8px 10px; border-radius: 4px; }
.connector-auth-tabs { width: max-content; min-width: 264px; height: 32px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px; box-sizing: border-box; margin: 12px 0 7px; padding: 2px; border: 1px solid #dfe3e7; border-radius: 5px; background: #f3f4f5; }
.connector-auth-tabs button { min-width: 128px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 3px; background: transparent; color: #747d87; font-size: 11px; }
.connector-auth-tabs button[aria-selected="true"] { background: #fff; color: #24282c; box-shadow: inset 0 -2px #ffda00, 0 1px 2px rgba(0,0,0,.06); font-weight: 600; }
.connector-auth-tabs svg { width: 14px; height: 14px; }
.connector-qr-panel { display: grid; grid-template-columns: 148px minmax(0,1fr); grid-template-rows: minmax(0,1fr) 34px; gap: 10px 16px; min-height: 0; padding: 11px; border: 1px solid #e3e6e9; background: #fafbfb; }
.connector-qr-panel > img, .connector-qr-placeholder { width: 148px; height: 148px; grid-row: 1 / span 2; box-sizing: border-box; border: 1px solid #e0e4e7; background: #fff; object-fit: contain; }
.connector-qr-placeholder { display: grid; place-items: center; align-content: center; gap: 7px; padding: 10px; color: #929aa3; text-align: center; }
.connector-qr-placeholder svg { width: 30px; height: 30px; stroke-width: 1.4; }
.connector-qr-placeholder strong { font-size: 10px; font-weight: 500; line-height: 1.45; }
.connector-qr-status { min-width: 0; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; align-self: center; gap: 9px; }
.connector-qr-status > svg { width: 26px; height: 26px; color: #5a636d; stroke-width: 1.5; }
.connector-qr-status div { min-width: 0; display: grid; gap: 3px; }
.connector-qr-status strong { color: #30353a; font-size: 12px; line-height: 1.4; }
.connector-qr-status span { color: #858e98; font-size: 10px; line-height: 1.45; }
.connector-qr-panel > button { width: max-content; min-width: 132px; height: 34px; align-self: end; justify-self: start; padding-inline: 12px; font-size: 11px; }
.connector-qr-panel > button svg { width: 14px; height: 14px; }
#connector-cookie-panel { padding: 11px 12px 12px; border: 1px solid #e3e6e9; background: #fafbfb; }
#connector-cookie-panel .dialog-field:first-child { margin-top: 0; }
#connector-cookie-panel .dialog-field:last-child { grid-template-columns: 112px minmax(0,1fr); align-items: center; margin-top: 9px; }
#connector-cookie-panel textarea { min-height: 70px; resize: vertical; }
.connector-dialog footer { margin-top: 12px; }
.connector-dialog footer > button { min-width: 82px; height: 34px; }
.connector-auth-result { margin-top: 9px; padding: 8px 10px; border: 1px solid #b8e1ca; background: #effaf4; color: #167848; font-size: 10px; line-height: 1.45; }
.connector-auth-result.error { border-color: #f0b9b9; background: #fff3f3; color: #b23838; }
.connector-vault-dialog.enterprise-dialog { width: min(500px, calc(100vw - 32px)); }
.connector-incident-dialog.enterprise-dialog { width: min(500px, calc(100vw - 32px)); }
.connector-policy-dialog.enterprise-dialog { width: min(540px, calc(100vw - 32px)); }
.connector-delete-dialog.enterprise-dialog { width: min(480px, calc(100vw - 32px)); }
.connector-delete-target { min-height: 58px; display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 10px 13px; border: 1px solid #e4e7ea; border-radius: 6px; background: #fafbfc; }
.connector-delete-target > svg { width: 22px; height: 22px; color: #6b737d; }
.connector-delete-target > div { min-width: 0; display: grid; gap: 3px; }
.connector-delete-target strong, .connector-delete-target small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connector-delete-target small { color: #858c95; font-size: 10px; }
.connector-delete-warning { margin: 14px 0 0; padding: 10px 12px; color: #94342f; border-left: 3px solid #d7534d; background: #fff4f3; font-size: 12px; line-height: 1.65; }
.connector-delete-dialog .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.connector-delete-dialog .danger-button svg { width: 15px; height: 15px; }
.delivery-state { width: max-content; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid #b8e1ca; border-radius: 3px; background: #effaf4; color: #167848; font-size: 11px; white-space: nowrap; }
.delivery-state svg { width: 13px; height: 13px; }
.delivery-state.open { border-color: #f0b9b9; background: #fff3f3; color: #b23838; }
.delivery-state.half_open { border-color: #f1d3a6; background: #fff8ed; color: #9b5a09; }
.connector-actions button:disabled { cursor: not-allowed; opacity: .35; }
.outbox-blocked { display: block; max-width: 260px; margin-top: 5px; color: #9b5a09; font-size: 10px; line-height: 1.45; white-space: normal; }
.connector-vault-info { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid #dfe7e2; background: #f6faf8; color: #5b6760; }
.connector-vault-info svg { width: 24px; height: 24px; }
.connector-vault-info p { margin: 0; font-size: 11px; line-height: 1.6; }

@media (max-width: 980px) {
  .connector-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .connector-metrics article:nth-child(2) { border-right: 0; }
  .connector-metrics article:nth-child(-n+2) { border-bottom: 1px solid #eceef0; }
  .connector-checkpoints { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .connector-page { gap: 12px; padding: 12px 0 18px; }
  .connector-head { align-items: flex-start; flex-direction: column; padding: 0 2px; }
  .connector-head > div:last-child { width: 100%; }
  .connector-head > div:last-child button { flex: 1; min-width: 0; }
  .connector-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .connector-metrics article { min-height: 72px; grid-template-columns: 28px minmax(0,1fr); gap: 8px; padding: 10px; }
  .connector-metrics article > svg { width: 19px; height: 19px; }
  .connector-metrics strong { font-size: 19px; }
  .connector-vault-strip { grid-template-columns: 26px minmax(0,1fr); padding: 10px 12px; }
  .connector-vault-strip .link-button { grid-column: 2; justify-self: start; }
  .connector-recovery-banner { grid-template-columns: 34px minmax(0, 1fr); padding: 11px 12px; }
  .connector-recovery-banner p { white-space: normal; }
  .connector-recovery-banner > div:last-child { grid-column: 1 / -1; }
  .connector-recovery-banner > div:last-child button { flex: 1; }
  .connector-checkpoints { grid-template-columns: 1fr; }
  .connector-table { min-width: 0; width: 100%; }
  .connector-table thead { display: none; }
  .connector-table tbody { display: block; padding: 8px; }
  .connector-table tbody tr { display: block; margin-bottom: 8px; overflow: hidden; border: 1px solid #e0e4e7; border-radius: 5px; }
  .connector-table tbody tr:last-child { margin-bottom: 0; }
  .connector-table tbody td { width: 100%; min-height: 44px; height: auto; display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #edf0f2; overflow-wrap: anywhere; white-space: normal; }
  .connector-table tbody td:last-child { border-bottom: 0; }
  .connector-table tbody td::before { content: attr(data-label); color: #8a939f; font-size: 11px; }
  .connector-table .connector-account, .connector-table .connector-actions { min-width: 0; }
  .connector-table .connector-actions { flex-wrap: wrap; justify-content: flex-start; }
  .connector-table .connector-credential-health { min-width: 0; }
  .connector-table .connector-recovery { max-width: none; }
  .connector-table .connector-recovery strong, .connector-table .connector-recovery small { overflow: visible; text-overflow: clip; white-space: normal; }
  .connector-table .connector-error, .connector-table .mono-value { max-width: 100%; white-space: normal; }
  .connector-dialog, .connector-vault-dialog, .connector-incident-dialog, .connector-policy-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .connector-dialog > form { padding: 16px; }
  .connector-auth-tabs { width: 100%; min-width: 0; }
  .connector-auth-tabs button { min-width: 0; }
  .connector-qr-panel { grid-template-columns: 112px minmax(0,1fr); grid-template-rows: minmax(0,1fr) 32px; gap: 8px 12px; padding: 10px; }
  .connector-qr-panel > img, .connector-qr-placeholder { width: 112px; height: 112px; }
  .connector-qr-status { width: 100%; grid-template-columns: minmax(0,1fr); gap: 0; }
  .connector-qr-status > svg { display: none; }
  .connector-qr-panel > button { width: 100%; min-width: 0; height: 32px; justify-self: stretch; padding-inline: 8px; }
  #connector-cookie-panel .dialog-field:last-child { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 390px) {
  .control-kpi-grid { grid-template-columns: 1fr; }
  .control-overview-status { align-items: stretch; flex-direction: column; }
  .control-overview-status > * { width: 100%; justify-content: center; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .mobile-secondary-nav:not([hidden]) { position: sticky; top: 54px; z-index: 9; height: 42px; display: flex; align-items: stretch; gap: 2px; padding: 0 10px; overflow: auto hidden; border-bottom: 1px solid #e8e8e8; background: rgba(255,255,255,.98); box-shadow: 0 2px 8px rgba(0,0,0,.04); scrollbar-width: none; }
  .mobile-secondary-nav::-webkit-scrollbar { display: none; }
  .mobile-secondary-nav a { height: 42px; display: inline-flex; flex: 0 0 auto; align-items: center; padding: 0 12px; color: #777; border-bottom: 2px solid transparent; font-size: 12px; white-space: nowrap; }
  .mobile-secondary-nav a.active { color: #252525; border-bottom-color: #ffe000; font-weight: 600; }
  main:has(.mobile-secondary-nav:not([hidden])) .enterprise-tabs { display: none; }
  #product-status-strip { grid-template-columns: none; }
  .commerce-selection-bar:not([hidden]) { position: fixed; z-index: 19; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); left: 10px; width: auto; min-height: 78px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 34px; gap: 6px; padding: 8px; border-color: #e4ca1d; background: #fffdec; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
  .commerce-selection-bar > strong { grid-column: 1 / -1; width: auto; padding: 0 2px; }
  .commerce-selection-bar .plain-button { min-width: 0; height: 34px; padding: 0 6px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .commerce-selection-bar .selection-clear-button { width: 34px; height: 34px; }
  body.commerce-selection-active .reference-list-view { padding-bottom: 102px; }
}

/* Keep the grouped navigation dimensions authoritative after legacy shell rules. */
@media (min-width: 761px) {
  .first-nav { width: 184px; flex: 0 0 184px; background: #292b2f; }
  .first-nav-list { padding: 8px 0 18px; scrollbar-color: rgba(255,255,255,.18) #292b2f; }
  .nav-group { display: block; padding: 0 0 4px; }
  .nav-group-trigger { width: 100%; height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 18px; color: #9da1a8; border: 0; background: transparent; font-size: 13px; }
  .nav-group-trigger > span { display: flex; align-items: center; gap: 8px; }
  .nav-group-trigger > span svg { width: 16px; height: 16px; }
  .nav-group-trigger > svg { width: 14px; height: 14px; transition: transform .18s ease; }
  .nav-group:hover .nav-group-trigger, .nav-group.active .nav-group-trigger { color: var(--yellow); }
  .nav-group.collapsed .nav-group-trigger > svg { transform: rotate(-90deg); }
  .nav-group.collapsed .nav-group-links { display: none; }
  .nav-group-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0 9px 6px; }
  .nav-group-links .nav-item, .nav-group-links .nav-item-wrap { width: 100%; }
  .nav-group-links .nav-item { min-height: 34px; justify-content: flex-start; padding: 0 9px; color: #b6b8bd; border-radius: 4px; background: transparent; font-size: 13px; line-height: 34px; }
  .nav-group-links .nav-item:hover, .nav-group-links .nav-item:focus { color: #fff; background: rgba(255,255,255,.07); }
  .nav-group-links .nav-item.active { color: #1f2023; background: var(--yellow); font-weight: 600; }
  .nav-group-links .nav-item > em { top: 2px; right: 2px; }
  .nav-group-links .nav-item-wrap { position: relative; }
  .nav-group-links .im-inbox-nav { padding-right: 24px; }
  .nav-group-links .nav-read-all { right: 3px; bottom: 7px; }
  .sec-nav { width: 156px; }
  .sec-nav-head, .sec-nav-list { width: 156px; }
  .sec-nav-head p { text-indent: 22px; }
  .sec-nav-item { padding: 0 22px; }
  .fold-btn { left: 327px; }
  .left-aside.folded .fold-btn { left: 171px; }
  .main-content { width: calc(100% - 340px); margin-left: 340px; }
  body.no-secondary .main-content, body.nav-folded .main-content { width: calc(100% - 184px); margin-left: 184px; }
  body.service-workbench-active .left-aside { width: 340px; }
  body.service-workbench-active .main-content, body.service-workbench-active.no-secondary .main-content, body.service-workbench-active.nav-folded .main-content { width: calc(100% - 340px); margin-left: 340px; }
  .home-container { height: auto; padding-top: 12px; }
  .home-module { border: 1px solid #eceef1; box-shadow: 0 2px 7px rgba(23,30,38,.025); }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .nav-group { display: contents; }
  .nav-group-trigger { display: none; }
  .nav-group-links, .nav-group.collapsed .nav-group-links { display: contents; }
  .nav-group-links .nav-item-wrap { display: block; }
  .vault-page-head .outline-button { width: 38px; min-width: 38px; padding: 0; overflow: hidden; font-size: 0; }
  .vault-page-head .outline-button svg { width: 16px; height: 16px; flex: 0 0 16px; }
}

/* Reference-aligned TOC feature workspaces. */
.reference-feature-view {
  min-height: calc(100vh - 64px);
  padding: 16px;
  overflow: auto;
  color: #2a2d31;
  background: #f5f6f8;
}
.reference-feature-head {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 20px;
  border: 1px solid #e7e9ec;
  border-radius: 6px;
  background: #fff;
}
.reference-feature-head > div { min-width: 0; }
.reference-feature-head > div > span { display: block; margin-bottom: 2px; color: #9a7c00; font-size: 11px; font-weight: 600; }
.reference-feature-head h1 { margin: 0; color: #25282c; font-size: 20px; font-weight: 650; line-height: 28px; }
.reference-feature-head p { margin: 2px 0 0; color: #8b9199; font-size: 12px; line-height: 18px; }
.reference-feature-content { display: grid; gap: 12px; margin-top: 12px; }
.feature-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #e7e9ec; border-radius: 6px; background: #fff; }
.feature-metric { min-width: 0; min-height: 84px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 18px; border-right: 1px solid #eceef0; }
.feature-metric:last-child { border-right: 0; }
.feature-metric > span { width: 38px; height: 38px; display: grid; place-items: center; color: #626a74; border-radius: 6px; background: #f1f3f5; }
.feature-metric > span svg { width: 19px; height: 19px; }
.feature-metric > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feature-metric strong { overflow: hidden; color: #282b2f; font-size: 22px; font-weight: 650; line-height: 28px; text-overflow: ellipsis; white-space: nowrap; }
.feature-metric small { color: #8d949d; font-size: 11px; }
.feature-metric.success > span { color: #188057; background: #eaf8f1; }
.feature-panel { overflow: hidden; border: 1px solid #e5e8eb; border-radius: 6px; background: #fff; }
.feature-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 18px; border-bottom: 1px solid #eceef0; }
.feature-toolbar > div { min-width: 0; }
.feature-toolbar h2 { margin: 0; color: #2d3034; font-size: 15px; font-weight: 650; line-height: 22px; }
.feature-toolbar p { margin: 2px 0 0; color: #8b929b; font-size: 11px; line-height: 17px; }
.feature-table-wrap { width: 100%; overflow: auto; }
.feature-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.feature-table th,
.feature-table td { min-width: 0; padding: 10px 14px; border-bottom: 1px solid #edf0f2; text-align: left; vertical-align: middle; }
.feature-table th { height: 42px; color: #737b85; background: #f7f8f9; font-size: 11px; font-weight: 600; white-space: nowrap; }
.feature-table td { height: 58px; color: #555d67; font-size: 12px; }
.feature-table tbody tr:last-child td { border-bottom: 0; }
.feature-table tbody tr:hover { background: #fffdf2; }
.feature-table td > strong,
.feature-table td > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-table td > strong { color: #30343a; font-weight: 600; }
.feature-table td > small { margin-top: 3px; color: #969da5; font-size: 10px; }
.feature-table code { color: #45505d; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.feature-state { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; color: #66707b; border-radius: 3px; background: #f0f2f4; font-size: 10px; white-space: nowrap; }
.feature-state.success { color: #17794d; background: #eaf8f1; }
.feature-state.warning { color: #a56705; background: #fff4da; }
.feature-state.neutral { color: #68717c; background: #f0f2f4; }
.feature-empty { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 28px; color: #969da5; text-align: center; }
.feature-empty > svg { width: 34px; height: 34px; stroke-width: 1.5; }
.feature-empty > strong { color: #555d66; font-size: 13px; font-weight: 600; }
.feature-empty > span { max-width: 440px; font-size: 11px; line-height: 18px; }
.feature-empty > button { margin-top: 4px; }
.feature-callout { min-height: 190px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 34px; border: 1px solid #eadf9d; border-radius: 6px; background: #fffbea; }
.feature-callout > div:first-child { max-width: 640px; }
.feature-callout > div:first-child > span { display: inline-flex; align-items: center; gap: 7px; color: #8a7000; font-size: 11px; font-weight: 650; }
.feature-callout > div:first-child > span svg { width: 16px; height: 16px; }
.feature-callout h2 { margin: 8px 0 0; color: #292c30; font-size: 22px; line-height: 30px; }
.feature-callout p { margin: 7px 0 16px; color: #747b84; font-size: 12px; line-height: 20px; }
.migration-steps { min-width: 310px; display: flex; align-items: center; gap: 8px; }
.migration-steps span { display: grid; place-items: center; gap: 8px; color: #6f7680; font-size: 11px; text-align: center; }
.migration-steps span:not(:last-child)::after { content: ""; width: 42px; height: 1px; position: absolute; margin-left: 83px; background: #dfcf7f; }
.migration-steps b { width: 40px; height: 40px; display: grid; place-items: center; color: #5e5107; border: 1px solid #d8c55f; border-radius: 50%; background: #fff; font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-grid > article,
.feature-grid > button { min-width: 0; min-height: 116px; display: grid; align-content: center; justify-items: start; gap: 5px; padding: 18px; color: #34383e; border: 1px solid #e5e8eb; border-radius: 6px; background: #fff; text-align: left; }
.feature-grid > button { cursor: pointer; }
.feature-grid > button:hover { border-color: #dbc51b; background: #fffdf1; }
.feature-grid > article > svg,
.feature-grid > button > svg { width: 20px; height: 20px; margin-bottom: 3px; color: #a98200; }
.feature-grid > article > strong,
.feature-grid > button > strong { color: #30343a; font-size: 14px; font-weight: 650; }
.feature-grid > article > span,
.feature-grid > button > span { color: #8a929b; font-size: 11px; line-height: 17px; }
.sourcing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sourcing-grid article { min-height: 150px; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-content: start; justify-items: stretch; gap: 6px 10px; }
.sourcing-grid article .sourcing-icon { width: 34px; height: 34px; display: grid; grid-row: 1 / span 2; place-items: center; color: #987900; border-radius: 6px; background: #fff4be; }
.sourcing-grid article .sourcing-icon svg { width: 17px; height: 17px; }
.sourcing-grid article > div { min-width: 0; }
.sourcing-grid article > div strong,
.sourcing-grid article > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sourcing-grid article > div small { margin-top: 4px; color: #9198a1; font-size: 10px; }
.sourcing-grid article > em { grid-column: 2; color: #917209; font-size: 10px; font-style: normal; }
.sourcing-grid article > button { grid-column: 1 / -1; align-self: end; justify-self: stretch; }
.feature-setting-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 18px; border-bottom: 1px solid #edf0f2; }
.feature-setting-row:last-child { border-bottom: 0; }
.feature-setting-row > div { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 11px; }
.feature-setting-row > div > svg { width: 34px; height: 34px; padding: 8px; color: #66717d; border-radius: 6px; background: #f2f4f6; }
.feature-setting-row > div > span { min-width: 0; display: grid; gap: 3px; }
.feature-setting-row strong { color: #30343a; font-size: 13px; }
.feature-setting-row small { color: #8f969f; font-size: 11px; line-height: 17px; }
.feature-activity article,
.subscription-history article { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #edf0f2; }
.feature-activity article:last-child,
.subscription-history article:last-child { border-bottom: 0; }
.feature-activity article > svg { width: 18px; height: 18px; color: #737d88; }
.feature-activity article > div { min-width: 0; flex: 1; display: grid; gap: 3px; }
.feature-activity article strong,
.feature-activity article span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-activity article strong { font-size: 12px; }
.feature-activity article span,
.feature-activity article time,
.subscription-history time { color: #9299a2; font-size: 10px; }
.feature-doc-layout { min-height: 520px; display: grid; grid-template-columns: 166px minmax(0, 1fr); overflow: hidden; border: 1px solid #e5e8eb; border-radius: 6px; background: #fff; }
.feature-doc-layout > nav { display: flex; flex-direction: column; padding: 12px 0; border-right: 1px solid #e8ebee; background: #f8f9fa; }
.feature-doc-layout > nav a { min-height: 38px; display: flex; align-items: center; padding: 0 18px; color: #707985; font-size: 12px; }
.feature-doc-layout > nav a.active { color: #282c31; border-right: 2px solid #e0c400; background: #fffbea; font-weight: 600; }
.feature-doc-layout > div { min-width: 0; padding: 22px; }
.feature-doc-intro span { color: #8e7300; font-size: 10px; font-weight: 650; }
.feature-doc-intro h2 { margin: 5px 0; font-size: 19px; }
.feature-doc-intro p { margin: 0 0 12px; color: #7f8790; font-size: 12px; }
.feature-doc-intro > code { display: block; padding: 10px 12px; color: #4b5560; border: 1px solid #e4e8eb; border-radius: 4px; background: #f7f8f9; font-size: 11px; }
.feature-api-list { margin-top: 18px; border: 1px solid #e7e9ec; border-radius: 4px; }
.feature-api-list article { min-height: 52px; display: grid; grid-template-columns: 46px 220px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #edf0f2; }
.feature-api-list article:last-child { border-bottom: 0; }
.feature-api-list b { width: max-content; padding: 3px 5px; color: #1d7a52; border-radius: 3px; background: #e9f8f0; font-size: 9px; }
.feature-api-list b.post { color: #376db1; background: #edf4fd; }
.feature-api-list code { overflow: hidden; color: #45505b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.feature-api-list span { overflow: hidden; color: #858d96; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.funds-account .balance-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 20px 18px; }
.balance-row > div { min-width: 0; display: grid; gap: 6px; padding: 0 20px; border-right: 1px solid #eceef0; }
.balance-row > div:first-child { padding-left: 0; }
.balance-row > div:last-child { padding-right: 0; border-right: 0; }
.balance-row small { color: #89919a; font-size: 11px; }
.balance-row strong { overflow: hidden; color: #292d32; font-size: 24px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.plan-grid article { min-height: 240px; align-content: start; padding: 22px; }
.plan-grid article > span { width: max-content; padding: 3px 7px; color: #7e6900; border-radius: 3px; background: #fff1a6; font-size: 10px; }
.plan-grid article h3 { margin: 8px 0 0; font-size: 17px; }
.plan-grid article > strong { color: #292d32; font-size: 27px; }
.plan-grid article > strong small { margin-left: 3px; color: #9299a2; font-size: 10px; font-weight: 400; }
.plan-grid article p { min-height: 38px; margin: 0 0 10px; color: #7f8790; font-size: 11px; line-height: 18px; }
.plan-grid article button { width: 100%; margin-top: auto; }
.subscription-history h3 { padding: 15px 16px; border-bottom: 1px solid #edf0f2; font-size: 14px; }
.subscription-history article strong { min-width: 100px; }
.subscription-history article span { flex: 1; color: #68717b; font-size: 11px; }
.subscription-history article em { color: #17794d; font-size: 10px; font-style: normal; }
.reference-feature-dialog { width: min(620px, calc(100vw - 32px)); }
.feature-dialog-fields { display: grid; gap: 13px; }
.feature-dialog-fields fieldset { margin: 0; padding: 12px; border: 1px solid #e1e5e8; border-radius: 4px; }
.feature-dialog-fields legend { padding: 0 5px; color: #68727c; font-size: 11px; }
.feature-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.feature-check-grid label { min-height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #e5e8eb; border-radius: 4px; font-size: 11px; }

@media (max-width: 980px) {
  .feature-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-metric:nth-child(2) { border-right: 0; }
  .feature-metric:nth-child(-n + 2) { border-bottom: 1px solid #eceef0; }
  .sourcing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-doc-layout { grid-template-columns: 132px minmax(0, 1fr); }
  .feature-api-list article { grid-template-columns: 46px 180px minmax(0, 1fr) 30px; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .reference-feature-view { min-height: calc(100vh - 54px); padding: 10px 10px calc(78px + env(safe-area-inset-bottom)); }
  .reference-feature-head { min-height: 76px; align-items: flex-start; padding: 12px; }
  .reference-feature-head h1 { font-size: 17px; line-height: 24px; }
  .reference-feature-head p { max-width: 230px; }
  .reference-feature-head > button { min-width: 40px; padding: 0 10px; }
  .reference-feature-content { gap: 10px; margin-top: 10px; }
  .feature-metric { min-height: 72px; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 10px; }
  .feature-metric > span { width: 30px; height: 30px; }
  .feature-metric > span svg { width: 16px; height: 16px; }
  .feature-metric strong { font-size: 18px; line-height: 23px; }
  .feature-toolbar { align-items: flex-start; padding: 11px 12px; }
  .feature-toolbar > button { flex: 0 0 auto; }
  .feature-table { min-width: 0; table-layout: auto; }
  .feature-table thead { display: none; }
  .feature-table tbody { display: block; padding: 8px; }
  .feature-table tbody tr { display: block; margin-bottom: 8px; overflow: hidden; border: 1px solid #e3e6e9; border-radius: 5px; }
  .feature-table tbody tr:last-child { margin-bottom: 0; }
  .feature-table tbody td { width: 100%; min-height: 42px; height: auto; display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 11px; border-bottom: 1px solid #edf0f2; overflow-wrap: anywhere; }
  .feature-table tbody td:last-child { border-bottom: 0; }
  .feature-table tbody td::before { content: attr(data-label); color: #8b939d; font-size: 10px; }
  .feature-table td > strong,
  .feature-table td > small,
  .feature-table code { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .feature-table td[colspan] { display: block; padding: 0; }
  .feature-table td[colspan]::before { display: none; }
  .feature-empty { min-height: 180px; }
  .feature-callout { min-height: 0; align-items: stretch; flex-direction: column; gap: 18px; padding: 20px 16px; }
  .feature-callout h2 { font-size: 18px; line-height: 26px; }
  .migration-steps { min-width: 0; justify-content: center; }
  .migration-steps span { flex: 1; }
  .migration-steps span:not(:last-child)::after { width: 26px; margin-left: calc(25vw - 6px); }
  .feature-grid,
  .sourcing-grid { grid-template-columns: 1fr; }
  .feature-grid > article,
  .feature-grid > button { min-height: 96px; }
  .sourcing-grid article { min-height: 142px; }
  .feature-setting-row { padding: 12px; }
  .feature-doc-layout { min-height: 0; display: block; }
  .feature-doc-layout > nav { flex-direction: row; padding: 0; overflow-x: auto; border-right: 0; border-bottom: 1px solid #e8ebee; }
  .feature-doc-layout > nav a { flex: 0 0 auto; padding: 0 14px; border-right: 0; border-bottom: 2px solid transparent; }
  .feature-doc-layout > nav a.active { border-right: 0; border-bottom-color: #e0c400; }
  .feature-doc-layout > div { padding: 14px 12px; }
  .feature-api-list article { grid-template-columns: 42px minmax(0, 1fr) 30px; gap: 7px; }
  .feature-api-list article > span { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .funds-account .balance-row { grid-template-columns: 1fr; padding: 4px 12px; }
  .balance-row > div,
  .balance-row > div:first-child,
  .balance-row > div:last-child { padding: 12px 0; border-right: 0; border-bottom: 1px solid #eceef0; }
  .balance-row > div:last-child { border-bottom: 0; }
  .plan-grid article { min-height: 210px; }
  .subscription-history article { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .subscription-history article span,
  .subscription-history article time { grid-column: 1 / -1; }
  .reference-feature-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .feature-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Reference feature matrix: migration, limits, distribution, platform and funds. */
.reference-feature-view { min-height: calc(100vh - 64px); padding: 16px; overflow: auto; background: #f5f6f8; }
.reference-feature-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 20px; border: 1px solid #e7e9ec; border-radius: 6px; background: #fff; }
.reference-feature-head > div { min-width: 0; display: grid; gap: 2px; }
.reference-feature-head > div > span { color: #8d7400; font-size: 10px; font-weight: 700; }
.reference-feature-head h1 { color: #24272b; font-size: 20px; line-height: 28px; }
.reference-feature-head p { overflow: hidden; color: #858b94; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.reference-feature-content { display: grid; gap: 12px; margin-top: 12px; }
.feature-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.feature-metric { min-width: 0; min-height: 88px; display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid #e5e8eb; border-radius: 6px; background: #fff; }
.feature-metric > span { width: 40px; height: 40px; display: grid; flex: 0 0 40px; place-items: center; color: #9a7500; border-radius: 7px; background: #fff4c4; }
.feature-metric.success > span { color: #167456; background: #eaf8f2; }
.feature-metric svg { width: 20px; height: 20px; }
.feature-metric > div { min-width: 0; display: grid; gap: 4px; }
.feature-metric strong { overflow: hidden; color: #25292e; font-size: 22px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.feature-metric small { color: #858b94; font-size: 11px; }
.feature-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px; }
.feature-toolbar > div { min-width: 0; display: grid; gap: 3px; }
.feature-toolbar h2 { color: #282c31; font-size: 16px; }
.feature-toolbar p { color: #8b9199; font-size: 11px; line-height: 1.5; }
.feature-panel { min-width: 0; overflow: hidden; border: 1px solid #e4e7ea; border-radius: 6px; background: #fff; }
.feature-panel > .feature-toolbar { min-height: 68px; padding: 10px 18px; border-bottom: 1px solid #eceef0; }
.feature-table-wrap { width: 100%; overflow: auto; }
.feature-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.feature-table th, .feature-table td { padding: 10px 14px; text-align: left; vertical-align: middle; }
.feature-table th { height: 42px; color: #707883; border-bottom: 1px solid #e4e7ea; background: #f7f8f9; font-size: 11px; font-weight: 600; white-space: nowrap; }
.feature-table td { min-height: 56px; color: #4d545c; border-bottom: 1px solid #edf0f2; font-size: 12px; }
.feature-table tr:last-child td { border-bottom: 0; }
.feature-table td > strong, .feature-table td > small { display: block; }
.feature-table td > strong { max-width: 320px; overflow: hidden; color: #282d32; text-overflow: ellipsis; white-space: nowrap; }
.feature-table td > small { max-width: 360px; margin-top: 3px; overflow: hidden; color: #939aa3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.feature-table code { font-family: Consolas, monospace; font-size: 11px; }
.feature-state { display: inline-flex; align-items: center; min-height: 23px; padding: 0 7px; color: #65707a; border: 1px solid #dde1e5; border-radius: 3px; background: #f5f6f7; font-size: 10px; white-space: nowrap; }
.feature-state.success { color: #15704f; border-color: #bfe2d1; background: #eef9f4; }
.feature-state.warning { color: #976000; border-color: #ecd4a5; background: #fff8ea; }
.feature-empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 30px; color: #959ba3; text-align: center; }
.feature-empty > svg { width: 38px; height: 38px; stroke-width: 1.4; }
.feature-empty strong { color: #5b626a; font-size: 14px; }
.feature-empty span { max-width: 360px; font-size: 11px; line-height: 1.55; }
.feature-empty button { margin-top: 6px; }
.feature-callout { min-height: 210px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 34px; overflow: hidden; border: 1px solid #eadc9f; border-radius: 6px; background: #fffaf0; }
.feature-callout > div:first-child { max-width: 660px; }
.feature-callout > div:first-child > span { display: inline-flex; align-items: center; gap: 7px; color: #8d6500; font-size: 11px; font-weight: 650; }
.feature-callout > div:first-child > span svg { width: 16px; height: 16px; }
.feature-callout h2 { margin-top: 9px; color: #22272c; font-size: 24px; line-height: 1.3; }
.feature-callout p { margin: 7px 0 18px; color: #737b84; font-size: 12px; line-height: 1.7; }
.migration-steps { min-width: 340px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid rgba(0,0,0,.08); background: rgba(0,0,0,.08); }
.migration-steps span { min-height: 104px; display: grid; place-items: center; align-content: center; gap: 8px; color: #535b64; background: rgba(255,255,255,.94); font-size: 11px; }
.migration-steps b { width: 28px; height: 28px; display: grid; place-items: center; color: #282b30; border-radius: 50%; background: #ffe20b; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-grid > article, .feature-grid > button { min-width: 0; min-height: 120px; display: grid; justify-items: start; align-content: center; gap: 6px; padding: 18px; color: #2d3339; border: 1px solid #e4e7ea; border-radius: 6px; background: #fff; text-align: left; }
.feature-grid > button { cursor: pointer; }
.feature-grid > button:hover { border-color: #d6bc28; background: #fffdf2; }
.feature-grid > article > svg, .feature-grid > button > svg { width: 22px; height: 22px; margin-bottom: 6px; color: #967500; }
.feature-grid strong { font-size: 14px; }
.feature-grid span { color: #878e97; font-size: 11px; line-height: 1.55; }
.feature-setting-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #edf0f2; }
.feature-setting-row:last-child { border-bottom: 0; }
.feature-setting-row > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.feature-setting-row > div > svg { width: 22px; height: 22px; color: #7a838d; }
.feature-setting-row > div > span { min-width: 0; display: grid; gap: 4px; }
.feature-setting-row strong { color: #30353a; font-size: 13px; }
.feature-setting-row small { color: #8b929a; font-size: 10px; }
.feature-activity { padding: 8px 18px; }
.feature-activity > article { min-height: 62px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid #edf0f2; }
.feature-activity > article:last-child { border-bottom: 0; }
.feature-activity > article > svg { width: 18px; height: 18px; color: #78838d; }
.feature-activity > article > div { min-width: 0; display: grid; gap: 3px; }
.feature-activity strong { overflow: hidden; color: #343a40; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.feature-activity span, .feature-activity time { color: #9299a1; font-size: 10px; }
.sourcing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sourcing-grid > article { min-height: 180px; align-content: start; }
.sourcing-grid .sourcing-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #815f00; border-radius: 6px; background: #fff2b2; }
.sourcing-grid article > div { min-width: 0; display: grid; gap: 5px; }
.sourcing-grid article > div strong { display: -webkit-box; overflow: hidden; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sourcing-grid article > div small { color: #8b929a; font-size: 10px; }
.sourcing-grid em { color: #1d7658; font-size: 10px; font-style: normal; }
.sourcing-grid button { align-self: end; }
.feature-doc-layout { min-height: 590px; display: grid; grid-template-columns: 210px minmax(0, 1fr); overflow: hidden; border: 1px solid #e4e7ea; border-radius: 6px; background: #fff; }
.feature-doc-layout > nav { padding: 18px 14px; border-right: 1px solid #eceef0; }
.feature-doc-layout > nav a { min-height: 38px; display: flex; align-items: center; padding: 0 12px; color: #606871; border-radius: 4px; font-size: 12px; }
.feature-doc-layout > nav a.active { color: #6c4f00; background: #fff7cd; font-weight: 600; }
.feature-doc-layout > div { min-width: 0; padding: 32px 42px; }
.feature-doc-intro > span { color: #6e5ac7; font-size: 10px; font-weight: 700; }
.feature-doc-intro h2 { margin-top: 8px; color: #273243; font-size: 25px; }
.feature-doc-intro p { margin-top: 8px; color: #707a88; font-size: 12px; }
.feature-doc-intro > code { display: block; margin-top: 18px; padding: 12px 14px; color: #4d3ca6; border: 1px solid #ded9f3; border-radius: 4px; background: #f8f6ff; font-family: Consolas, monospace; font-size: 12px; }
.feature-api-list { display: grid; gap: 8px; margin-top: 28px; }
.feature-api-list article { min-height: 54px; display: grid; grid-template-columns: 54px minmax(160px, .7fr) minmax(220px, 1fr) 34px; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #e7e9ec; border-radius: 5px; }
.feature-api-list b { width: max-content; padding: 3px 6px; color: #225fc1; border-radius: 3px; background: #edf4ff; font-size: 9px; }
.feature-api-list b.post { color: #a35b00; background: #fff2df; }
.feature-api-list code { overflow: hidden; font-family: Consolas, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.feature-api-list span { color: #7c858f; font-size: 11px; }
.funds-account .balance-row { min-height: 150px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; }
.balance-row > div { min-width: 0; padding: 20px 28px; border-right: 1px solid #edf0f2; }
.balance-row > div:last-child { border-right: 0; }
.balance-row small, .balance-row strong { display: block; }
.balance-row small { color: #848c95; font-size: 11px; }
.balance-row strong { margin-top: 9px; overflow: hidden; color: #242a2f; font-size: 28px; text-overflow: ellipsis; white-space: nowrap; }
.plan-grid > article { min-height: 260px; align-content: start; padding: 24px; }
.plan-grid > article > span { color: #7a6300; font-size: 10px; font-weight: 700; }
.plan-grid h3 { margin-top: 7px; font-size: 18px; }
.plan-grid > article > strong { margin-top: 10px; color: #272c31; font-size: 30px; }
.plan-grid > article > strong small { color: #8b929a; font-size: 11px; font-weight: 400; }
.plan-grid p { min-height: 52px; margin-top: 12px; color: #747c85; font-size: 11px; line-height: 1.65; }
.plan-grid button { width: 100%; margin-top: auto; }
.subscription-history { padding: 14px 18px; }
.subscription-history h3 { margin-bottom: 8px; font-size: 14px; }
.subscription-history article { min-height: 50px; display: grid; grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) 80px 150px; align-items: center; gap: 12px; border-top: 1px solid #edf0f2; font-size: 11px; }
.subscription-history span, .subscription-history time { color: #818993; }
.subscription-history em { color: #177353; font-style: normal; }
.agent-callout { min-height: 250px; border-color: #cfe2ef; background: #f5fbff; }
.reference-feature-dialog { width: min(580px, calc(100vw - 32px)); }
.reference-feature-dialog .feature-dialog-fields { display: grid; gap: 14px; }
.migration-url-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.migration-url-control .outline-button { min-width: 104px; }
.migration-source-preview { min-height: 70px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #dfe3e6; background: #f8f9fa; }
.migration-source-preview > img, .migration-source-preview > svg { width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; }
.migration-source-preview > svg { padding: 12px; color: #727b84; background: #fff; }
.migration-source-preview > span { min-width: 0; display: grid; gap: 5px; }
.migration-source-preview strong, .migration-source-preview small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.migration-source-preview strong { color: #242a2f; font-size: 12px; }
.migration-source-preview small { color: #727b84; font-size: 10px; }
.migration-source-preview.loading > svg { animation: spin .8s linear infinite; }
.migration-source-preview.success { border-color: #b9ddca; background: #f2faf6; }
.migration-source-preview.warning { border-color: #e4d589; background: #fffcec; }
.migration-source-preview.error { border-color: #efc4c4; background: #fff6f6; }
.feature-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.feature-check-grid label { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #e2e5e8; border-radius: 4px; font-size: 11px; }
.feature-check-grid label:has(input[type="checkbox"]:checked) { color: #302b00; border-color: #d9bd00; background: #fff8c7; }

@media (max-width: 1180px) {
  .feature-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sourcing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-callout { align-items: flex-start; flex-direction: column; }
  .migration-steps { width: 100%; min-width: 0; }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .data-source-strip { max-width: 360px; }
  .source-records { display: none; }
}

@media (max-width: 1050px) and (min-width: 761px) {
  #client-entry, #manual-entry { display: none; }
  .data-source-strip { max-width: 290px; }
  .top-nav-item { padding-inline: 9px; }
}

@media (max-width: 860px) and (min-width: 761px) {
  .data-source-strip { max-width: 220px; }
  .source-recovery, .source-sync-state { display: none; }
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .reference-feature-view { min-height: calc(100dvh - 96px); padding: 10px; }
  .reference-feature-head { min-height: 74px; align-items: flex-start; padding: 12px; }
  .reference-feature-head h1 { font-size: 18px; }
  .reference-feature-head p { max-width: 220px; white-space: normal; }
  .reference-feature-head > .primary-button { width: 38px; min-width: 38px; padding: 0; overflow: hidden; font-size: 0; }
  .reference-feature-head > .primary-button svg { width: 16px; height: 16px; }
  .migration-url-control { grid-template-columns: minmax(0, 1fr); }
  .migration-url-control .outline-button { width: 100%; }
  .migration-source-preview strong, .migration-source-preview small { white-space: normal; }
  .feature-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .feature-metric { min-height: 74px; gap: 9px; padding: 10px; }
  .feature-metric > span { width: 32px; height: 32px; flex-basis: 32px; }
  .feature-metric > span svg { width: 17px; height: 17px; }
  .feature-metric strong { font-size: 17px; }
  .feature-toolbar { align-items: flex-start; flex-direction: column; padding: 10px 2px; }
  .feature-toolbar > button { width: 100%; }
  .feature-table { min-width: 0; }
  .feature-table thead { display: none; }
  .feature-table tbody { display: block; padding: 8px; }
  .feature-table tr { display: block; margin-bottom: 8px; overflow: hidden; border: 1px solid #e1e4e7; border-radius: 5px; }
  .feature-table tr:last-child { margin-bottom: 0; }
  .feature-table td { width: 100%; min-height: 42px; display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 10px; overflow-wrap: anywhere; border-bottom: 1px solid #edf0f2; }
  .feature-table td:last-child { border-bottom: 0; }
  .feature-table td::before { content: attr(data-label); color: #8b929a; font-size: 10px; }
  .feature-table td[colspan] { display: block; }
  .feature-table td[colspan]::before { content: none; }
  .feature-table td > strong, .feature-table td > small { max-width: 100%; white-space: normal; }
  .feature-callout { min-height: 0; padding: 22px 18px; }
  .feature-callout h2 { font-size: 20px; }
  .migration-steps { grid-template-columns: 1fr; }
  .migration-steps span { min-height: 64px; grid-template-columns: 28px 1fr; justify-items: start; padding: 0 18px; }
  .feature-grid, .sourcing-grid { grid-template-columns: 1fr; }
  .feature-grid > article, .feature-grid > button { min-height: 100px; }
  .feature-doc-layout { grid-template-columns: 1fr; }
  .feature-doc-layout > nav { display: flex; gap: 4px; padding: 8px; overflow: auto; border-right: 0; border-bottom: 1px solid #eceef0; }
  .feature-doc-layout > nav a { flex: 0 0 auto; }
  .feature-doc-layout > div { padding: 20px 14px; }
  .feature-api-list article { grid-template-columns: 48px minmax(0, 1fr) 34px; }
  .feature-api-list article span { grid-column: 1 / -1; grid-row: 2; }
  .funds-account .balance-row { grid-template-columns: 1fr; }
  .balance-row > div { border-right: 0; border-bottom: 1px solid #edf0f2; }
  .balance-row > div:last-child { border-bottom: 0; }
  .subscription-history article { grid-template-columns: 1fr 1fr; padding: 10px 0; }
  .reference-feature-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
}

/* Persistent desktop icon rail for quickly reclaiming horizontal workspace. */
@media (min-width: 761px) {
  body {
    --primary-nav-width: 184px;
    --secondary-nav-width: 156px;
    --shell-nav-width: calc(var(--primary-nav-width) + var(--secondary-nav-width));
  }
  body.primary-nav-compact { --primary-nav-width: 64px; }
  .first-nav {
    width: var(--primary-nav-width);
    flex-basis: var(--primary-nav-width);
    transition: width .2s ease, flex-basis .2s ease;
  }
  .sec-nav { width: var(--secondary-nav-width); }
  .fold-btn { left: calc(var(--shell-nav-width) - 13px); }
  .left-aside.folded .fold-btn { left: calc(var(--primary-nav-width) - 13px); }
  .main-content {
    width: calc(100% - var(--shell-nav-width));
    margin-left: var(--shell-nav-width);
  }
  body.no-secondary .main-content,
  body.nav-folded .main-content {
    width: calc(100% - var(--primary-nav-width));
    margin-left: var(--primary-nav-width);
  }
  body.service-workbench-active .left-aside { width: var(--shell-nav-width); }
  body.service-workbench-active .left-aside.folded { width: var(--primary-nav-width); }
  body.service-workbench-active .first-nav {
    width: var(--primary-nav-width);
    flex-basis: var(--primary-nav-width);
    background: #292b2f;
  }
  body.service-workbench-active .nav-group-links .nav-item {
    width: 100%;
    min-height: 34px;
    justify-content: flex-start;
    padding: 0 9px;
    color: #b6b8bd;
    background: transparent;
    font-size: 13px;
    line-height: 34px;
  }
  body.service-workbench-active .nav-group-links .nav-item:hover,
  body.service-workbench-active .nav-group-links .nav-item:focus {
    color: #fff;
    background: rgba(255,255,255,.07);
  }
  body.service-workbench-active .nav-group-links .nav-item.active {
    color: #1f2023;
    background: var(--yellow);
  }
  body.service-workbench-active .main-content,
  body.service-workbench-active.no-secondary .main-content,
  body.service-workbench-active.nav-folded .main-content {
    width: calc(100% - var(--shell-nav-width));
    margin-left: var(--shell-nav-width);
  }
  body.service-workbench-active.nav-folded .main-content {
    width: calc(100% - var(--primary-nav-width));
    margin-left: var(--primary-nav-width);
  }
  .primary-nav-toggle {
    width: calc(100% - 20px);
    height: 42px;
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    margin: 0 10px 10px;
    padding: 0;
    color: #aeb3ba;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 4px;
    background: rgba(255,255,255,.035);
    transition: color .16s ease, background .16s ease, border-color .16s ease;
  }
  .primary-nav-toggle:hover,
  .primary-nav-toggle:focus-visible {
    color: #ffe60f;
    border-color: rgba(255,230,15,.48);
    background: rgba(255,230,15,.08);
  }
  .primary-nav-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; }
  .primary-nav-toggle-open { display: none; }
  body.primary-nav-compact .primary-nav-toggle-close { display: none; }
  body.primary-nav-compact .primary-nav-toggle-open { display: block; }
  body.primary-nav-compact .first-nav-list {
    padding-inline: 0;
    scrollbar-width: none;
  }
  body.primary-nav-compact .first-nav-list::-webkit-scrollbar { display: none; }
  body.primary-nav-compact .nav-group { padding: 2px 0; }
  body.primary-nav-compact .nav-group + .nav-group { margin-top: 2px; }
  body.primary-nav-compact .nav-group-trigger {
    width: 44px;
    height: 44px;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    border-radius: 4px;
    font-size: 0;
  }
  body.primary-nav-compact .nav-group-trigger > span { justify-content: center; gap: 0; }
  body.primary-nav-compact .nav-group-trigger > span svg { width: 20px; height: 20px; }
  body.primary-nav-compact .nav-group-trigger > svg { display: none; }
  body.primary-nav-compact .nav-group-links { display: none !important; }
  body.primary-nav-compact .nav-group.active .nav-group-trigger {
    color: #ffe60f;
    background: rgba(255,230,15,.11);
  }
  body.primary-nav-compact .primary-nav-toggle {
    width: 44px;
    margin-inline: 10px;
  }
}

.service-conversation > :is(.conversation-empty, .conversation-loading, .conversation-load-error) {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-row: 1 / -1;
  align-self: stretch;
  justify-self: stretch;
  text-align: center;
}

@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  .primary-nav-toggle { display: none; }
}

/* Mobile operations workbench: one authoritative final override layer. */
@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  html { background: #f4f5f7; }
  body { min-height: 100dvh; overflow-x: hidden; background: #f4f5f7; }

  .top-header { height: 48px; padding: 0 8px 0 10px; }
  .top-header-inner { gap: 6px; }
  .logo-ads { min-width: 0; height: 48px; gap: 7px; margin-right: auto; }
  .logo { width: 28px; height: 28px; flex-basis: 28px; }
  .brand-wordmark strong { font-size: 15px; line-height: 18px; }
  .top-nav { gap: 1px; }
  .top-nav-item, .user-info { width: 32px; height: 32px; }
  .top-nav-item svg { width: 17px; height: 17px; }
  .user-avatar { width: 26px; height: 26px; flex-basis: 26px; }
  .app-shell { padding-top: 48px; }

  .left-aside { z-index: 40; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #252629; }
  .first-nav { height: 60px; background: #252629; }
  .nav-item, .nav-item-wrap, .nav-item-wrap .nav-item { height: 60px; }
  .nav-item { gap: 3px; color: #c4c6ca; }
  .nav-item.active { color: #ffe60f; border-top: 0; box-shadow: inset 0 3px #ffe60f; background: #202124; }
  .nav-item svg { width: 19px; height: 19px; }
  .main-content, body.no-secondary .main-content, body.nav-folded .main-content {
    width: 100%;
    min-height: calc(100dvh - 48px);
    margin-left: 0;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
  .app-view { min-height: calc(100dvh - 108px - env(safe-area-inset-bottom)); }

  .data-source-strip {
    min-width: 82px;
    max-width: 118px;
    height: 32px;
    flex: 0 1 118px;
    gap: 6px;
    margin-right: auto;
    padding: 0 2px 0 8px;
  }
  .source-health { width: 6px; height: 6px; flex-basis: 6px; box-shadow: 0 0 0 2px rgba(211,155,24,.12); }
  .data-source-strip.connected .source-health { box-shadow: 0 0 0 2px rgba(42,157,104,.12); }
  .source-summary { gap: 0; overflow: hidden; }
  .source-summary > strong, .source-connection strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .source-connection { min-width: 0; gap: 2px; padding-inline: 2px; }
  .source-connection svg, .source-recovery { display: none; }
  .source-sync-state, .source-records { display: none; }
  .source-sync-button { width: 28px; min-width: 28px; height: 28px; padding: 0; }
  .source-sync-button span { display: none; }

  .settings-reference-row > div:last-child button {
    min-width: max-content;
    white-space: nowrap;
  }
  .settings-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-actions button {
    width: 100%;
    white-space: nowrap;
  }
  .dialog-field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .mobile-secondary-nav:not([hidden]) { top: 48px; height: 40px; padding: 0 8px; box-shadow: none; }
  .mobile-secondary-nav a { height: 40px; padding: 0 11px; }

  .card-vault-view { min-height: 0; padding: 7px 10px 18px; background: #f4f5f7; }
  .vault-page-head { min-height: 58px; padding: 7px 2px; border: 0; border-radius: 0; background: transparent; }
  .vault-eyebrow { display: none; }
  .vault-page-head h1 { margin: 0; font-size: 18px; line-height: 23px; }
  .vault-page-head p { margin-top: 2px; font-size: 11px; }
  .vault-page-head .outline-button { width: 34px; min-width: 34px; height: 34px; }
  .vault-metrics { gap: 6px; margin-top: 2px; }
  .vault-metric { min-height: 66px; gap: 8px; padding: 9px 10px; border-radius: 5px; }
  .vault-metric > span { width: 30px; height: 30px; flex-basis: 30px; border-radius: 6px; }
  .vault-metric > span svg { width: 16px; height: 16px; }
  .vault-metric > div { gap: 1px; }
  .vault-metric small { font-size: 10px; }
  .vault-metric strong { font-size: 18px; line-height: 22px; }
  .vault-content { min-height: 0; margin-top: 7px; border-radius: 5px; }
  .vault-toolbar { min-height: 0; gap: 8px; padding: 10px; }
  .vault-toolbar > div { gap: 6px; }
  .vault-toolbar > div:last-child { flex-wrap: nowrap; justify-content: flex-start; overflow: auto hidden; scrollbar-width: none; }
  .vault-toolbar > div:last-child::-webkit-scrollbar { display: none; }
  .vault-toolbar > div:last-child > button { flex: 0 0 auto; }
  .vault-filters label { height: 32px; }
  .vault-filters select { height: 32px; }
  .vault-table tbody { padding: 6px; }
  .vault-table tr { margin-bottom: 6px; padding: 5px 10px; border-radius: 4px; }
  .vault-table td { min-height: 30px; grid-template-columns: 76px minmax(0, 1fr); padding: 5px 0; }
  .card-type-table tbody tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 10px 6px; }
  .card-type-table tbody td { min-width: 0; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; gap: 2px; padding: 7px 5px; border-bottom: 0; }
  .card-type-table tbody td::before { font-size: 9px; }
  .card-type-table tbody td:nth-child(1) { display: none; }
  .card-type-table tbody td[colspan] { display: block; grid-column: 1 / -1; padding: 0; }
  .card-type-table tbody td:nth-child(2) { grid-column: 1 / 4; min-height: 52px; border-bottom: 1px solid #eef0f2; }
  .card-type-table tbody td:nth-child(8) { grid-column: 4; grid-row: 1; align-items: flex-end; border-bottom: 1px solid #eef0f2; }
  .card-type-table tbody td:nth-child(7) { display: none; }
  .card-type-table tbody td:nth-child(9) { grid-column: 1 / -1; align-items: stretch; border-top: 1px solid #eef0f2; }
  .card-type-table .vault-actions { justify-content: flex-end; gap: 14px; }
  .card-type-primary { width: 100%; }
  .stock-number { font-size: 14px; }
  .vault-workflow-band { min-height: 0; gap: 14px; margin: 8px; padding: 16px; }
  .vault-workflow-band h2 { font-size: 16px; line-height: 23px; }
  .vault-asset-grid, .vault-template-grid { padding: 8px; }
  .card-vault-empty { min-height: 148px; padding: 18px 12px; }
  .card-vault-empty > span { width: 46px; height: 46px; }
  .card-vault-empty > span svg { width: 23px; height: 23px; }

  .enterprise-view { height: auto; min-height: calc(100dvh - 148px - env(safe-area-inset-bottom)); padding: 7px 10px 18px; overflow: visible; }
  .enterprise-page-head { min-height: 58px; align-items: center; flex-direction: row; gap: 8px; padding: 7px 2px; border-radius: 0; background: transparent; }
  .enterprise-page-head h1 { font-size: 18px; line-height: 23px; }
  .enterprise-page-head p { margin-top: 2px; font-size: 11px; }
  .enterprise-page-head > div:last-child { width: auto; flex: 0 0 auto; gap: 6px; }
  .enterprise-page-head > div:last-child button { width: 34px; min-width: 34px; height: 34px; flex: 0 0 34px; justify-content: center; padding: 0; overflow: hidden; font-size: 0; }
  .enterprise-page-head > div:last-child button svg { width: 16px; height: 16px; flex: 0 0 16px; }
  .enterprise-metrics { gap: 6px; margin: 2px 0 7px; }
  .enterprise-metric { min-height: 66px; gap: 8px; padding: 9px 10px; border-radius: 5px; }
  .enterprise-metric > span { width: 30px; height: 30px; flex-basis: 30px; border-radius: 6px; }
  .enterprise-metric > span svg { width: 16px; height: 16px; }
  .enterprise-metric > div { gap: 1px; }
  .enterprise-metric strong { font-size: 18px; line-height: 22px; }
  .enterprise-metric small { font-size: 10px; }
  .enterprise-table-panel { min-height: 0; padding: 0 0 8px; overflow: hidden; border-radius: 5px; }
  .integration-toolbar { min-height: 50px; align-items: center; flex-direction: row; gap: 8px; padding: 8px 10px; }
  .integration-toolbar > div { gap: 1px; }
  .integration-toolbar strong { font-size: 13px; }
  .integration-toolbar span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .integration-toolbar > button { flex: 0 0 auto !important; white-space: nowrap; }
  .enterprise-table-panel > .enterprise-table-scroll { overflow: visible; border-bottom: 1px solid #eceef1; }
  .enterprise-table-panel > .enterprise-table-scroll:last-child { border-bottom: 0; }
  .erp-profile-table tbody, .erp-run-table tbody, .integration-subscriptions tbody, .integration-deliveries tbody { display: block; padding: 6px; }
  .integration-subscriptions, .integration-deliveries { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0; }
  .integration-subscriptions thead, .integration-deliveries thead { display: none; }
  .integration-subscriptions tbody tr, .integration-deliveries tbody tr { display: block; margin: 0 0 6px; overflow: hidden; border: 1px solid #e3e6e9; border-radius: 4px; }
  .integration-subscriptions tbody tr:last-child, .integration-deliveries tbody tr:last-child { margin-bottom: 0; }
  .integration-subscriptions tbody td, .integration-deliveries tbody td { width: 100%; min-height: 36px; height: auto; display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #edf0f2; overflow-wrap: anywhere; white-space: normal; }
  .integration-subscriptions tbody td::before, .integration-deliveries tbody td::before { content: attr(data-label); color: #8a939f; font-size: 10px; }
  .integration-subscriptions tbody td:last-child, .integration-deliveries tbody td:last-child { border-bottom: 0; }
  .integration-subscriptions tbody td[colspan], .integration-deliveries tbody td[colspan] { display: block; padding: 0; }
  .integration-subscriptions tbody td[colspan]::before, .integration-deliveries tbody td[colspan]::before { display: none; }
  .enterprise-empty { min-height: 116px; gap: 5px; padding: 16px 12px; }
  .enterprise-empty svg { width: 28px; height: 28px; }
  .enterprise-empty strong { font-size: 13px; }
  .enterprise-empty span { font-size: 10px; line-height: 16px; }
  .enterprise-empty button { margin-top: 4px; }

  body.service-workbench-active .left-aside { height: calc(60px + env(safe-area-inset-bottom)); }
  body.service-workbench-active .first-nav,
  body.service-workbench-active .nav-item,
  body.service-workbench-active .nav-item-wrap,
  body.service-workbench-active .nav-item-wrap .nav-item { height: 60px; }
  body.service-workbench-active .main-content,
  body.service-workbench-active.no-secondary .main-content,
  body.service-workbench-active.nav-folded .main-content {
    height: calc(100dvh - 60px - env(safe-area-inset-bottom));
    padding-bottom: 0;
  }
  body.service-workbench-active .im-reference-view { height: 100%; grid-template-rows: 52px 36px minmax(0, 1fr); }
  .service-storebar { height: 52px; }
  .service-storebar .im-account-tabs { min-height: 52px; }
  .store-tab { min-width: 128px; max-width: 146px; height: 52px !important; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 7px; padding: 0 8px !important; }
  .store-tab-all { min-width: 112px; }
  .store-tab-add { width: 38px; height: 52px !important; flex-basis: 38px !important; }
  .store-avatar { width: 30px; height: 30px; font-size: 11px; }
  .store-tab strong { font-size: 12px; }
  .store-tab small { font-size: 9px; }
  .service-store-actions { padding-inline: 2px; }
  .service-store-actions > button { width: 30px; height: 32px; }
  .service-store-actions #im-connect-page { display: none; }
  .service-overview { grid-auto-columns: 92px; height: 36px; }
  .service-kpi { height: 36px; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 4px; padding: 0 7px; }
  .service-kpi svg { width: 14px; height: 14px; }
  .service-kpi span { font-size: 10px; }
  .service-kpi strong { font-size: 14px; }
  .service-shell { min-height: 0; border-top: 0; }
  .service-session-pane > header { display: none; }
  .im-search { margin: 6px 10px 5px; }
  .im-search input { height: 34px; }
  .service-session-item { min-height: 82px !important; padding: 8px 9px !important; }
  .service-session-main { gap: 8px; }
  .service-list-avatar { width: 38px; height: 38px; }
  .service-item-thumb { width: 38px; height: 38px; flex-basis: 38px; }
  .service-session-line strong { font-size: 13px; }
  .service-session-line time, .service-buyer-id { font-size: 9px; }
  .service-buyer-id { margin-top: 1px; }
  .service-session-copy > p { margin: 2px 0 4px; font-size: 11px; }
  .service-session-meta { gap: 4px; padding-left: 46px; }
  .service-session-meta span { max-width: 80px; padding: 1px 4px; font-size: 9px; line-height: 15px; }
  .service-session-meta .service-sla.none { display: none; }
  .service-tags { display: none; }
  .service-session-item > b { top: 8px; right: 9px; }

  .service-conversation { grid-template-rows: 52px minmax(0, 1fr) auto; background: #f3f4f6; }
  .conversation-head { gap: 7px; padding: 0 7px; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); }
  .conversation-head .buyer-avatar { width: 30px; height: 30px; display: grid; }
  .conversation-head > div { gap: 7px; }
  .conversation-head strong { font-size: 13px; }
  .conversation-head small { max-width: 34vw; font-size: 9px; }
  .conversation-back, .conversation-actions .icon-button { width: 30px; height: 30px; }
  .conversation-actions { gap: 3px !important; }
  .conversation-actions .primary-button { min-width: 48px; height: 30px; padding-inline: 7px; }
  .service-message-body { padding: 14px 9px; }
  .message-row { gap: 6px; margin-bottom: 12px; }
  .message-avatar { width: 27px; height: 27px; flex-basis: 27px; }
  .service-message-body .message-bubble { max-width: calc(84% - 28px); padding: 9px 10px; border-radius: 6px; }
  .service-message-body .message-bubble p { font-size: 12px; line-height: 18px; }
  .service-composer { grid-template-rows: 35px auto; padding-bottom: 0; background: #fff; }
  .composer-tools { height: 35px; padding-inline: 4px; overflow: auto hidden; scrollbar-width: none; }
  .composer-tools::-webkit-scrollbar { display: none; }
  .composer-tools button { height: 32px; padding-inline: 6px; }
  .composer-input { grid-template-columns: minmax(0, 1fr) 48px; gap: 5px; padding: 6px 8px; }
  .composer-input textarea { min-height: 44px; max-height: 88px; padding: 7px 5px; }
  .composer-input button { width: 48px; height: 36px; padding: 0; border-radius: 18px; }
  .service-context-pane { width: 100%; }
}

/* Complete mobile coverage shared by every routed workspace and dialog. */
@media (max-width: 760px), (max-width: 900px) and (max-height: 500px) {
  html { min-width: 0; scroll-padding-top: 88px; }
  body { width: 100%; max-width: 100%; }
  .top-header {
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }
  .left-aside {
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
  }
  .main-content,
  body.no-secondary .main-content,
  body.nav-folded .main-content {
    max-width: 100vw;
    overflow-x: clip;
  }
  .app-view,
  .reference-container-act,
  .reference-feature-content,
  .enterprise-table-panel,
  .vault-content,
  .feature-panel,
  .operation-workspace,
  .route-detail,
  .route-editor {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .reference-list-view,
  .reference-feature-view,
  .enterprise-view,
  .card-vault-view,
  .business-view,
  .im-outbox-mode { overscroll-behavior-x: contain; }
  .app-view :is(form, fieldset, label, input, select, textarea) { min-width: 0; max-width: 100%; }
  .app-view :is(h1, h2, h3, p, strong, small, code, dd) { overflow-wrap: anywhere; }
  .app-view :is(img, video, canvas) { max-width: 100%; }

  .reference-search-box { gap: 8px; }
  .reference-search-box label { overflow: hidden; }
  .reference-search-actions,
  .reference-operation,
  .vault-actions,
  .detail-actions,
  .route-detail-footer,
  .enterprise-page-head > div:last-child {
    min-width: 0;
    flex-wrap: wrap;
  }
  .reference-search-actions > *,
  .reference-operation > *,
  .detail-actions > * { min-width: 0; }
  .reference-pagination { width: 100%; gap: 8px; }
  .reference-pagination > * { max-width: 100%; }
  .reference-empty,
  .enterprise-empty,
  .card-vault-empty,
  .feature-empty { max-width: 100%; }
  .reference-empty > *,
  .enterprise-empty > *,
  .card-vault-empty > *,
  .feature-empty > * { max-width: 100%; }

  .detail-row { grid-template-columns: minmax(88px, 34%) minmax(0, 1fr); }
  .record-detail { grid-template-columns: minmax(0, 1fr); }
  .ledger-list { min-width: 0; }
  .ledger-list > div {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 10px;
    padding: 10px 12px;
  }
  .ledger-list > div > :nth-child(n + 3) { grid-column: 1 / -1; }
  .shipment-detail-items > div { min-width: 0; }

  dialog {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    margin: auto;
    padding: 0;
    overflow: hidden;
  }
  dialog > :is(form, div, section) {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    overflow: auto;
    overscroll-behavior: contain;
  }
  dialog :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { width: 100%; min-width: 0; }
  dialog :is(.dialog-field-row, .feature-dialog-fields) { grid-template-columns: minmax(0, 1fr); }
  dialog footer { flex-wrap: wrap; gap: 8px; }
  dialog footer > button { min-width: 0; flex: 1 1 120px; }

  .enterprise-table-scroll:has(> :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  )) { overflow: visible; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) {
    width: 100%;
    min-width: 0;
    display: block;
    border-collapse: separate;
  }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) thead { display: none; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody { width: 100%; display: block; padding: 6px; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody tr {
    width: 100%;
    display: block;
    margin-bottom: 7px;
    overflow: hidden;
    border: 1px solid #e2e5e8;
    border-radius: 5px;
    background: #fff;
  }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody td {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    position: static;
    padding: 7px 10px;
    border-bottom: 1px solid #edf0f2;
    overflow-wrap: anywhere;
    box-shadow: none;
  }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody td::before { color: #8a939f; font-size: 10px; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody td:last-child { border-bottom: 0; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody td[colspan] { display: block; padding: 0; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) tbody td[colspan]::before { display: none; }
  :is(
    .governance-members-table,
    .service-team-table,
    .governance-roles-table,
    .governance-approvals-table,
    .governance-policies-table,
    .automation-rules-table,
    .automation-runs-table,
    .operations-tasks-table,
    .operations-alerts-table,
    .operations-audit-table
  ) .reference-operation { min-width: 0; flex-wrap: wrap; justify-content: flex-start; }
  .governance-roles-table .permission-list { max-width: 100%; }
  .governance-policies-table select { width: 100%; min-width: 0; }

  .governance-members-table td:nth-child(1)::before { content: "成员"; }
  .governance-members-table td:nth-child(2)::before { content: "角色"; }
  .governance-members-table td:nth-child(3)::before { content: "数据范围"; }
  .governance-members-table td:nth-child(4)::before { content: "状态"; }
  .governance-members-table td:nth-child(5)::before { content: "最后活跃"; }
  .governance-members-table td:nth-child(6)::before { content: "操作"; }
  .service-team-table td:nth-child(1)::before { content: "人员"; }
  .service-team-table td:nth-child(2)::before { content: "店铺范围"; }
  .service-team-table td:nth-child(3)::before { content: "双鱼登录"; }
  .service-team-table td:nth-child(4)::before { content: "独立入口"; }
  .service-team-table td:nth-child(5)::before { content: "状态"; }
  .service-team-table td:nth-child(6)::before { content: "操作"; }
  .governance-roles-table td:nth-child(1)::before { content: "角色"; }
  .governance-roles-table td:nth-child(2)::before { content: "类型"; }
  .governance-roles-table td:nth-child(3)::before { content: "权限"; }
  .governance-roles-table td:nth-child(4)::before { content: "成员数"; }
  .governance-roles-table td:nth-child(5)::before { content: "操作"; }
  .governance-approvals-table td:nth-child(1)::before { content: "申请事项"; }
  .governance-approvals-table td:nth-child(2)::before { content: "对象"; }
  .governance-approvals-table td:nth-child(3)::before { content: "申请人"; }
  .governance-approvals-table td:nth-child(4)::before { content: "审批进度"; }
  .governance-approvals-table td:nth-child(5)::before { content: "状态"; }
  .governance-approvals-table td:nth-child(6)::before { content: "申请时间"; }
  .governance-approvals-table td:nth-child(7)::before { content: "操作"; }
  .governance-policies-table td:nth-child(1)::before { content: "高风险动作"; }
  .governance-policies-table td:nth-child(2)::before { content: "启用审批"; }
  .governance-policies-table td:nth-child(3)::before { content: "通过人数"; }
  .governance-policies-table td:nth-child(4)::before { content: "更新时间"; }
  .automation-rules-table td:nth-child(1)::before, .automation-runs-table td:nth-child(1)::before { content: "规则"; }
  .automation-rules-table td:nth-child(2)::before, .automation-runs-table td:nth-child(2)::before { content: "触发器"; }
  .automation-rules-table td:nth-child(3)::before { content: "适用范围"; }
  .automation-rules-table td:nth-child(4)::before { content: "条件"; }
  .automation-rules-table td:nth-child(5)::before { content: "动作"; }
  .automation-rules-table td:nth-child(6)::before { content: "状态"; }
  .automation-rules-table td:nth-child(7)::before, .automation-runs-table td:nth-child(7)::before { content: "操作"; }
  .automation-runs-table td:nth-child(3)::before { content: "结果"; }
  .automation-runs-table td:nth-child(4)::before { content: "尝试"; }
  .automation-runs-table td:nth-child(5)::before { content: "步骤"; }
  .automation-runs-table td:nth-child(6)::before { content: "开始时间"; }
  .operations-tasks-table td:nth-child(1)::before { content: "任务"; }
  .operations-tasks-table td:nth-child(2)::before { content: "优先级"; }
  .operations-tasks-table td:nth-child(3)::before { content: "状态"; }
  .operations-tasks-table td:nth-child(4)::before { content: "负责人"; }
  .operations-tasks-table td:nth-child(5)::before { content: "截止时间"; }
  .operations-tasks-table td:nth-child(6)::before { content: "创建时间"; }
  .operations-tasks-table td:nth-child(7)::before { content: "操作"; }
  .operations-alerts-table td:nth-child(1)::before { content: "告警"; }
  .operations-alerts-table td:nth-child(2)::before { content: "级别"; }
  .operations-alerts-table td:nth-child(3)::before { content: "状态"; }
  .operations-alerts-table td:nth-child(4)::before { content: "来源"; }
  .operations-alerts-table td:nth-child(5)::before { content: "创建时间"; }
  .operations-alerts-table td:nth-child(6)::before { content: "操作"; }
  .operations-audit-table td:nth-child(1)::before { content: "时间"; }
  .operations-audit-table td:nth-child(2)::before { content: "分类"; }
  .operations-audit-table td:nth-child(3)::before { content: "动作"; }
  .operations-audit-table td:nth-child(4)::before { content: "操作者"; }
  .operations-audit-table td:nth-child(5)::before { content: "摘要"; }
}

/* Unified Xianyu checkbox control */
:root input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  display: inline-grid;
  flex: 0 0 16px;
  place-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid #c9cdd2;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 28, 33, .06);
  cursor: pointer;
  vertical-align: middle;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
:root input[type="checkbox"]::before {
  width: 5px;
  height: 8px;
  content: "";
  border: solid #252525;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease;
}
:root input[type="checkbox"]:hover:not(:disabled):not(:checked):not(:indeterminate) { border-color: #cfb400; background: #fffdf0; box-shadow: 0 0 0 3px rgba(255, 230, 15, .14); }
:root input[type="checkbox"]:focus-visible { outline: 2px solid rgba(218, 187, 0, .48); outline-offset: 2px; }
:root input[type="checkbox"]:active:not(:disabled) { transform: scale(.94); }
:root input[type="checkbox"]:checked,
:root input[type="checkbox"]:indeterminate { border-color: #d2b500; background: #ffe60f; box-shadow: none; }
:root input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(45deg) scale(1); }
:root input[type="checkbox"]:indeterminate::before { width: 8px; height: 2px; border: 0; border-radius: 2px; background: #252525; transform: none; }
:root input[type="checkbox"]:disabled { border-color: #d9dce0; background: #f0f1f2; box-shadow: none; cursor: not-allowed; }
:root input[type="checkbox"]:disabled:checked { background: #dedfe1; }
:root input[type="checkbox"]:disabled::before { border-color: #898e95; }
label:has(input[type="checkbox"]:disabled) { color: #9a9fa6; cursor: not-allowed; }

/* Unified Xianyu select control */
:root select:not([multiple]):not([size]) {
  box-sizing: border-box;
  min-height: 34px;
  max-width: 100%;
  padding: 0 34px 0 11px;
  color: #30343a;
  border: 1px solid #d9dde2;
  border-radius: 5px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f6670' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  box-shadow: 0 1px 2px rgba(24, 28, 33, .04);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
:root select:not([multiple]):not([size]):hover:not(:disabled) { border-color: #cbb300; background-color: #fffef4; }
:root select:not([multiple]):not([size]):focus { border-color: #d0b500; box-shadow: 0 0 0 2px rgba(255, 230, 15, .18); }
:root select:not([multiple]):not([size]):focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(255, 230, 15, .24); }
:root select:not([multiple]):not([size]):disabled { color: #969ca4; border-color: #dfe2e5; background-color: #f2f3f4; box-shadow: none; cursor: not-allowed; }
:root select:not([multiple]):not([size]) option { color: #30343a; background: #fff; }
:root select::-ms-expand { display: none; }

@media (max-width: 340px) {
  .top-nav { gap: 0; }
  .top-nav-item, .user-info { width: 30px; }
  .reference-search-box,
  .reference-search-extra,
  .settings-actions,
  .feature-metrics,
  .vault-metrics,
  .enterprise-metrics,
  .connector-metrics { grid-template-columns: minmax(0, 1fr); }
  .feature-setting-row { align-items: stretch; flex-direction: column; }
  .feature-setting-row > :is(button, label) { width: 100%; max-width: 100%; }
  .settings-reference-row > div:last-child button {
    min-height: 34px;
    height: auto;
    line-height: normal;
  }
  .connector-head > div:last-child button {
    min-height: 34px;
    height: auto;
    line-height: normal;
  }
  .order-table tbody tr,
  .product-table tbody tr,
  .refund-table tbody tr { grid-template-columns: minmax(0, 1fr); }
  .order-table tbody td,
  .product-table tbody td,
  .refund-table tbody td { grid-column: 1 / -1; }
  .mobile-nav-drawer nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pending-list .home-stat-item,
  .statistics-list .home-stat-item {
    min-height: 88px;
    height: auto;
    flex-basis: 100%;
  }
}
