    :root {
      --bg: #eef3f8;
      --surface: #ffffff;
      --soft: #f6f9fd;
      --line: #d9e3ef;
      --text: #15283d;
      --muted: #68778a;
      --brand: #2f6fed;
      --brand-dark: #174f9f;
      --brand-soft: #e8f1ff;
      --cyan: #0b8ea8;
      --cyan-soft: #e5f8fb;
      --nav: #17395f;
      --nav-2: #123050;
      --green: #13825a;
      --green-soft: #e7f6ef;
      --amber: #b46400;
      --amber-soft: #fff3dc;
      --red: #c44444;
      --red-soft: #fff0f0;
      --purple: #7254c8;
      --purple-soft: #f0ecff;
      --shadow: 0 12px 28px rgba(24, 48, 80, .08);
      --side: 248px;
    }

    .is-page-loading { position: relative; }
    .page-loading-overlay { position:absolute; inset:0; z-index:40; display:flex; align-items:center; justify-content:center; gap:10px; min-height:100%; color:var(--muted); background:var(--bg); }

    * { box-sizing: border-box; }
    html, body { margin: 0; height: 100%; }
    body {
      background: var(--bg);
      color: var(--text);
      font: 14px/1.5 "Microsoft YaHei", Arial, sans-serif;
      overflow: hidden;
    }
    body.modal-open { overflow: hidden !important; }
    button, input, select, textarea { font: inherit; }
    button { cursor: pointer; }
    .app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); height: 100vh; transition: grid-template-columns .18s ease; }
    .app.sidebar-collapsed { --side: 64px; }
    .sidebar { 
      position: relative;
      min-width: 0;
      width: 100%;
      background: linear-gradient(180deg, var(--nav), var(--nav-2));
      color: #fff;
      padding: 18px 14px 52px;
      overflow: auto;
      display: flex;
      flex-direction: column;
    }
    .brand { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; border-bottom: 1px solid rgba(255,255,255,.14); margin-bottom: 14px; }
    .brand-mark { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; }
    .brand-text { min-width: 0; flex: 1; }
    .brand strong { display: block; font-size: 16px; }
    .brand span { display: block; color: rgba(255,255,255,.7); font-size: 12px; }
    .sidebar-toggle { position: absolute; right: 10px; bottom: 12px; width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 0; background: transparent; color: rgba(255,255,255,.8); padding: 0; }
    .sidebar-toggle:hover { background: transparent; color: #fff; }
    .sidebar-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: square; stroke-linejoin: miter; transition: transform .18s ease; }
    .sidebar-toggle .sidebar-toggle-arrow { fill: currentColor; stroke: none; }
    .nav-section { margin: 14px 10px 8px; color: rgba(255,255,255,.58); font-size: 12px; }
    .nav-btn {
      width: 100%;
      border: 0;
      background: transparent;
      color: #fff;
      border-radius: 10px;
      padding: 10px 11px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      text-align: left;
      position: relative;
    }
    .nav-btn::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 999px; background: transparent; }
    .nav-btn span { color: inherit; }
    .nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,.14); }
    .nav-btn.active { color: #fff; font-weight: 700; }
    .nav-btn.active::before { background: #fff; }
    .nav-item { min-width: 0; display: inline-flex; align-items: center; gap: 9px; }
    .nav-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
    .nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
    .nav-btn.nav-muted { color: rgba(255,255,255,.46); }
    .nav-btn.nav-muted .nav-icon { opacity: .55; }
    .nav-btn.nav-muted:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.68); }
    .nav-btn.nav-muted.active { background: rgba(255,255,255,.09); color: rgba(255,255,255,.72); font-weight: 600; }
    .nav-btn.nav-muted.active::before { background: rgba(255,255,255,.45); }
    .hidden-nav { display: none; }
    .dev-launcher { display: block; }
    .dev-launcher.dev-top { margin-top: 8px; }
    .dev-launcher.dev-bottom { display: block; margin-top: auto; margin-bottom: 34px; min-height: 52px; padding-top: 12px; border-top: 0; }
    .dev-launcher.dev-bottom .dev-menu { display: none; }
    .dev-launcher.dev-bottom.is-visible .dev-menu { display: block; }
    .dev-menu { position: relative; }
    .dev-submenu { display: grid; gap: 3px; padding: 4px 0 0 22px; }
    .dev-submenu.is-collapsed { display: none; }
    .dev-launcher .nav-btn { color: rgba(214,222,232,.56); }
    .dev-launcher .nav-btn .nav-icon { opacity: .62; }
    .dev-launcher .nav-btn:hover,
    .dev-launcher .nav-btn.active { background: rgba(214,222,232,.08); color: rgba(232,237,244,.78); }
    .dev-launcher .nav-btn.active::before { background: rgba(214,222,232,.5); }
    .dev-bottom-toggle { cursor: pointer; }
    .dev-bottom-toggle, .dev-bottom .dev-submenu .nav-btn { color: rgba(255,255,255,.58); }
    .dev-bottom-toggle:hover, .dev-bottom .dev-submenu .nav-btn:hover, .dev-bottom .dev-submenu .nav-btn.active { background: rgba(255,255,255,.08); color: rgba(255,255,255,.82); }
    .dev-toggle-icon { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
    .dev-toggle-icon.is-open { transform: rotate(225deg) translate(-1px, -1px); }
    .dev-submenu .nav-btn { padding: 8px 10px; font-size: 13px; color: rgba(255,255,255,.86); }
    .dev-submenu .nav-label { font-size: 13px; color: rgba(255,255,255,.86); }
    .legacy-doc { display: none !important; }
    .dev-bottom .dev-submenu .nav-btn,
    .dev-bottom .dev-submenu .nav-btn.active { color: rgba(255,255,255,.58); }
    .dev-bottom .dev-submenu .nav-btn:hover { color: rgba(255,255,255,.72); }
    .knowledge-menu { margin-bottom: 2px; }
    .knowledge-menu > .nav-btn { background: rgba(255,255,255,.08); }
    .knowledge-submenu { display: grid; gap: 3px; padding: 4px 0 5px 22px; }
    .knowledge-submenu.is-collapsed { display: none; }
    .knowledge-nav-label { color: inherit !important; font-size: inherit !important; }
    .knowledge-toggle-icon { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
    .knowledge-toggle-icon.is-open { transform: rotate(225deg) translate(-1px, -1px); }
    .knowledge-submenu .nav-btn { padding: 8px 10px; font-size: 13px; color: rgba(255,255,255,.86); }
    .knowledge-submenu .nav-label { font-size: 13px; color: rgba(255,255,255,.86); }
    .knowledge-submenu .nav-btn:hover, .knowledge-submenu .nav-btn.active { background: rgba(255,255,255,.14); color: #fff; }
    .sidebar-collapsed .sidebar { padding: 12px 5px 46px; overflow: visible; }
    .sidebar-collapsed .brand { justify-content: center; padding: 4px 0 12px; margin-bottom: 10px; }
    .sidebar-collapsed .brand-text { display: none; }
    .sidebar-collapsed .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
    .sidebar-collapsed .sidebar-toggle { right: 21px; bottom: 12px; width: 22px; height: 22px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
    .sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
    .sidebar-collapsed .nav-btn { width: 52px; min-height: 50px; margin: 3px auto; justify-content: center; padding: 7px 4px; border-radius: 8px; flex-direction: column; gap: 3px; }
    .sidebar-collapsed .nav-btn::before { left: -1px; top: 8px; bottom: 8px; width: 2px; }
    .sidebar-collapsed .nav-btn:hover,
    .sidebar-collapsed .nav-btn.active { background: rgba(91,151,218,.28); }
    .sidebar-collapsed .nav-btn.nav-muted:hover,
    .sidebar-collapsed .nav-btn.nav-muted.active { background: rgba(214,222,232,.12); }
    .sidebar-collapsed .nav-item { justify-content: center; display: grid; place-items: center; gap: 3px; }
    .sidebar-collapsed .nav-icon { width: 17px; height: 17px; }
    .sidebar-collapsed .nav-label { display: none; }
    .sidebar-collapsed .nav-btn[data-short]::after { content: attr(data-short); display: block; width: 100%; overflow: hidden; color: currentColor; font-size: 10px; line-height: 1.12; text-align: center; white-space: nowrap; opacity: .86; }
    .sidebar-collapsed .nav-btn[data-short].active::after { opacity: 1; font-weight: 600; }
    .sidebar-collapsed .knowledge-toggle-icon,
    .sidebar-collapsed .dev-toggle-icon { display: none; }
    .sidebar-collapsed .knowledge-submenu,
    .sidebar-collapsed .dev-submenu { display: none !important; }
    .sidebar-collapsed .dev-launcher.dev-top,
    .sidebar-collapsed .dev-launcher.dev-bottom { display: none; }
    .sidebar-collapsed .knowledge-menu { margin-bottom: 0; }
    .main { min-width: 0; height: 100vh; display: grid; grid-template-rows: auto 1fr; }
    .topbar { position: relative; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); padding: 10px 18px; }
    .top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .top-left strong { display: block; font-size: 16px; }
    .top-left span { display: block; color: var(--muted); font-size: 12px; }
    .top-left span.is-empty { display: none; }
    .top-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; }
    .top-context-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf2f7; }
    .top-context-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
    .search { flex: 1 1 340px; min-width: 260px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 11px; background: #fff; }
    .search input { width: 100%; border: 0; outline: 0; background: transparent; }
    .search .btn { padding: 5px 9px; white-space: nowrap; }
    .control { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
    .control label { color: var(--muted); font-size: 12px; }
    .control select { border: 0; outline: 0; background: transparent; color: var(--text); }
    .date-range { display: none; align-items: center; gap: 6px; }
    .date-range.active { display: flex; }
    .date-range input { width: 126px; min-width: 126px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px; color: var(--text); }
    .badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 600; white-space: nowrap; }
    .badge-btn { border: 0; }
    .badge-btn:hover { opacity: .92; }
    .badge-link { text-decoration: none; }
    .top-icon-button { position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); }
    .top-icon-button:hover { color: var(--brand); background: var(--brand-soft); }
    .top-icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .top-icon-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; display: inline-grid; place-items: center; padding: 0 4px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 2px 6px rgba(229, 62, 62, .24); }
    .top-icon-button.has-notice { animation: topIconPulse 1.8s infinite; }
    .top-icon-button.has-notice::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(229, 62, 62, .24); }
    @keyframes topIconPulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
    .platform-switch-button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); padding: 0 10px; }
    .platform-switch-button:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
    .platform-switch-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .context-control { border: 1px solid var(--line); border-radius: 9px; background: #fff; }
    .context-control { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; }
    .context-control > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
    .context-control select { min-width: 82px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; padding: 0; }
    .context-control .date-range { padding-left: 2px; }
    .account-menu { position: relative; margin-left: 12px; }
    .account-box { display: grid; grid-template-columns: 32px auto 12px; gap: 8px; align-items: center; padding: 4px 10px 4px 4px; min-width: 106px; border: 0; border-radius: 999px; background: var(--soft); text-align: left; color: var(--text); }
    .account-box:hover { background: var(--brand-soft); color: var(--brand-dark); }
    .account-box::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin-top: -3px; }
    .account-dropdown { position: absolute; top: 44px; left: 50%; width: 136px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(20,38,60,.18); padding: 6px; display: none; z-index: 30; }
    .account-dropdown.active { display: grid; gap: 8px; }
    .account-dropdown-head { border-bottom: 1px solid var(--line); padding: 4px 4px 9px; }
    .account-dropdown-head strong { display: block; font-size: 14px; }
    .account-dropdown-head span { color: var(--muted); font-size: 12px; }
    .account-menu-btn { width: 100%; border: 0; border-radius: 9px; background: #fff; color: var(--text); padding: 9px 8px; text-align: center; }
    .account-menu-btn:hover { background: var(--soft); }
    .account-menu-btn.danger { color: var(--red); }
    .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; display: grid; place-items: center; font-weight: 700; }
    .account-meta { display: grid; gap: 1px; }
    .account-meta strong { font-size: 13px; line-height: 1.2; }
    .account-meta span { color: var(--muted); font-size: 12px; }
    .workspace { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; overflow: auto; padding: 18px; }
    .page-outlet { height: 100%; min-width: 0; min-height: 0; }
    .route { display: none; gap: 16px; }
    .route.active { display: grid; }
    #customerDetailPage { --customer-detail-head-height: 78px; }
    #customerDetailPage > .page-head { position: sticky; top: -18px; z-index: 15; margin: -18px -18px 0; padding: 18px 18px 14px; background: var(--bg); }
    #customerDetailPage #customerDetail > .panel > .tabs { position: sticky; top: calc(var(--customer-detail-head-height) - 18px); z-index: 14; margin: -15px -15px 12px; padding: 15px 15px 10px; background: #fff; }
    .route.list-page.active { height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
    #customers.route.list-page.active { grid-template-rows: auto auto minmax(0, 1fr); }
    .route.list-page .list-data-panel { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
    .route.list-page .list-data-panel > .table-wrap { min-height: 0; overflow: auto; }
    .route.list-page .list-data-panel thead th { position: sticky; top: 0; z-index: 2; }
    .route.list-page .list-split { min-height: 0; overflow: hidden; }
    .route.list-page .list-split > .panel { min-height: 0; }
    .route.list-page .list-split > .panel:first-child { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
    .route.list-page .list-split > .panel:first-child > .table-wrap { min-height: 0; overflow: auto; }
    .route.list-page .list-split > .panel:last-child { overflow: auto; }
    #todos.route.list-page.active { grid-template-rows: auto auto auto minmax(0, 1fr); }
    #todos.route.list-page.active > .todo-data-views { grid-row: 4; }
    .todo-data-views { min-width: 0; min-height: 0; display: grid; overflow: hidden; }
    #knowledge.route.active { height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
    .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
    .page-head h1 { margin: 0; font-size: 22px; }
    .page-head p { margin: 4px 0 0; color: var(--muted); }
    .list-page > .page-head > div:first-child { display: none; }
    .list-page > .page-head { justify-content: flex-end; min-height: 34px; }
    .actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .btn { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 9px; padding: 8px 11px; }
    .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
    .btn.ghost { background: transparent; }
    .btn.danger { color: var(--red); border-color: #f1c7c7; background: var(--red-soft); }
    .btn[disabled] { opacity: .45; cursor: not-allowed; }
    .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 15px; }
    .panel h2 { margin: 0 0 12px; font-size: 16px; }
    .panel h3 { margin: 0 0 8px; font-size: 15px; }
    .muted { color: var(--muted); }
    .small { color: var(--muted); font-size: 12px; }
    .grid-2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .metric { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; }
    .metric span { display: block; color: var(--muted); font-size: 12px; }
    .metric strong { display: block; margin-top: 4px; font-size: 26px; }
    .metric small { color: var(--muted); }
    .customer-status-grid .metric strong { min-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
    .customer-status-grid .metric strong .tag { vertical-align: middle; }
    .customer-status-grid .metric small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tag { display: inline-flex; align-items: center; height: fit-content; border-radius: 999px; padding: 4px 8px; background: #eef3f8; color: #405165; font-size: 12px; white-space: nowrap; }
    .tag-remove { width: 16px; height: 16px; display: inline-grid; place-items: center; margin-left: 5px; border: 0; border-radius: 50%; background: rgba(64,81,101,.12); color: #405165; padding: 0; line-height: 1; font-size: 12px; }
    .tag.ok { color: var(--green); background: var(--green-soft); }
    .tag.warn { color: var(--amber); background: var(--amber-soft); }
    .tag.bad { color: var(--red); background: var(--red-soft); }
    .tag.ai { color: var(--purple); background: var(--purple-soft); }
    .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
    .chip { display: inline-flex; align-items: center; border-radius: 999px; background: #edf4fb; color: #365d88; padding: 5px 9px; font-size: 12px; }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
    th { color: var(--muted); background: var(--soft); font-weight: 600; white-space: nowrap; }
    tr.clickable { cursor: pointer; }
    tr.clickable:hover td { background: #f9fbff; }
    .table-wrap { overflow: auto; }
    .data-list-table { table-layout: fixed; min-width: 100%; }
    .data-list-table th, .data-list-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .data-list-table .table-actions { text-align: center; white-space: normal; }
    .route.list-page .table-wrap > table .table-actions,
    .route.list-page .table-wrap > table .ai-question-actions-column,
    .knowledge-list > .data-list-table .table-actions { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -1px 0 0 var(--line), -8px 0 12px rgba(20,38,60,.05); }
    .route.list-page .table-wrap > table thead .table-actions,
    .route.list-page .table-wrap > table thead .ai-question-actions-column,
    .knowledge-list > .data-list-table thead .table-actions { z-index: 3; background: var(--soft); }
    .plan-customer-cell-inner { display: flex; align-items: center; min-width: 0; gap: 5px; }
    .plan-history-toggle, .plan-history-toggle-placeholder { width: 18px; height: 24px; flex: 0 0 18px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; }
    .plan-history-toggle { cursor: pointer; }
    .plan-history-toggle-placeholder { visibility: hidden; cursor: default; }
    .history-chevron { display: block; width: 6px; height: 9px; background: #8a99aa; clip-path: polygon(0 0, 100% 50%, 0 100%); transform: rotate(0deg); transform-origin: center; transition: transform .16s ease; }
    .plan-history-toggle[aria-expanded="true"] .history-chevron { transform: rotate(90deg); }
    .plan-history-row td { background: #f8fafd; }
    .plan-history-row .table-actions { background: #f8fafd; }
    .data-list-table td .knowledge-script-summary { white-space: normal; }
    .data-list-actions { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: center; justify-items: stretch; }
    .data-list-actions .btn { width: 100%; min-width: 0; padding-left: 5px; padding-right: 5px; white-space: nowrap; }
    .demand-list-table .table-actions { width: 320px; min-width: 320px; }
    .plan-list-table .table-actions { width: 340px; min-width: 340px; }
    .plan-list-actions { min-width: 0; }
    .plan-list-actions .btn { min-height: 32px; padding-top: 6px; padding-bottom: 6px; }
    .plan-list-more { position: relative; min-width: 0; }
    .plan-list-more-trigger { position: relative; z-index: 1; }
    .plan-list-more-menu {
      position: fixed;
      z-index: 120;
      pointer-events: auto;
      display: none;
      min-width: 132px;
      max-width: 190px;
      gap: 2px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 9px;
      background: #fff;
      box-shadow: 0 14px 32px rgba(20,38,60,.18);
      white-space: normal;
    }
    .plan-list-more-menu.active { display: grid; }
    .plan-list-more-menu .btn { width: 100%; border: 0; border-radius: 7px; padding: 8px 10px; text-align: center; justify-content: center; background: #fff; }
    .plan-list-more-menu .btn:hover { background: var(--soft); }
    .plan-list-more-menu .btn.danger { color: var(--red); background: #fff; }
    .plan-list-more-menu .btn.danger:hover { background: var(--red-soft); }
    .todo-list-table .table-actions { width: 310px; min-width: 310px; }
    .knowledge-script-table .table-actions { width: 230px; min-width: 230px; }
    .knowledge-policy-table .table-actions { width: 230px; min-width: 230px; }
    .knowledge-log-table th, .knowledge-log-table td { height: 44px; padding: 9px 8px; }
    .knowledge-log-table tbody tr:hover td { background: #f9fbff; }
    .knowledge-log-table .knowledge-log-content { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .knowledge-log-table th:nth-child(1), .knowledge-log-table td:nth-child(1) { width: 16%; }
    .knowledge-log-table th:nth-child(2), .knowledge-log-table td:nth-child(2) { width: 52%; }
    .knowledge-log-table th:nth-child(3), .knowledge-log-table td:nth-child(3) { width: 14%; }
    .knowledge-log-table th:nth-child(4), .knowledge-log-table td:nth-child(4) { width: 18%; }
    .customer-table { table-layout: fixed; min-width: 100%; }
    .customer-table th, .customer-table td { position: relative; overflow: hidden; }
    .customer-table th { background: var(--soft); }
    .customer-table td { background: #fff; }
    .customer-table .th-content { display: inline-block; max-width: calc(100% - 9px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
    .customer-table td { text-overflow: ellipsis; white-space: nowrap; }
    .customer-table td[data-customer-col="demandStage"] { overflow: hidden; text-overflow: clip; white-space: nowrap; }
    .customer-table td[data-customer-col="demandStage"] .customer-demand-preview { display: block; width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
    .customer-table tr.customer-demand-row td { background: #fbfdff; color: #4a5d73; }
    .customer-table tr.customer-demand-row td:first-child { border-left: 3px solid #d8e6f5; }
    .customer-table tr.customer-demand-row:hover td { background: #f4f8fc; }
    .customer-name-cell { display: inline-flex; align-items: center; min-width: 0; gap: 5px; }
    .customer-name-cell > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .customer-no-cell { display: inline-flex; align-items: center; min-width: 0; gap: 4px; }
    .customer-no-cell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .customer-group-toggle { width: 18px; height: 22px; flex: 0 0 18px; display: inline-grid; place-items: center; padding: 0; border: 0; background: transparent; color: #8a9bad; font-size: 16px; line-height: 1; cursor: pointer; }
    .customer-group-toggle:hover { color: var(--brand); }
    .customer-group-count { display: none; }
    .customer-data-row.customer-group-collapsed td { background: #f8fbff; font-weight: 600; }
    .customer-data-row.customer-group-collapsed td[data-customer-col="demandStage"] { color: var(--brand-dark); }
    .customer-group-toggle[hidden] { display: none; }
    .customer-table .table-actions { width: 228px; min-width: 228px; padding-right: 10px; padding-left: 10px; }
    .customer-row-actions { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; justify-items: stretch; }
    .customer-row-actions .btn { width: 100%; min-width: 0; padding: 7px 5px; white-space: nowrap; }
    .customer-row-actions.action-count-1 .btn { grid-column: 3; }
    .customer-row-actions.action-count-2 .btn:first-child { grid-column: 2; }
    .column-resizer { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: col-resize; user-select: none; touch-action: none; }
    .column-resizer::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 3px; width: 1px; background: transparent; }
    .column-resizer:hover::after, body.resizing-column .column-resizer::after { background: var(--brand); }
    body.resizing-column { cursor: col-resize; user-select: none; }
    .filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
    .compact-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
    .compact-filters .field { width: 168px; }
    .compact-filters .search-field { width: 260px; max-width: 100%; }
    .compact-filters .range-field { width: 136px; }
    .range-inputs { display: flex; align-items: center; gap: 7px; width: 100%; }
    .range-inputs input { min-width: 0; flex: 1 1 0; }
    .range-inputs .date-placeholder-wrap { flex: 1 1 0; }
    .range-inputs span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
    .date-placeholder-wrap { position: relative; display: block; min-width: 0; }
    .date-placeholder-wrap > input { width: 100%; cursor: pointer; }
    .date-placeholder-wrap > input[type="date"]::-webkit-calendar-picker-indicator,
    .date-placeholder-wrap > input[type="datetime-local"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
    .todo-date-input-wrap { position: relative; min-width: 0; }
    .todo-date-input-wrap > input { width: 100%; cursor: pointer; }
    .todo-date-input-wrap > input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
    .date-placeholder-wrap.is-empty > input { color: transparent; }
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-fields-wrapper,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-text,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-year-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-month-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-day-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-hour-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-minute-field { color: transparent; }
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-year-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-month-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-day-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-hour-field,
    .date-placeholder-wrap.is-empty > input::-webkit-datetime-edit-minute-field { background: transparent; }
    .date-placeholder { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; line-height: 1; pointer-events: none; white-space: nowrap; }
    .date-placeholder-wrap:not(.is-empty) .date-placeholder { display: none; }
    .compact-filters .field > label { display: none !important; }
    .compact-filters .btn { min-height: 38px; }
    .field { display: grid; gap: 5px; }
    .field label { color: var(--muted); font-size: 12px; }
    .plan-demand-picker { position: relative; width: 100%; min-width: 0; align-items: center; flex-wrap: nowrap; overflow: visible; cursor: pointer; }
    .plan-demand-picker .multi-value-tags { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; overflow: hidden; }
    .plan-demand-picker .multi-value-tag { min-width: 0; flex: 0 1 auto; }
    .plan-demand-picker .multi-value-tag > span:first-child { min-width: 0; }
    .plan-demand-overflow { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; height: 26px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); padding: 0 8px; font-size: 12px; line-height: 1; white-space: nowrap; }
    .plan-demand-picker .multi-value-picker { position: static; }
    .plan-demand-picker.has-values .multi-value-picker { flex: 0 0 22px; min-width: 22px; margin-left: auto; }
    .plan-demand-picker.has-values .multi-value-picker-trigger { min-height: 28px; justify-content: flex-end; padding: 5px 2px; }
    .plan-demand-picker .multi-value-picker-menu { left: 0; right: 0; width: auto; min-width: 0; max-width: none; overflow-x: hidden; }
    .plan-demand-picker .multi-value-option { min-width: 0; text-align: left; }
    .plan-demand-picker .multi-value-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
    .compact-multi-value-picker { position: relative; width: 100%; min-width: 0; align-items: center; flex-wrap: nowrap; overflow: visible; cursor: pointer; }
    .compact-multi-value-picker .multi-value-tags { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; overflow: hidden; }
    .compact-multi-value-picker .multi-value-tag { min-width: 0; flex: 0 1 auto; }
    .compact-multi-value-picker .multi-value-tag > span:first-child { min-width: 0; }
    .compact-multi-value-picker .multi-value-picker { position: static; }
    .compact-multi-value-picker.has-values .multi-value-picker { flex: 0 0 22px; min-width: 22px; margin-left: auto; }
    .compact-multi-value-picker.has-values .multi-value-picker-trigger { min-height: 28px; justify-content: flex-end; padding: 5px 2px; }
    .compact-multi-value-picker .multi-value-picker-menu { left: 0; right: 0; width: auto; min-width: 0; max-width: none; overflow-x: hidden; }
    .compact-multi-value-picker .multi-value-option { min-width: 0; text-align: left; }
    .compact-multi-value-picker .multi-value-option > span:first-child { min-width: 0; overflow-wrap: anywhere; }
    .required-mark { color: var(--red); margin-right: 2px; }
    .plan-generation-error { border: 1px solid #f0c3bd; border-radius: 8px; background: #fff8f6; color: #9f2f28; padding: 9px 11px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
    .field-hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
    .field-counter { color: var(--muted); font-size: 11px; text-align: right; line-height: 1.2; }
    .demand-remark-control { position: relative; }
    .demand-remark-control textarea { padding-right: 56px; padding-bottom: 25px; }
    .demand-remark-control .field-counter { position: absolute; right: 10px; bottom: 9px; min-height: 0; margin: 0; pointer-events: none; font-style: italic; font-weight: 400; }
    .demand-edit-form .demand-fixed-customer:disabled { opacity: 1; color: var(--text); -webkit-text-fill-color: var(--text); background: #fff; cursor: not-allowed; }
    .demand-edit-form .demand-customer-number:disabled { opacity: 1; color: #8b99aa; -webkit-text-fill-color: #8b99aa; background: #f2f4f7; }
    .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; outline: 0; padding: 8px 10px; }
    .field input.invalid { border-color: var(--red); background: var(--red-soft); }
    .field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
    select.is-placeholder { color: var(--muted) !important; font-weight: 400; }
    .field textarea { min-height: 94px; resize: vertical; }
    .wide-field { grid-column: 1 / -1; }
    .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .ai-question-editor-input-wrap { position: relative; }
    .ai-question-editor-input-wrap input { width: 100%; min-height: 40px; padding-right: 58px; }
    .ai-question-editor-input-wrap small { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; line-height: 1; pointer-events: none; }
    .advanced-date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
    .advanced-date-range span { color: var(--muted); text-align: center; }
    .advanced-date-range input { min-width: 0; width: 100%; }
    .multi-value-editor { min-height: 39px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 5px 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; cursor: text; }
    .multi-value-editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(44, 111, 182, .08); }
    .multi-value-editor[data-multi-value-editor="editTags"] { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; }
    .multi-value-editor[data-multi-value-editor="editTags"]::-webkit-scrollbar { display: none; }
    .multi-value-editor[data-multi-value-editor="editTags"] .multi-value-tags { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 5px; }
    .multi-value-editor[data-multi-value-editor="editTags"] .multi-value-tag { flex: 0 0 auto; }
    .multi-value-editor[data-multi-value-editor="editTags"] .multi-value-input { flex: 0 0 150px; min-width: 150px; }
    .multi-value-tags { display: contents; }
    .multi-value-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); padding: 5px 8px 5px 10px; font-size: 12px; line-height: 1.2; }
    .multi-value-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .multi-value-remove { width: 16px; height: 16px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; padding: 0; font-size: 14px; line-height: 1; }
    .multi-value-remove:hover { background: rgba(44, 111, 182, .12); color: var(--brand-dark); }
    .multi-value-input { flex: 1 1 120px; min-width: 100px; width: auto !important; border: 0 !important; box-shadow: none !important; padding: 5px 2px !important; }
    .multi-value-picker { position: relative; flex: 1 1 160px; min-width: 120px; }
    .multi-value-picker-trigger { width: 100%; min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; background: transparent; color: var(--text); padding: 5px 2px; text-align: left; }
    .multi-value-picker-trigger.is-placeholder { color: var(--muted); }
    .multi-value-picker-chevron { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
    .multi-value-picker.is-open .multi-value-picker-chevron { transform: rotate(225deg) translate(-1px, -1px); }
    .multi-value-picker-menu { position: absolute; left: -10px; right: -10px; top: calc(100% + 4px); z-index: 45; display: none; gap: 2px; max-height: 220px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 26px rgba(20,38,60,.16); }
    .multi-value-picker.is-open .multi-value-picker-menu { display: grid; }
    .multi-value-picker-menu.is-searchable { grid-template-rows: auto minmax(0, 1fr); gap: 5px; height: min(260px, 42vh); max-height: 220px; overflow: hidden; padding: 7px; }
    .multi-value-picker-search { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 0 9px; color: var(--text); }
    .multi-value-picker-options { min-height: 0; display: grid; align-content: start; gap: 2px; overflow-y: auto; }
    .multi-value-picker-empty { padding: 10px 8px; color: var(--muted); font-size: 12px; }
    .multi-value-option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 0; border-radius: 7px; background: #fff; color: var(--text); padding: 7px 8px; text-align: left; }
    .multi-value-option:hover, .multi-value-option.active { background: var(--brand-soft); color: var(--brand-dark); }
    .multi-value-option-check { color: var(--brand); font-weight: 700; }
    /* Keep the plan demand selector at normal input height. The generic
       multi-value editor wraps by default, which pushed the chevron onto a
       second line in the two-column plan drawer. */
    .multi-value-editor.plan-demand-picker { height: 39px; min-height: 39px; max-height: 39px; flex-wrap: nowrap; overflow: visible; cursor: pointer; }
    .plan-demand-picker .multi-value-tags { height: 28px; min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; overflow: hidden; }
    .plan-demand-picker .multi-value-tag { min-width: 0; max-width: 112px; flex: 1 1 auto; padding-top: 5px; padding-bottom: 5px; }
    .plan-demand-picker .plan-demand-overflow { height: 26px; }
    .plan-demand-picker.has-values .multi-value-picker { flex: 0 0 22px; min-width: 22px; }
    .plan-demand-picker.has-values .multi-value-picker-trigger { min-height: 28px; padding: 5px 2px; }
    .plan-demand-picker:not(.has-values) .multi-value-tags { display: none; }
    .plan-demand-picker:not(.has-values) .multi-value-picker { min-width: 0; flex: 1 1 100%; }
    .plan-demand-picker:not(.has-values) .multi-value-picker-trigger { justify-content: space-between; text-align: left; }
    .plan-demand-picker:not(.has-values) .multi-value-picker-trigger > span:first-child { flex: 1 1 auto; text-align: left; }
    .plan-demand-picker .multi-value-picker-menu { top: calc(100% + 4px); }
    .multi-value-editor.compact-multi-value-picker { height: 39px; min-height: 39px; max-height: 39px; flex-wrap: nowrap; overflow: visible; cursor: pointer; }
    .compact-multi-value-picker .multi-value-tags { height: 28px; min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; overflow: hidden; }
    .compact-multi-value-picker .multi-value-tag { min-width: 0; max-width: 112px; flex: 1 1 auto; padding-top: 5px; padding-bottom: 5px; }
    .compact-multi-value-picker .plan-demand-overflow { height: 26px; }
    .compact-multi-value-picker:not(.has-values) .multi-value-tags { display: none; }
    .compact-multi-value-picker:not(.has-values) .multi-value-picker { min-width: 0; flex: 1 1 100%; }
    .compact-multi-value-picker:not(.has-values) .multi-value-picker-trigger { justify-content: space-between; text-align: left; }
    .compact-multi-value-picker:not(.has-values) .multi-value-picker-trigger > span:first-child { flex: 1 1 auto; text-align: left; }
    .compact-multi-value-picker .multi-value-picker-menu { top: calc(100% + 4px); }
    .policy-product-picker-hint { margin-top: 5px; font-size: 12px; }
    .todo-editor-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(140px, .55fr) minmax(160px, .65fr); gap: 11px; }
    .todo-editor-grid .todo-content { grid-column: 1 / -1; }
    .followup-flow { display: grid; gap: 12px; }
    .followup-mode-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
    .followup-mode-switch > div:first-child { min-width: 0; }
    .followup-mode-switch strong { display: block; color: var(--brand-dark); font-size: 13px; }
    .followup-mode-switch .small { display: block; margin-top: 3px; }
    .followup-mode-options { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
    .followup-mode-options .btn { min-height: 30px; padding: 5px 10px; border-color: transparent; }
    .followup-mode-options .btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
    .followup-mode-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
    [hidden] { display: none !important; }
    .followup-input-grid.normal-mode { grid-template-columns: 1fr; }
    .followup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .step-pill { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 9px 10px; color: var(--muted); cursor: pointer; text-align: left; font: inherit; }
    .step-pill strong { display: block; color: var(--text); font-size: 13px; }
    .step-pill.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
    .import-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 12px; align-items: start; }
    .upload-zone { border: 1px dashed #b8c8db; border-radius: 12px; background: #fbfdff; padding: 14px; display: grid; gap: 10px; }
    .upload-zone input[type="file"] { background: #fff; }
    .followup-import-module { display: grid; gap: 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px; }
    .followup-import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .followup-import-head strong { display: block; color: var(--brand-dark); font-size: 15px; }
    .followup-import-head span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
    .followup-dropzone { min-height: 58px; display: grid; place-items: center; border: 1px dashed #b8c8db; border-radius: 8px; background: #fbfdff; color: #405165; text-align: center; padding: 9px 12px; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
    .followup-dropzone:hover, .followup-dropzone.dragging { border-color: var(--brand); background: #f3f8ff; }
    .followup-dropzone input { display: none; }
    .followup-dropzone strong { display: block; margin-bottom: 3px; font-size: 12px; color: var(--brand-dark); }
    .followup-dropzone span { color: var(--muted); font-size: 11px; line-height: 1.4; }
    .followup-input-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: stretch; }
    .followup-input-grid textarea { height: 86px; min-height: 86px; box-sizing: border-box; }
    .followup-content-input { position: relative; }
    .followup-content-input textarea { padding-right: 48px; }
    .followup-voice-icon { position: absolute; right: 9px; bottom: 9px; width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: #eef3f8; color: #64748b; cursor: pointer; transition: background .18s ease, color .18s ease; }
    .followup-voice-icon:hover, .followup-voice-icon.listening { background: #e0ecfb; color: var(--brand-dark); }
    .followup-voice-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .followup-file-list { max-height: 96px; overflow: auto; padding-right: 4px; }
    .followup-file-list .file-row { padding: 5px 7px; gap: 6px; min-height: 30px; background: #fbfdff; border-color: #e4edf7; }
    .followup-file-list .file-row strong { font-size: 11px; font-weight: 600; color: #405165; }
    .followup-file-list .progress-track, .followup-file-list .small { display: none; }
    .followup-attachment-module { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #edf2f7; }
    .followup-attachment-dropzone { min-height: 58px; display: grid; place-items: center; border: 1px dashed #c7d4e3; border-radius: 8px; background: #fcfdff; color: var(--muted); text-align: center; padding: 9px 12px; cursor: pointer; }
    .followup-attachment-dropzone:hover, .followup-attachment-dropzone.dragging { border-color: var(--brand); background: #f5f9ff; }
    .followup-attachment-dropzone input { display: none; }
    .followup-attachment-dropzone strong { display: block; margin-bottom: 3px; font-size: 12px; color: var(--brand-dark); }
    .followup-attachment-dropzone span { font-size: 11px; line-height: 1.5; }
    .followup-attachment-list { max-height: 96px; overflow: auto; padding-right: 4px; }
    .followup-attachment-list .file-row { padding: 5px 7px; gap: 6px; min-height: 30px; background: #fbfdff; border-color: #e4edf7; }
    .followup-attachment-list .file-row strong { font-size: 11px; font-weight: 600; color: #405165; }
    .followup-status-row { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; color: var(--muted); font-size: 12px; }
    .followup-status-row span { color: #405165; }
    .followup-detail-section { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 11px 12px; }
    .followup-detail-section > h3 { margin: 0 0 9px; color: var(--brand-dark); font-size: 14px; }
    .followup-detail-summary { margin: 0; color: #405165; line-height: 1.7; white-space: pre-wrap; }
    .followup-detail-evidence { display: grid; gap: 7px; }
    .followup-detail-evidence .file-row { background: var(--soft); padding: 7px 9px; }
    .followup-detail-links { display: grid; gap: 5px; margin: 0; padding-left: 18px; color: var(--brand-dark); }
    .followup-detail-links a { overflow-wrap: anywhere; }
    .followup-file-summary { border: 1px solid #cfe0f5; border-radius: 9px; background: #f7fbff; color: #405165; padding: 7px 9px; font-size: 12px; }
    .followup-detail-files { margin-top: 12px; }
    .followup-attachment-actions { display: inline-flex; align-items: center; gap: 6px; }
    .followup-attachment-preview { display: grid; place-items: center; min-height: 220px; padding: 8px; border-radius: 9px; background: #f7f9fc; }
    .followup-attachment-preview img { display: block; max-width: 100%; max-height: min(68vh, 620px); object-fit: contain; }
    .followup-attachment-preview iframe { width: 100%; height: min(68vh, 620px); border: 0; background: #fff; }
    .followup-attachment-preview audio, .followup-attachment-preview video { width: 100%; max-height: min(68vh, 620px); }
    .followup-attachment-text { max-height: 55vh; overflow: auto; margin: 0; padding: 12px; border-radius: 8px; background: #f7f9fc; color: var(--text); white-space: pre-wrap; line-height: 1.7; }
    .followup-recognition-summary { margin-bottom: 12px; border: 1px solid #cfe0f5; border-radius: 10px; background: #f8fbff; padding: 11px 13px; }
    .followup-recognition-summary p { margin: 0; color: #405165; line-height: 1.7; }
    .followup-recognition-summary strong { color: var(--brand-dark); white-space: nowrap; }
    .followup-confirm-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
    .followup-confirm-actions .btn { padding: 5px 8px; min-height: 28px; }
    .file-list { display: grid; gap: 8px; }
    .file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 9px 10px; }
    .file-row strong, .evidence-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .followup-file-title { max-width: 340px; font-size: 11px; line-height: 1.3; }
    .icon-delete { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #c2413b; cursor: pointer; padding: 0; }
    .icon-delete:hover { background: #fff1f0; }
    .icon-delete svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .progress-list { display: grid; gap: 9px; }
    .progress-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 62px; border-bottom: 1px solid var(--line); padding: 10px 0; color: #87949c; }
    .progress-row:last-child { border-bottom: 0; padding-bottom: 0; }
    .progress-row strong { color: #3d505c; display: block; }
    .progress-row small { display: block; margin-top: 3px; font-size: 12px; }
    .progress-row em { font-size: 12px; font-style: normal; }
    .progress-row.done em { color: #32846a; }
    .progress-row.active em { color: #2f82c8; }
    .progress-row.failed em { color: #c45656; }
    .evidence-grid { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.48fr); gap: 16px; align-items: start; }
    .evidence-grid > div { min-width: 0; }
    .evidence-list { display: grid; gap: 8px; }
    .evidence-item { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 10px; }
    .extract-table input, .extract-table select, .extract-table textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 7px 8px; }
    .extract-table textarea { min-height: 54px; resize: vertical; }
    .extract-table { width: 100%; table-layout: fixed; min-width: 0; }
    .extract-table th, .extract-table td { min-width: 0; overflow-wrap: anywhere; word-break: break-word; vertical-align: top; padding: 9px 7px; }
    .extract-table th { white-space: normal; }
    .extract-table th:nth-child(1), .extract-table td:nth-child(1) { width: 20%; }
    .extract-table th:nth-child(2), .extract-table td:nth-child(2) { width: 23%; }
    .extract-table th:nth-child(3), .extract-table td:nth-child(3) { width: 12%; }
    .extract-table th:nth-child(4), .extract-table td:nth-child(4) { width: 15%; }
    .extract-table th:nth-child(5), .extract-table td:nth-child(5) { width: 30%; }
    .extract-table td .form-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1fr) !important; gap: 6px !important; }
    .followup-flow, .followup-flow .panel, .followup-flow .evidence-grid, .followup-flow .confirm-section, .followup-flow .confirmation-sections { min-width: 0; max-width: 100%; }
    .followup-flow .table-wrap { min-width: 0; max-width: 100%; overflow-x: hidden; overflow-y: visible; }
    .extract-table tbody tr:last-child th, .extract-table tbody tr:last-child td { border-bottom: 0; }
    .confirm-cell { min-width: 0; vertical-align: top; }
    .confirm-cell-content { display: grid; min-width: 0; gap: 6px; justify-items: start; align-content: start; }
    .confirm-cell .tag { min-height: 24px; box-sizing: border-box; }
    .confirm-cell .btn { min-height: 30px; padding: 5px 9px; white-space: nowrap; }
    .confirmation-sections { display: grid; gap: 12px; }
    .confirm-section { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
    .confirm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .confirm-section-head h3 { margin: 0; font-size: 15px; color: var(--brand-dark); }
    .confirm-section-head span { color: var(--muted); font-size: 12px; }
    .tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
    .tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; color: var(--muted); }
    .tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }
    .split-app { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
    .side-detail { position: sticky; top: 0; max-height: calc(100vh - 122px); overflow: auto; }
    .empty { border: 1px dashed #cbd8e8; border-radius: 12px; padding: 18px; color: var(--muted); background: #fbfdff; text-align: center; }
    .knowledge-product-loading { min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed #cbd8e8; border-radius: 12px; background: #fbfdff; color: var(--muted); }
    .knowledge-product-loading strong { color: var(--text); }
    .knowledge-product-loading.compact { min-height: 96px; }
    .drawer-backdrop { position: fixed; inset: 0; background: rgba(12, 28, 45, .22); display: none; z-index: 50; }
    .drawer-backdrop.active { display: block; }
    .drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 88vw); display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--surface); box-shadow: -16px 0 36px rgba(20, 38, 60, .22); padding: 18px; overflow: hidden; }
    .drawer.drawer-form { width: min(860px, 92vw); }
    .drawer.drawer-wide { width: min(980px, 94vw); }
    .drawer.followup-drawer { width: min(900px, 90vw); }
    .drawer .form-grid, .drawer .table-wrap, .drawer table { min-width: 0; max-width: 100%; }
    .drawer table { table-layout: fixed; }
    .modal-backdrop { position: fixed; inset: 0; background: rgba(12, 28, 45, .28); display: none; place-items: center; z-index: 60; padding: 20px; }
    .modal-backdrop.active { display: grid; }
    .global-alert-backdrop { position:fixed; inset:0; z-index:90; display:grid; place-items:center; padding:20px; background:rgba(12,28,45,.38); }
    .global-alert-backdrop[hidden] { display:none; }
    .global-alert-dialog { width:min(580px,100%); max-height:min(760px,calc(100dvh - 40px)); display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; border:1px solid #d8e3f0; border-radius:8px; background:#fff; box-shadow:0 22px 60px rgba(20,38,60,.3); }
    .global-alert-head { display:flex; align-items:center; gap:12px; padding:16px 18px; border-bottom:1px solid var(--line); }
    .global-alert-head > div { flex:1; min-width:0; }
    .global-alert-head h2 { margin:0; color:var(--brand-dark); font-size:17px; }
    .global-alert-head p { margin:4px 0 0; color:var(--muted); font-size:12px; }
    .global-alert-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:8px; background:#edf5ff; color:var(--brand); font-weight:800; }
    .global-alert-body { min-height:0; overflow:auto; padding:16px 18px; }
    .global-alert-row { display:grid; grid-template-columns:130px minmax(0,1fr); gap:12px; padding:10px 11px; border:1px solid #d9e4f2; border-bottom:0; color:var(--brand-dark); font-size:13px; }
    .global-alert-row:first-child { border-radius:6px 6px 0 0; }
    .global-alert-row:last-child { border-bottom:1px solid #d9e4f2; border-radius:0 0 6px 6px; }
    .global-alert-row span { color:var(--muted); }
    .global-alert-row strong { min-width:0; overflow-wrap:anywhere; font-weight:500; }
    .global-alert-actions { display:flex; justify-content:flex-end; gap:8px; padding:12px 18px; border-top:1px solid var(--line); }
    @media (max-width:600px) { .global-alert-backdrop { padding:12px; }.global-alert-dialog { max-height:calc(100dvh - 24px); }.global-alert-head,.global-alert-body,.global-alert-actions { padding-left:14px; padding-right:14px; }.global-alert-row { grid-template-columns:100px minmax(0,1fr); gap:8px; } }
    .modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(20, 38, 60, .28); padding: 18px; }
    .modal.demand-team-modal { width: min(900px, 100%); }
    .demand-team-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
    .demand-team-toolbar .actions { gap: 8px; flex-wrap: wrap; }
    .demand-team-user-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
    .demand-team-user-option { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border-radius: 4px; cursor: pointer; }
    .demand-team-user-option:hover { background: #f4f7fb; }
    .demand-team-user-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .demand-team-user-option small { margin-left: auto; color: var(--muted); }
    .demand-team-form-grid .demand-team-expiry-date { display: none; }
    .demand-team-form-grid.has-team-expiry .demand-team-expiry-date { display: grid; }
    .demand-team-expiry-date > label { white-space: nowrap; }
    .modal.batch-followup-box { width: min(860px, 100%); height: min(760px, calc(100vh - 40px)); max-height: calc(100vh - 40px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); box-sizing: border-box; }
    .modal.batch-followup-box #modalContent { min-height: 0; overflow: hidden; }
    .modal.large { width: min(1080px, 100%); }
    .plan-detail-loading { min-height: 260px; display:flex; align-items:center; justify-content:center; gap:10px; color:var(--muted); }
    .customer-picker-trigger { display:flex; gap:8px; }
    .customer-picker-trigger input { flex:1; min-width:0; }
    .demand-customer-picker .customer-picker-search { display:flex; gap:8px; margin-bottom:12px; }
    .demand-customer-picker .customer-picker-search input { flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
    .demand-customer-picker .table-wrap { max-height:min(52vh, 520px); overflow:auto; border:1px solid var(--line); border-radius:8px; }
    .demand-customer-picker table { width:100%; }
    .customer-picker-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
    .customer-picker-pager .actions { gap:6px; flex-wrap:wrap; }
    .customer-picker-pager select { min-height:34px; border:1px solid var(--line); border-radius:8px; background:#fff; padding:0 8px; }
    .personnel-picker-source { display:none !important; }
    .personnel-picker { position:relative; min-width:0; }
    .personnel-picker.is-open { z-index:75; }
    .personnel-picker-trigger { width:100%; min-height:38px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--muted); padding:8px 10px; text-align:left; cursor:pointer; }
    .personnel-picker-trigger::after { content:""; width:7px; height:7px; flex:0 0 auto; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg) translateY(-2px); }
    .personnel-picker-trigger.has-value { color:var(--text); }
    .personnel-picker-trigger:disabled { background:var(--soft); cursor:not-allowed; }
    .personnel-picker-panel { position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:76; display:none; gap:8px; max-height:calc(100vh - 24px); overflow:auto; margin-top:0; padding:10px; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:0 12px 28px rgba(20,38,60,.12); }
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-panel { position:fixed; display:none; flex-direction:column; overflow:hidden; }
    .personnel-picker[data-viewport-bound="true"].is-open .personnel-picker-panel { display:flex; }
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-title,
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-tabs,
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-search-wrap,
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-history,
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-footer { flex:0 0 auto; }
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-options { flex:1 1 auto; min-height:0; max-height:none; }
    .personnel-picker[data-viewport-bound="true"] .personnel-picker-footer { position:sticky; bottom:0; flex:0 0 auto; background:#fff; }
    .personnel-picker.opens-up .personnel-picker-panel { top:auto; bottom:calc(100% + 8px); }
    .personnel-picker.is-open .personnel-picker-panel { display:grid; }
    .personnel-picker-panel[hidden] { display:none !important; }
    .personnel-picker-title { color:var(--text); font-size:13px; font-weight:600; }
    .personnel-picker-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-bottom:1px solid var(--line); }
    .personnel-picker-tabs button { min-height:34px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--muted); }
    .personnel-picker-tabs button.active { border-bottom-color:var(--brand); color:var(--brand); font-weight:700; }
    .personnel-picker-search-wrap { position:relative; display:flex; align-items:center; min-height:38px; border:1px solid var(--line); border-radius:8px; background:#fff; padding:0 10px; }
    .personnel-picker-search-wrap input { width:100%; min-width:0; border:0; outline:0; padding:0 0 0 8px; }
    .field .personnel-picker-search-wrap input { width:100%; min-width:0; border:0; border-radius:0; background:transparent; outline:0; padding:0 0 0 8px; }
    .personnel-picker-search-icon { position:relative; width:13px; height:13px; flex:0 0 auto; border:1.5px solid #9aa8b8; border-radius:50%; }
    .personnel-picker-search-icon::after { content:""; position:absolute; width:5px; height:1.5px; right:-4px; bottom:-2px; transform:rotate(45deg); background:#9aa8b8; }
    .personnel-picker-history { display:grid; gap:5px; }
    .personnel-picker-section-title { color:var(--muted); font-size:12px; }
    .personnel-picker-history-list { display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; }
    .personnel-picker-history-item { max-width:150px; flex:0 0 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:0; border-radius:999px; background:#f3f5f7; color:#748092; padding:5px 10px; cursor:pointer; font-size:12px; }
    .personnel-picker-history-empty { color:#a0aab6; font-size:12px; }
    .personnel-picker-options { display:grid; max-height:190px; overflow:auto; padding:2px; }
    .personnel-picker-option { display:flex; align-items:center; gap:8px; min-width:0; min-height:34px; border-radius:6px; padding:5px 7px; color:var(--text); cursor:pointer; }
    .personnel-picker-option:hover { background:var(--brand-soft); }
    .personnel-picker-option input { width:15px; height:15px; flex:0 0 auto; margin:0; accent-color:var(--brand); }
    .field .personnel-picker-option input { width:15px; min-width:15px; height:15px; flex:0 0 15px; margin:0; border:0; border-radius:50%; background:transparent; outline:0; padding:0; }
    .personnel-picker-option span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .personnel-picker-option[hidden] { display:none !important; }
    .personnel-picker-empty { padding:12px 8px; color:var(--muted); font-size:12px; text-align:center; }
    .personnel-picker-remote-status { min-height:30px; padding:8px; color:var(--muted); font-size:12px; text-align:center; }
    .personnel-picker.is-loading .personnel-picker-remote-status { opacity:.75; }
    .personnel-picker-footer { display:flex; align-items:center; gap:9px; padding-top:8px; border-top:1px solid var(--line); }
    .personnel-picker-footer-spacer { flex:1; }
    .personnel-picker-count { color:var(--muted); font-size:12px; white-space:nowrap; }
    .personnel-picker-count [data-personnel-selected-count] { color:var(--brand); font-weight:700; }
    .personnel-picker-select-all { border:0; background:transparent; color:var(--brand); padding:4px 2px; cursor:pointer; font-size:12px; }
    .personnel-picker-history-item:hover, .personnel-picker-select-all:hover { color:var(--brand-dark); }
    .assign-expiry-input-wrap { position:relative; }
    .assign-expiry-input-wrap input[type="datetime-local"] { width:100%; cursor:pointer; }
    .assign-expiry-input-wrap input[type="datetime-local"]::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:auto; height:auto; opacity:0; cursor:pointer; }
    .modal.followup-detail-modal { width: min(680px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); max-height: calc(100vh - 32px); padding: 16px; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); box-sizing: border-box; }
    .followup-detail-modal .modal-head { margin-bottom: 10px; }
    .followup-detail-modal #modalContent { min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
    .followup-detail-modal #modalContent > .form-actions { position: sticky; bottom: 0; z-index: 2; margin: 12px -2px -1px; padding: 10px 2px 1px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 12px); }
    .followup-detail-modal .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .followup-detail-modal .info-card { min-height: 0; padding: 7px 9px; }
    .followup-detail-modal .info-card strong { font-size: 13px; line-height: 1.4; }
    .followup-detail-modal .followup-detail-section { margin-top: 8px; padding: 9px 10px; }
    .followup-detail-modal .followup-detail-section > h3 { margin-bottom: 6px; font-size: 13px; }
    .followup-detail-modal .followup-detail-summary { line-height: 1.55; }
    #planPreviewPage.route.active { display:block; min-height:100%; overflow:visible; }
    .plan-preview-page-content { min-height:100%; display:grid; grid-template-rows:auto auto auto auto; gap:12px; }
    .plan-preview-page-nav { display:flex; justify-content:flex-end; align-items:center; min-height:38px; }
    .plan-preview-page-loading { min-height:420px; display:flex; align-items:center; justify-content:center; gap:10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); }
    .plan-preview-page-loading.is-error { flex-direction:column; }
    .plan-preview-page-summary { position:sticky; top:-18px; z-index:14; display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 16px; border-radius:8px; box-shadow:none; }
    .plan-preview-page-title { min-width:0; }
    .plan-preview-page-title h2 { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:18px; }
    .plan-preview-page-title p { display:flex; gap:16px; margin:4px 0 0; color:var(--muted); font-size:12px; }
    .plan-preview-page-summary .proposal-preview-toolbar { position:static; flex:0 0 auto; margin:0; padding:0; background:transparent; }
    .plan-preview-page-content > .plan-prompt-adjustment { margin:0; border-radius:8px; }
    .plan-preview-page-document { min-height:70dvh; overflow:visible; background:#e9eef4; }
    .plan-preview-page-document > .proposal-template-preview { height:auto; min-height:70dvh; max-height:none; overflow:visible; border:0; border-radius:0; }
    .plan-preview-page-document .crm-agent-embed-preview.is-loading { min-height:70dvh; }
    .plan-preview-page-document .proposal-preview-to-top { position:fixed; right:18px; bottom:18px; margin:0; z-index:16; }
    .modal-head, .drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
    .modal-head p:empty, .drawer-head p:empty { display: none; }
    .drawer-head { min-height: 58px; margin-bottom: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
    #drawerContent { min-height: 0; overflow-y: auto; overflow-x: hidden; padding-top: 14px; }
    .modal-head h2, .drawer-head h2 { margin: 0; font-size: 18px; }
    .overlay-close { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; }
    .overlay-close:hover { background: var(--soft); color: var(--text); }
    .toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #172b3f; color: #fff; padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow); display: none; z-index: 80; }
    .toast.show { display: block; }
    .toast.followup-validation-toast { left: var(--followup-toast-left, 50%); top: var(--followup-toast-top, 50%); bottom: auto; transform: translate(-50%, -50%); }
    .success-feedback { display: grid; justify-items: center; gap: 12px; padding: 12px 10px 6px; text-align: center; }
    .success-feedback-icon { width: 62px; height: 62px; display: grid; place-items: center; border: 8px solid #f1fbf6; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 32px; font-weight: 700; box-shadow: 0 8px 18px rgba(19,130,90,.14); }
    .success-feedback h3 { margin: 0; font-size: 20px; color: var(--text); }
    .success-feedback p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.7; }
    .success-feedback-detail { width: min(100%, 520px); border: 1px solid #cfe9dc; border-radius: 12px; background: #f6fcf8; padding: 13px 15px; text-align: left; }
    .success-feedback-detail strong { display: block; margin-bottom: 5px; color: var(--green); }
    .success-feedback-detail .small { display: block; line-height: 1.7; }
    .success-feedback .form-actions { width: min(100%, 520px); }
    .timeline { position: relative; display: grid; gap: 12px; padding-left: 18px; }
    .timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: #cfe0f5; }
    .step { position: relative; padding-left: 10px; }
    .step::before { content: ""; position: absolute; left: -17px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
    .step strong { display: block; }
    .step p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
    .flow-img { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
    .login-screen { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: clamp(26px, 4vw, 58px); align-items: center; width: 100%; max-width: 1080px; min-height: min(720px, calc(100vh - 56px)); margin: 0 auto; padding: 18px; border: 1px solid rgba(115,151,190,.28); border-radius: 18px; background: #071625; box-shadow: 0 24px 70px rgba(17,42,68,.22); overflow: hidden; }
    .login-screen::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(47,111,237,.22), transparent 36%), linear-gradient(18deg, transparent 48%, rgba(11,142,168,.18) 49%, transparent 53%), linear-gradient(154deg, transparent 64%, rgba(116,161,232,.2) 65%, transparent 78%); pointer-events: none; }
    .login-screen::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.18)); pointer-events: none; }
    .login-screen > .hero, .login-form-panel { position: relative; z-index: 1; }
    .login-screen > .hero { min-width: 0; padding: 14px 0 14px 6px; color: #fff; }
    .login-brand { display: flex; align-items: center; gap: 11px; color: #fff; }
    .login-brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(147,193,255,.45); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 15px; font-weight: 700; box-shadow: inset 0 0 18px rgba(108,172,255,.24); }
    .login-brand-name { font-size: 14px; font-weight: 600; }
    .login-brand-caption { display: block; margin-top: 1px; color: rgba(226,238,255,.68); font-size: 11px; font-weight: 400; }
    .login-intro { margin: 28px 0 22px; max-width: 620px; }
    .login-intro h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.16; font-weight: 650; }
    .login-intro p { max-width: 540px; margin: 0; color: rgba(226,238,255,.75); font-size: 14px; line-height: 1.8; }
    .login-pioneer-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 13px; padding: 7px 11px; border: 1px solid rgba(147,193,255,.35); border-radius: 999px; background: rgba(6,31,54,.58); color: #dbeeff; font-size: 12px; }
    .login-pioneer-badge::before { content: ""; width: 26px; height: 1px; background: #68d8ff; box-shadow: 0 0 10px #68d8ff; }
    .agent-preview { position: relative; min-height: 310px; overflow: hidden; border: 1px solid rgba(145,188,232,.28); border-radius: 16px; background: rgba(6,22,38,.54); box-shadow: inset 0 0 38px rgba(56,129,209,.18), 0 18px 42px rgba(2,12,24,.26); backdrop-filter: blur(10px); }
    .agent-preview::before { content: ""; position: absolute; left: 8%; right: 6%; top: 38%; height: 1px; background: linear-gradient(90deg, transparent, rgba(99,206,255,.82), rgba(255,255,255,.28), transparent); transform: rotate(-9deg); }
    .agent-preview::after { content: ""; position: absolute; left: 12%; right: 13%; bottom: 27%; height: 1px; background: linear-gradient(90deg, transparent, rgba(105,255,214,.68), transparent); transform: rotate(7deg); }
    .agent-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: rgba(238,246,255,.9); }
    .agent-preview-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
    .agent-preview-spark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(104,216,255,.12); color: #8de4ff; box-shadow: inset 0 0 18px rgba(104,216,255,.14); }
    .agent-preview-spark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .agent-preview-state { display: inline-flex; align-items: center; gap: 6px; color: rgba(226,238,255,.68); font-size: 11px; white-space: nowrap; }
    .agent-preview-state::before { width: 6px; height: 6px; border-radius: 50%; background: #5df0c5; box-shadow: 0 0 12px #5df0c5; content: ""; }
    .agent-preview-body { position: relative; min-height: 236px; }
    .agent-core { position: absolute; left: 50%; top: 50%; width: 178px; height: 158px; transform: translate(-50%, -50%); border: 1px solid rgba(117,202,255,.38); clip-path: polygon(16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%, 0 50%); background: linear-gradient(135deg, rgba(73,155,244,.38), rgba(11,31,56,.24) 48%, rgba(88,255,217,.1)); box-shadow: 0 0 44px rgba(83,171,255,.28), inset 0 0 22px rgba(117,202,255,.22); }
    .agent-core::before, .agent-core::after { content: ""; position: absolute; inset: 20px; border: 1px dashed rgba(159,220,255,.38); clip-path: polygon(16% 0, 84% 0, 100% 50%, 84% 100%, 16% 100%, 0 50%); }
    .agent-core::after { inset: 46px; border-style: solid; border-color: rgba(99,255,214,.36); }
    .agent-core-label { position: absolute; inset: 0; display: grid; place-items: center; color: #eef8ff; font-size: 13px; font-weight: 650; text-align: center; }
    .agent-chip { position: absolute; width: min(46%, 220px); padding: 10px 12px; border: 1px solid rgba(145,188,232,.26); border-radius: 10px; background: rgba(5,18,32,.64); color: rgba(233,244,255,.88); box-shadow: 0 12px 24px rgba(0,0,0,.16); }
    .agent-chip span { display: block; margin-bottom: 4px; color: rgba(140,226,255,.88); font-size: 10px; }
    .agent-chip strong { display: block; font-size: 13px; font-weight: 600; }
    .agent-chip small { display: block; margin-top: 3px; color: rgba(226,238,255,.62); font-size: 10px; line-height: 1.5; }
    .agent-chip.customer { left: 18px; top: 15px; }
    .agent-chip.signal { right: 18px; top: 58px; }
    .agent-chip.action { left: 58px; bottom: 22px; }
    .agent-chip.outcome { right: 30px; bottom: 16px; }
    .agent-preview-foot { display: flex; align-items: center; gap: 8px; padding: 0 15px 14px; color: rgba(226,238,255,.62); font-size: 11px; }
    .agent-preview-foot svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: #5df0c5; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .login-form-panel { width: 100%; padding: 26px; border-color: rgba(255,255,255,.5); border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 20px 50px rgba(2,12,24,.26); backdrop-filter: blur(12px); }
    .login-form-panel h2 { margin: 0 0 5px; font-size: 19px; font-weight: 600; }
    .login-form-caption { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
    .login-form-panel .form-grid { gap: 13px; }
    .login-form-panel .field label { font-size: 12px; }
    .login-form-panel .field input { min-height: 42px; }
    .login-submit { width: 100%; min-height: 42px; margin-top: 2px; }
    .login-security-note { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: #7b8998; font-size: 11px; }
    .login-security-note svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .crm-auth-gate { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 24px; background: #eef4f8; }
    .crm-auth-gate[hidden] { display: none; }
    .crm-auth-checking { display: none; align-items: center; gap: 10px; padding: 16px 20px; border: 1px solid #d8e3ee; border-radius: 12px; background: rgba(255,255,255,.96); color: #5c7087; font-size: 13px; box-shadow: 0 12px 30px rgba(24,48,80,.1); }
    .crm-auth-gate.is-checking .crm-auth-checking { display: inline-flex; }
    .crm-auth-gate.is-checking .crm-auth-gate-card { display: none; }
    .crm-auth-checking::before { width: 10px; height: 10px; content: ""; border: 2px solid #cbd9e8; border-top-color: #2e6de7; border-radius: 50%; animation: crmAuthCheckingSpin .8s linear infinite; }
    @keyframes crmAuthCheckingSpin { to { transform: rotate(360deg); } }
    .crm-auth-gate-card { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(372px, .8fr); align-items: center; gap: clamp(34px, 6vw, 84px); width: min(1080px, 100%); height: min(720px, calc(100vh - 48px)); min-height: 540px; padding: 40px 18px 40px 24px; border: 1px solid #243c58; border-radius: 18px; background: #041426; box-shadow: 0 26px 64px rgba(19, 39, 59, .2); text-align: left; }
    .crm-auth-gate-card::before { position: absolute; z-index: -1; inset: 0; content: ""; background-image: linear-gradient(rgba(125, 158, 190, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 158, 190, .075) 1px, transparent 1px), linear-gradient(155deg, transparent 0 64%, rgba(37, 66, 101, .52) 64.2%, rgba(12, 31, 53, .45) 100%), linear-gradient(20deg, transparent 0 55%, rgba(0, 183, 218, .1) 55.5%, transparent 76%); background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%; }
    .crm-auth-gate-card::after { position: absolute; z-index: -1; inset: 0; content: ""; pointer-events: none; background: radial-gradient(ellipse at 4% 35%, rgba(36, 95, 181, .26), transparent 42%), linear-gradient(160deg, transparent 73%, rgba(20, 48, 80, .35)); }
    .crm-auth-gate-intro { min-width: 0; padding: 0 0 0 0; color: #fff; }
    .crm-auth-gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
    .crm-auth-gate-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid #4775a7; border-radius: 11px; background: linear-gradient(145deg, #214d7b, #122a49); color: #fff; font-weight: 700; box-shadow: inset 0 1px rgba(255,255,255,.12); }
    .crm-auth-gate-brand-copy strong, .crm-auth-gate-brand-copy span { display: block; }
    .crm-auth-gate-brand-copy strong { font-size: 13px; letter-spacing: .2px; }
    .crm-auth-gate-brand-copy span { margin-top: 2px; color: #afc3d8; font-size: 11px; }
    .crm-auth-gate-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 12px; padding: 7px 12px; border: 1px solid #315378; border-radius: 999px; color: #d9e8f7; font-size: 12px; }
    .crm-auth-gate-eyebrow::before { width: 17px; height: 1px; content: ""; background: #11c5ef; box-shadow: 0 0 8px #11c5ef; }
    .crm-auth-gate-intro h1 { margin: 0 0 10px; color: #fff; font-size: clamp(34px, 4vw, 48px); font-weight: 750; line-height: 1.2; letter-spacing: .02em; }
    .crm-auth-gate-intro p { max-width: 460px; margin: 0; color: #c0cfde; font-size: 13px; line-height: 1.9; }
    .crm-auth-gate-login { width: 100%; min-height: 382px; padding: 26px; border: 1px solid #fff; border-radius: 14px; background: #f0f1f2; color: #162a40; box-shadow: 0 10px 28px rgba(0,0,0,.12); }
    .crm-auth-gate-login h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.4; }
    .crm-auth-gate-login .form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; }
    .crm-auth-gate-login .field { gap: 5px; }
    .crm-auth-gate-login .field label { color: #64758a; font-size: 12px; }
    .crm-auth-gate-login .field input { min-height: 42px; padding: 9px 11px; border: 1px solid #d0dceb; border-radius: 9px; background: #fff; color: #182b40; }
    .crm-auth-remember { display: flex; align-items: center; gap: 8px; margin: 1px 0 0; padding: 7px 2px 12px; border-bottom: 1px solid #d9e1e9; color: #42566b; font-size: 12px; cursor: pointer; }
    .crm-auth-remember input { width: 15px; height: 15px; margin: 0; accent-color: #2870e9; }
    .crm-auth-gate-login .btn.primary { width: 100%; min-height: 42px; margin-top: 2px; border-radius: 9px; background: #2e6de7; font-size: 13px; }
    .crm-auth-gate-status { min-height: 18px; margin: 8px 0 0 !important; color: #a44b43 !important; font-size: 11px; line-height: 1.5 !important; }

    .scope-note { background: #fffaf0; border: 1px solid #f0d8a8; color: #704b00; border-radius: 10px; padding: 11px; }
    .chart-title-with-help { display: flex; align-items: center; gap: 6px; }
    .chart-help { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
    .chart-help-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; border: 1px solid #aec2d8; border-radius: 50%; background: #f4f8fc; color: #5b7693; font-size: 12px; font-weight: 800; cursor: pointer; outline: 0; }
    .chart-help-tooltip { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; display: none; width: min(360px, calc(100vw - 64px)); padding: 10px 11px; border: 1px solid #c8d8ea; border-radius: 9px; background: #172b3f; color: #fff; box-shadow: 0 10px 24px rgba(20,38,60,.2); font-size: 12px; line-height: 1.6; }
    .chart-help:hover .chart-help-tooltip, .chart-help:focus .chart-help-tooltip, .chart-help:focus-within .chart-help-tooltip { display: block; }
    .mini-tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; color: var(--muted); }
    .mini-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
    .detail-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 12px; align-items: start; }
    .detail-stack { display: grid; gap: 12px; }
    .customer-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
    .customer-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .customer-detail-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
    .customer-detail-tags { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
    .customer-detail-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border: 1px solid #d8e5f2; border-radius: 6px; background: #f7fbff; color: #526b83; font-size: 12px; line-height: 1.35; white-space: nowrap; }
    .customer-detail-tag.gender { width: 24px; justify-content: center; padding: 2px 0; border-color: #c8dcf1; background: #eef6ff; color: #2f6fae; font-size: 17px; font-weight: 800; text-shadow: .35px 0 currentColor; }
    .customer-detail-tag.customer-status { border-color: #d6e1ee; background: #f4f8fc; color: #526b83; }
    .customer-detail-tag.status { border-color: #ead9b6; background: #fffaf0; color: #896a2d; }
    .customer-detail-tag.asset { border-color: #d7d9f0; background: #f7f7ff; color: #5e6394; }
    .customer-detail-tag.investable { border-color: #cfe9dc; background: #f3fbf6; color: #3f785c; }
    .info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .compact-info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 10px; }
    .customer-basic-info-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 8px; }
    .customer-contact-card { margin-bottom: 8px; padding: 9px 10px; border: 1px solid #d8e5f2; border-radius: 9px; background: #f8fbff; }
    .customer-contact-card > strong { display: block; margin-bottom: 7px; color: var(--brand-dark); font-size: 13px; }
    .customer-contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 14px; }
    .customer-contact-item, .customer-fact { min-width: 0; }
    .customer-contact-item span, .customer-fact span { display: block; color: var(--muted); font-size: 11px; }
    .customer-contact-item strong, .customer-fact strong { display: block; margin-top: 2px; color: var(--text); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
    .customer-facts-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 16px; padding: 2px 0; }
    .customer-fact { padding: 4px 0 7px; border-bottom: 1px solid #edf1f5; }
    .customer-fact strong { font-weight: 600; }
    .customer-overview-main .customer-facts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .customer-basic-groups { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
    .customer-basic-group { min-width:0; padding:12px; border:1px solid #dbe5ef; border-radius:8px; background:#fff; }
    .customer-basic-group.wide { grid-column:1 / -1; }
    .customer-basic-group-head { display:flex; align-items:center; gap:7px; margin-bottom:7px; color:var(--brand-dark); font-size:13px; font-weight:700; }
    .customer-basic-group-head::before { content:""; width:3px; height:14px; flex:0 0 auto; border-radius:2px; background:#8fb7df; }
    .customer-facts-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:0 18px; padding:0; }
    .customer-facts-grid.four-columns { grid-template-columns:repeat(4, minmax(0, 1fr)); }
    .customer-fact { min-width:0; padding:7px 0 9px; border-bottom:1px solid #edf1f5; }
    .customer-fact-wide { grid-column:1 / -1; }
    .customer-demand-overview { grid-column:1 / -1; }
    .customer-detail-demand-table { min-width:940px; }
    .customer-detail-demand-table th, .customer-detail-demand-table td { white-space:nowrap; }
    .customer-detail-demand-table tr.is-current td { background:#e8f1ff; }
    .customer-detail-demand-table tr.is-current td:first-child { box-shadow:inset 3px 0 #3678ef; }
    .customer-demand-detail { margin-top:0; padding:12px 0 0; border-top:1px solid var(--line); }
    .customer-demand-detail h4 { margin:0 0 6px; color:var(--text); font-size:14px; }
    .customer-remark-link { color: #356fc4; text-decoration: underline; text-underline-offset: 2px; }
    .customer-detail-tabs { gap: 4px; }
    .customer-detail-tabs .tab { min-width: 88px; padding: 8px 14px; }
    .detail-info-block { display: grid; gap: 9px; padding: 12px 14px; border: 1px solid #e1e8f0; border-radius: 9px; background: #fff; }
    .detail-info-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
    .detail-info-block-head h4 { margin: 0; color: var(--brand-dark); font-size: 14px; }
    .detail-info-block-head span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .customer-detail-field-grid { display: grid; gap: 9px 16px; }
    .customer-detail-field-grid.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .customer-detail-field-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .customer-detail-field { min-width: 0; padding: 3px 0 6px; border-bottom: 1px solid #edf1f5; }
    .customer-detail-field span { display: block; color: var(--muted); font-size: 11px; }
    .customer-detail-field strong { display: block; margin-top: 3px; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
    .detail-tab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
    .detail-tab-toolbar h3 { margin: 0; color: var(--brand-dark); font-size: 15px; }
    .detail-tab-toolbar span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
    .detail-record-table { overflow-x: auto; }
    .detail-record-table table { min-width: 720px; }
    .info-card { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 10px; }
    .compact-info-grid .info-card { min-width: 0; min-height: 52px; padding: 8px 9px; border-radius: 8px; }
    .customer-basic-info-grid .info-card { min-width: 0; min-height: 48px; padding: 7px 8px; border-radius: 8px; }
    .customer-basic-info-grid .info-card span { font-size: 11px; }
    .customer-basic-info-grid .info-card strong { margin-top: 2px; font-size: 13px; line-height: 1.45; word-break: break-word; }
    .compact-info-grid .info-card strong { line-height: 1.5; word-break: break-word; }
    .compact-customer-summary { padding: 12px 14px; box-shadow: none; }
    .customer-id-line { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
    .info-card span { display: block; color: var(--muted); font-size: 12px; }
    .info-card strong { display: block; margin-top: 3px; font-size: 14px; }
    .ai-summary-wrap { display: grid; gap: 12px; }
    .customer-ai-summary-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
    .customer-ai-summary-toolbar h3 { margin:0; color:var(--brand-dark); font-size:16px; }
    .customer-ai-summary-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; }
    .customer-ai-summary-updated { color:var(--muted); font-size:12px; white-space:nowrap; }
    .customer-ai-summary-error { display:block; margin-top:6px; color:var(--danger); font-size:12px; }
    .customer-ai-summary-error { color:#b42318; }
    .customer-ai-summary-empty,.customer-ai-summary-read-error { margin:0 0 12px; padding:12px 14px; border:1px dashed #c8d8ea; border-radius:10px; color:var(--muted); background:#f8fbff; }
    .customer-ai-summary-read-error { border-style:solid; border-color:#f0c7c4; color:#9f2d26; }
    .customer-ai-summary-toolbar button:disabled { cursor:not-allowed; opacity:.7; }
    .ai-summary-main {
      border: 1px solid #cfe0f5;
      border-radius: 12px;
      background: linear-gradient(135deg, #f8fbff, #edf7fb);
      padding: 15px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
    }
    .ai-summary-main h3 { margin: 0 0 6px; font-size: 17px; color: var(--brand-dark); }
    .ai-summary-main p { margin: 0; color: #405165; line-height: 1.7; }
    .ai-score { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 8px solid var(--cyan-soft); color: var(--cyan); box-shadow: 0 8px 18px rgba(11,142,168,.12); }
    .ai-score strong { display: block; font-size: 24px; line-height: 1; text-align: center; }
    .ai-score span { display: block; color: var(--muted); font-size: 12px; text-align: center; }
    .ai-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ai-summary-column { display: grid; gap: 10px; min-width: 0; align-content: start; }
    .ai-summary-scripts { min-width: 0; }
    .ai-summary-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; }
    .ai-summary-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--text); }
    .ai-summary-card p { margin: 0; color: #405165; line-height: 1.7; }
    .ai-summary-card ul { margin: 0; padding-left: 18px; color: #405165; line-height: 1.8; }
    .ai-summary-card.highlight { border-color: #bfe8ef; background: #f4fcfd; }
    .recommend-rule-disclosure { border: 1px solid #dce8f5; border-radius: 10px; background: #f8fbff; padding: 0 10px 10px; }
    .recommend-rule-disclosure > summary { cursor: pointer; list-style: none; padding: 10px 2px; color: var(--brand-dark); font-weight: 700; }
    .recommend-rule-disclosure > summary::-webkit-details-marker { display: none; }
    .recommend-rule-disclosure > summary::after { content: "展开"; float: right; color: var(--muted); font-size: 12px; font-weight: 400; }
    .recommend-rule-disclosure[open] > summary::after { content: "收起"; }
    .recommend-rule-disclosure table { margin-top: 2px; }
    .plan-rule-secret-hit { height: 42px; border-radius: 10px; }
    .script-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
    .script-card-head h4 { margin: 0; }
    .sales-script { border-left: 3px solid var(--brand); border-radius: 0 9px 9px 0; background: #f5f9ff; padding: 10px 12px; }
    .sales-script p { color: var(--text); line-height: 1.85; }
    .ai-summary-script-editor { display: block; width: 100%; min-height: 112px; box-sizing: border-box; resize: vertical; border: 1px solid #b8c9dc; border-radius: 6px; padding: 8px 10px; color: var(--text); background: #fff; line-height: 1.7; font: inherit; }
    .sales-script-actions { display: flex; justify-content: flex-end; margin-top: 9px; }
    .sales-script-demand-title { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--brand-dark); font-weight: 700; }
    .sales-script-demand-title strong { font-size: 14px; }
    .sales-script-demand-title .tag { margin-left: auto; }
    .sales-script-demand-title .script-copy-btn { margin-left: auto; }
    .policy-crawler-progress { display: grid; justify-items: center; gap: 12px; padding: 8px 0 14px; }
    .policy-crawler-country-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 2px; }
    .policy-crawler-country { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; border-radius: 999px; background: #eef4fb; color: var(--brand-dark); padding: 2px 10px; font-size: 12px; font-weight: 600; }
    .policy-crawler-progress-ring { --progress: 60%; width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) var(--progress), #e8eef5 0); }
    .policy-crawler-progress-ring::before { content: ""; grid-area: 1 / 1; width: 88px; height: 88px; border-radius: 50%; background: #fff; }
    .policy-crawler-progress-ring > div { grid-area: 1 / 1; display: grid; justify-items: center; gap: 2px; z-index: 1; }
    .policy-crawler-progress-ring strong { color: var(--brand-dark); font-size: 22px; line-height: 1; }
    .policy-crawler-progress-ring span { color: var(--muted); font-size: 11px; }
    .policy-crawler-status { margin: 0; color: var(--muted); text-align: center; line-height: 1.6; }
    .policy-crawler-result-list { display: grid; gap: 8px; max-height: 330px; overflow: auto; }
    .policy-crawler-result-item { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdff; }
    .policy-crawler-result-item strong { color: var(--brand-dark); }
    .policy-crawler-result-item span { color: var(--muted); font-size: 12px; }
    .ai-summary-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .record-table table { margin-top: 0; }
    .knowledge-log-table { border-collapse: collapse; border-spacing: 0; }
    .choice-list { display: grid; gap: 8px; }
    .column-config-list { display: grid; gap: 8px; max-height: min(58vh, 520px); overflow-y: auto; padding-right: 4px; }
    .column-config-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 72px 72px; gap: 8px; align-items: center; }
    .column-config-row { border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 8px 10px; cursor: grab; user-select: none; }
    .column-config-row:active { cursor: grabbing; }
    .column-config-row.dragging { opacity: .48; }
    .column-config-row.drag-over { border-color: var(--brand); box-shadow: inset 0 2px 0 var(--brand); }
    .column-config-drag-handle { width: 18px; height: 22px; justify-self: center; border-radius: 4px; background-image: radial-gradient(circle, #7b8b9e 1.35px, transparent 1.55px); background-position: 2px 2px; background-size: 6px 6px; cursor: grab; }
    .column-config-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .column-config-toggle { display: inline-flex; align-items: center; gap: 6px; justify-self: end; color: var(--text); font-size: 12px; }
    .column-config-toggle input { width: 14px; height: 14px; }
    .column-config-toggle.disabled { color: var(--muted); opacity: .62; }
    .route#ai { min-height: 0; }
    .route#ai > .page-head { display: none; }
    .chat-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 12px; height: clamp(520px, calc(100vh - 118px), 820px); min-height: 0; padding: 14px; border-radius: 4px; background: #e8f0f6; box-sizing: border-box; }
    .chat-shell > aside.panel { align-self: stretch; display: block; max-height: 100%; min-height: 0; padding: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }
    .chat-sidebar-inner { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; padding: 16px; background: #fff; border-radius: 4px; overflow: visible; }
    .chat-recent-head { display: grid; gap: 10px; margin-bottom: 10px; }
    .chat-recent-head h2 { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
    .chat-new-button { width: 100%; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: #fff; line-height: 1; font-weight: 700; }
    .chat-new-button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
    .chat-new-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .chat-recent-list-wrap { position: relative; min-height: 0; overflow: visible; }
    .chat-recent-list { display: grid; gap: 4px; align-content: start; height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 7px 4px 0; scrollbar-color: #dbe3ee #fff; scrollbar-width: thin; }
    .chat-recent-list::-webkit-scrollbar { width: 6px; }
    .chat-recent-list::-webkit-scrollbar-track { background: #f3f7fb; border-radius: 999px; }
    .chat-recent-list::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 999px; border: 2px solid #fff; }
    .ai-loading-placeholder, .ai-empty-placeholder { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; color: var(--muted); font-size: 12px; }
    .ai-loading-message { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 120px; color: var(--muted); font-size: 13px; }
    .ai-loading-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); animation: aiLoadingPulse 1.2s ease-in-out infinite; }
    @keyframes aiLoadingPulse { 0%, 100% { opacity: .35; transform: scale(.82); } 50% { opacity: 1; transform: scale(1); } }
    .chat-recent-row { position: relative; display: block; min-width: 0; }
    .chat-recent-item { position: relative; width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 4px; align-items: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); padding: 7px 8px 7px 10px; min-height: 38px; transition: background .15s ease, box-shadow .15s ease, border-color .15s ease; }
    .chat-recent-item:hover, .chat-recent-item.active { border-color: transparent; background: #eef4f9; color: var(--brand-dark); box-shadow: none; }
    .chat-recent-main { min-width: 0; border: 0; background: transparent; color: inherit; padding: 0; text-align: left; cursor: pointer; }
    .chat-recent-action-slot { position: relative; grid-column: 2; grid-row: 1; width: 28px; height: 26px; }
    .chat-recent-status { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: transparent; transform: translate(-50%, -50%); opacity: .9; transition: opacity .15s ease; }
    .chat-recent-status.unread { background: #1f5cff; box-shadow: none; opacity: 1; }
    .chat-recent-more { position: absolute; inset: 0; min-width: 28px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: transparent; color: #c5ced8; cursor: pointer; opacity: 0; pointer-events: none; padding: 0; font-size: 17px; font-weight: 700; line-height: 1; transition: opacity .15s ease, background .15s ease, color .15s ease; }
    .chat-recent-item:hover .chat-recent-more, .chat-recent-item:focus-within .chat-recent-more, .chat-recent-more[aria-expanded="true"] { opacity: 1; pointer-events: auto; }
    .chat-recent-more:hover, .chat-recent-more[aria-expanded="true"] { background: #eef3f9; color: var(--brand-dark); }
    .chat-recent-delete-layer { position: absolute; top: 0; right: 0; width: 0; height: 0; pointer-events: none; z-index: 8; }
    .chat-recent-delete-floating { position: absolute; top: 0; right: -68px; width: 64px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e9ef; border-radius: 6px; background: #fff; color: #e53935; padding: 0 10px; font-size: 14px; font-weight: 600; pointer-events: auto; box-shadow: 0 5px 12px rgba(24,48,80,.18); transform: translateY(-50%); z-index: 8; }
    .chat-recent-delete-floating:hover { background: var(--red-soft); border-color: #f0b9b4; }
    .chat-recent-delete-floating svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .chat-recent-item:hover .chat-recent-status, .chat-recent-item.menu-open .chat-recent-status { opacity: 0; }
    .chat-recent-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; line-height: 1.2; }
    .chat-recent-meta { display: none; }
    .recommend-product-list { display: grid; gap: 8px; }
    .recommend-product-item { border: 1px solid #d7e8ee; border-radius: 9px; background: rgba(255,255,255,.72); padding: 9px 10px; }
    .recommend-product-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .recommend-product-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--brand-dark); }
    .recommend-product-match { flex: 0 0 auto; color: #0f766e; font-size: 12px; font-weight: 700; }
    .recommend-product-item p { margin: 5px 0 0; color: #405165; font-size: 12px; line-height: 1.55; }
    .chat-main { display: grid; grid-template-rows: 60px minmax(0, 1fr) auto; gap: 0; min-height: 0; height: 100%; padding: 0; overflow: hidden; border-radius: 4px; background: #fff; }
    .chat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 0; padding: 10px 18px; border-bottom: 1px solid #eef2f6; background: #fff; }
    .chat-header strong { display: block; font-size: 16px; line-height: 1.35; }
    .chat-header span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
    .chat-header-actions { display: flex; align-items: center; gap: 10px; }
    .chat-status { min-width: 58px; min-height: 24px; display: none !important; align-items: center; justify-content: center; margin: 0 !important; border-radius: 999px; background: var(--green-soft); color: var(--green) !important; font-size: 12px; }
    .chat-status.running { background: #fff5e9; color: var(--amber) !important; }
    .chat-status.offline { background: #fff1f0; color: #c2413b !important; }
    .chat-messages { display: grid; align-content: start; gap: 16px; min-height: 0; background: #fff; padding: 18px 20px 20px; overflow-y: auto; overflow-x: hidden; max-height: none; }
    .chat-messages.is-welcome { align-content: center; }
    .ai-welcome { width: min(680px, 100%); justify-self: center; display: grid; justify-items: center; gap: 16px; padding: 24px 18px; text-align: center; }
    .ai-welcome-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--brand), #5b8df2); color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .5px; box-shadow: 0 10px 24px rgba(47,111,237,.2); }
    .ai-welcome-copy { display: grid; gap: 7px; justify-items: center; }
    .ai-welcome-copy h2 { margin: 0; color: #172b3f; font-size: 21px; line-height: 1.4; }
    .ai-welcome-copy p { max-width: 610px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
    .ai-welcome-capabilities { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .ai-welcome-capability { min-width: 0; display: grid; gap: 5px; border: 1px solid #e1e8f0; border-radius: 10px; background: #f8fafc; padding: 12px; text-align: left; }
    .ai-welcome-capability strong { color: #263b4f; font-size: 13px; }
    .ai-welcome-capability span { color: #718096; font-size: 11px; line-height: 1.55; }
    .ai-welcome-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .ai-welcome-prompt { border: 1px solid #d8e2ec; border-radius: 999px; background: #fff; color: #40566c; padding: 7px 12px; font-size: 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
    .ai-welcome-prompt:hover { border-color: #a9c5e8; background: var(--brand-soft); color: var(--brand-dark); }
    .ai-welcome-note { margin: -2px 0 0; color: #8a98a8; font-size: 11px; line-height: 1.55; }
    .message-group { display: grid; gap: 5px; max-width: min(82%, 720px); }
    .message-group.user { justify-self: end; justify-items: end; }
    .message-group.ai { justify-self: start; justify-items: start; }
    .message { max-width: 100%; border: 0; border-radius: 10px; padding: 10px 13px; background: transparent; color: var(--text); box-shadow: none; }
    .message p { margin: 0; line-height: 1.7; white-space: pre-wrap; }
    .message.user { background: #f1f3f5; color: var(--text); }
    .message.user.with-attachments { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: fit-content; max-width: 100%; padding: 0; background: transparent; }
    .message.user.with-attachments .ai-attachment-grid { align-self: flex-end; width: 100%; margin: 0; }
    .message.user.with-attachments .message-text { display: inline-block; align-self: flex-end; max-width: 100%; margin: 0; padding: 10px 13px; border-radius: 10px; background: #f1f3f5; }
    .message.ai { padding-left: 0; }
    .message .ai-markdown { min-width: 0; line-height: 1.72; overflow-wrap: anywhere; }
    .message .ai-markdown > :first-child { margin-top: 0; }
    .message .ai-markdown > :last-child { margin-bottom: 0; }
    .message .ai-markdown p { margin: 0 0 10px; white-space: normal; }
    .message .ai-markdown h1, .message .ai-markdown h2, .message .ai-markdown h3, .message .ai-markdown h4, .message .ai-markdown h5, .message .ai-markdown h6 { margin: 16px 0 8px; color: #172b3f; line-height: 1.45; }
    .message .ai-markdown h1 { font-size: 19px; }
    .message .ai-markdown h2 { font-size: 17px; }
    .message .ai-markdown h3 { font-size: 15px; }
    .message .ai-markdown h4, .message .ai-markdown h5, .message .ai-markdown h6 { font-size: 14px; }
    .message .ai-markdown ul, .message .ai-markdown ol { margin: 7px 0 11px; padding-left: 22px; }
    .message .ai-markdown li { margin: 4px 0; }
    .message .ai-markdown blockquote { margin: 9px 0; padding: 7px 11px; border-left: 3px solid #a8c2da; background: #f5f8fb; color: #4b6074; }
    .message .ai-markdown blockquote p { margin: 0; }
    .message .ai-markdown code { padding: 2px 5px; border-radius: 4px; background: #eef2f6; color: #b4235a; font: 12px/1.5 Consolas, "Courier New", monospace; }
    .message .ai-markdown pre { max-width: 100%; margin: 10px 0; padding: 11px 13px; border-radius: 7px; background: #17212b; color: #e7edf3; overflow-x: auto; }
    .message .ai-markdown pre code { padding: 0; background: transparent; color: inherit; white-space: pre; }
    .message .ai-markdown a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
    .message .ai-markdown hr { margin: 13px 0; border: 0; border-top: 1px solid #dfe7ef; }
    .message .ai-markdown table { display: block; width: max-content; max-width: 100%; margin: 10px 0; border-collapse: collapse; overflow-x: auto; }
    .message .ai-markdown th, .message .ai-markdown td { min-width: 92px; padding: 7px 9px; border: 1px solid #dce5ed; text-align: left; vertical-align: top; }
    .message .ai-markdown th { background: #f3f7fa; font-weight: 700; }
    .message .ai-response-state { display: inline-flex; align-items: center; margin-top: 5px; color: #718096; }
    .message.pending { color: #536476; }
    .message.error { border: 1px solid #f0c3bd; background: #fff8f6; color: #9f2f28; }
    .ai-context-request { display: grid; gap: 10px; width: min(520px, 72vw); margin-top: 10px; padding: 12px; border: 1px solid #d8e2ec; border-radius: 8px; background: #f8fafc; }
    .ai-context-request-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .ai-context-request .field { margin: 0; }
    .ai-context-request label { display: block; margin-bottom: 5px; color: #64748b; font-size: 11px; font-weight: 600; }
    .ai-context-request select { width: 100%; min-width: 0; min-height: 36px; border: 1px solid #ccd8e5; border-radius: 6px; background: #fff; color: var(--text); padding: 0 28px 0 9px; font-size: 12px; }
    .ai-context-request-actions { display: flex; justify-content: flex-end; }
    .ai-context-request-actions .btn { min-height: 32px; }
    .ai-context-resolved { display: inline-flex; align-items: center; margin-top: 8px; padding: 5px 8px; border-radius: 6px; background: #eef4f9; color: #52667b; font-size: 12px; }
    .ai-todo-request { display: grid; gap: 10px; width: min(520px, 72vw); margin-top: 10px; padding: 12px; border: 1px solid #cdddea; border-radius: 8px; background: #f8fbfd; }
    .ai-todo-request-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .ai-todo-request-head strong { color: #1c3850; font-size: 13px; }
    .ai-todo-status { padding: 3px 7px; border-radius: 999px; background: #edf3f8; color: #5b6f82; font-size: 11px; white-space: nowrap; }
    .ai-todo-status.completed { background: #e9f8ef; color: #137a45; }
    .ai-todo-status.cancelled { background: #f1f3f5; color: #66717d; }
    .ai-todo-status.failed { background: #fff0ee; color: #b13b32; }
    .ai-todo-request dl { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 7px 10px; margin: 0; font-size: 12px; }
    .ai-todo-request dt { color: #77889a; }
    .ai-todo-request dd { min-width: 0; margin: 0; color: #263b4f; overflow-wrap: anywhere; }
    .ai-todo-request-actions { display: flex; justify-content: flex-end; gap: 8px; }
    .ai-todo-request-actions .btn { min-height: 32px; }
    .message-meta { display: flex; align-items: center; gap: 7px; min-height: 18px; color: #98a5b3; font-size: 11px; line-height: 1; }
    .message-group.user .message-meta { justify-content: flex-end; }
    .message-actions { display: inline-flex; align-items: center; gap: 3px; }
    .message-action { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #9aa7b4; cursor: pointer; padding: 0; }
    .message-action:hover { background: #eef3f8; color: var(--brand-dark); }
    .message-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .typing-dots { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
    .typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .35; animation: typingPulse 1s infinite ease-in-out; }
    .typing-dots i:nth-child(2) { animation-delay: .15s; }
    .typing-dots i:nth-child(3) { animation-delay: .3s; }
    @keyframes typingPulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: .9; transform: translateY(-2px); } }
    .chat-footer { border-top: 1px solid #eef2f6; background: #fff; padding: 12px 20px 14px; }
    .chat-compose { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: end; }
    .chat-compose .field { margin: 0; }
    .chat-input-shell { position: relative; border: 1px solid #d8e2ec; border-radius: 10px; background: #fff; overflow: hidden; }
    .chat-input-shell:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(39, 116, 184, .08); }
    .chat-compose textarea, .chat-edit-composer textarea { min-height: 82px; max-height: 126px; border-radius: 0; border: 0; padding: 12px 178px 12px 13px; }
    .chat-compose textarea:focus { box-shadow: none; }
    .chat-edit-composer { display: none; position: relative; margin-bottom: 10px; }
    .chat-edit-composer.active { display: grid; }
    .chat-edit-composer textarea { padding-right: 122px; }
    .chat-edit-actions { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 7px; }
    .chat-edit-actions .btn { min-width: 52px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; }
    .chat-attachment-preview { display: none; grid-template-columns: repeat(auto-fill, minmax(60px, 72px)); gap: 7px; min-width: 0; margin: 0; padding: 8px 9px 8px; background: transparent; color: var(--muted); font-size: 12px; }
    .chat-attachment-preview.active { display: grid; }
    .chat-attachment-tile, .ai-attachment-tile { position: relative; min-width: 0; }
    .chat-attachment-tile button, .ai-attachment-tile button { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; overflow: hidden; }
    .chat-attachment-tile img, .ai-attachment-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .chat-attachment-tile span, .ai-attachment-tile span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 2px 0; font-size: 10px; }
    .chat-attachment-file-card { height: 72px; display: grid !important; align-content: center; justify-items: center; gap: 3px; border: 1px solid #bfd2e8; border-radius: 7px; background: #f6f9fd; color: var(--text); padding: 4px !important; }
    .chat-attachment-file-card .ai-attachment-file-icon { width: 27px; height: 27px; }
    .chat-attachment-file-card .ai-attachment-file-icon svg { width: 17px; height: 17px; }
    .chat-attachment-file-card .chat-attachment-file-name { max-width: 100%; }
    .chat-attachment-remove { position: absolute; top: -5px; right: -5px; width: 18px !important; height: 18px !important; display: inline-grid !important; place-items: center; border: 1px solid #fff !important; border-radius: 50% !important; background: #64748b !important; color: #fff; font-size: 13px; line-height: 1; z-index: 1; }
    .chat-attachment-remove:hover { background: var(--red) !important; }
    .ai-attachment-grid { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; width: fit-content; max-width: 100%; margin-top: 8px; }
    .ai-attachment-tile { flex: 0 0 116px; width: 116px; }
    .ai-attachment-tile button { width: 116px; height: 92px; aspect-ratio: auto; background: transparent; }
    .ai-attachment-file { display: grid !important; grid-template-rows: 1fr auto; place-items: center; gap: 5px; padding: 9px !important; border: 1px solid #bfd2e8 !important; border-radius: 8px !important; background: #f6f9fd !important; color: var(--text); text-align: center; box-shadow: 0 2px 7px rgba(38, 78, 119, .08); }
    .ai-attachment-file:hover { border-color: var(--brand) !important; background: #edf5ff !important; box-shadow: 0 4px 12px rgba(38, 78, 119, .14); }
    .ai-attachment-file-icon { grid-row: 1; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0 !important; border-radius: 7px; background: #e0ecfa; color: #27639b; overflow: visible !important; }
    .ai-attachment-file-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .ai-attachment-file-name { grid-row: 2; width: 100%; padding: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.25; }
    .ai-image-preview { display: grid; place-items: center; min-height: 240px; padding: 8px; background: transparent; border-radius: 8px; }
    .ai-image-preview img { display: block; max-width: 100%; max-height: min(68vh, 620px); object-fit: contain; }
    .ai-file-preview { display: grid; place-items: center; min-height: 180px; padding: 10px; }
    .ai-file-preview audio { width: min(100%, 520px); }
    .ai-file-preview iframe { width: 100%; height: min(68vh, 620px); border: 0; }
    .ai-source-file-link { text-decoration: none; }
    .chat-send-icon { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: #c9cdd1; color: #fff; cursor: pointer; }
    .chat-send-icon.ready { background: var(--brand); }
    .chat-send-icon.ready:hover { background: var(--brand-dark); }
    .chat-send-icon.running { background: var(--amber); }
    .chat-send-icon.running:hover { background: #c27b16; }
    .chat-send-icon:disabled { opacity: 1; cursor: not-allowed; }
    .chat-send-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .chat-voice-icon { position: absolute; right: 52px; bottom: 10px; width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: #f1f4f7; color: #98a4b1; cursor: pointer; }
    .chat-voice-icon:hover, .chat-voice-icon.listening { background: #e4effa; color: var(--brand); }
    .chat-voice-icon:disabled { opacity: .55; cursor: not-allowed; }
    .chat-voice-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .chat-attach-icon { position: absolute; bottom: 10px; width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: #f1f4f7; color: #64748b; cursor: pointer; }
    .chat-attach-icon:hover { background: #e4effa; color: var(--brand); }
    .chat-attach-icon.file { right: 94px; }
    .chat-attach-icon.image { right: 136px; }
    .chat-attach-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .chat-compose .field label { display: none; }
    .chat-input-tools { display: none; }
    .chat-tool-button { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; }
    .chat-tool-button:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
    .chat-tool-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .chat-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
    .ai-attachment { display: grid; gap: 6px; margin-top: 8px; }
    .quick-qa-panel { display: grid; margin-bottom: 10px; }
    .quick-qa-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
    .quick-qa-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .quick-qa-chip { max-width: 320px; border: 1px solid #cfe0f5; border-radius: 999px; background: #f7fbff; color: #174b83; padding: 6px 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .quick-qa-chip:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
    .chat-verify-note { margin-top: 8px; color: #a4adb7; font-size: 12px; text-align: center; }
    .feedback-options { display: grid; gap: 9px; }
    .feedback-option { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); padding: 12px; text-align: left; cursor: pointer; }
    .feedback-option:hover { border-color: var(--brand); background: #f8fbff; }
    .feedback-option-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
    .feedback-option.reject .feedback-option-icon { background: #fff5e9; color: var(--amber); }
    .feedback-option-main strong { display: block; margin-bottom: 3px; }
    .feedback-option-main span { color: var(--muted); font-size: 12px; line-height: 1.55; }
    .feedback-note { margin-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.6; }
    .knowledge-panel .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; }
    .knowledge-panel #knowledgeDetail { display: none; }
    .knowledge-panel { min-height: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
    .knowledge-panel .detail-grid { min-height: 0; height: 100%; overflow: hidden; align-items: stretch; }
    .knowledge-panel .detail-stack { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
    .knowledge-panel .side-detail { min-height: 0; height: 100%; overflow: auto; }
    .knowledge-product-area { height: 100%; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; overflow: hidden; }
    .knowledge-library-view { height: 100%; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; }
    .knowledge-library-view > .knowledge-list { min-height: 0; height: 100%; }
    .knowledge-product-toolbar { display: grid; gap: 8px; }
    .knowledge-product-toolbar-main { display: flex; align-items: flex-end; justify-content: flex-start; gap: 14px; flex-wrap: wrap; }
    .knowledge-product-toolbar-main > .actions { flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
    .knowledge-policy-toolbar .knowledge-product-toolbar-main { flex-wrap: nowrap; }
    .knowledge-product-filters { display: flex; align-items: flex-end; justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
    .knowledge-product-filters .field { width: 150px; }
    .knowledge-product-filters .knowledge-product-name-field { width: 220px; }
    .knowledge-product-filters .knowledge-log-content-field { width: 240px; }
    .knowledge-product-filters .knowledge-log-time-field { width: 250px; }
    .knowledge-product-filters .field > label { display: none !important; }
    .knowledge-product-filters input, .knowledge-product-filters select { height: 36px; }
    #knowledgeScriptSearch, #knowledgePolicySearch, #knowledgeLogSearch { direction: ltr; text-align: left; }
    .knowledge-product-filters .knowledge-level-field { width: 148px; }
    .knowledge-product-filters .knowledge-level-field select { width: 100%; }
    .knowledge-cascade-field { width: 168px !important; position: relative; }
    .knowledge-cascade { position: relative; }
    .knowledge-cascade-trigger { width: 168px; height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); padding: 0 10px; text-align: left; cursor: pointer; }
    .knowledge-cascade-trigger::after { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
    .knowledge-cascade-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .knowledge-cascade-panel { display: none; position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 366px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(20,38,60,.14); }
    .knowledge-cascade-panel.in-flow { display: block; }
    .knowledge-cascade-path { display: flex; align-items: center; gap: 5px; min-height: 26px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
    .knowledge-cascade-path strong { color: var(--brand-dark); font-weight: 600; }
    .knowledge-cascade-columns { display: grid; grid-template-columns: repeat(3, 112px); gap: 6px; }
    .knowledge-cascade-column { min-height: 150px; max-height: 218px; overflow: auto; border: 1px solid #e4ebf3; border-radius: 8px; background: #fbfdff; padding: 5px; }
    .knowledge-cascade-option { width: 100%; min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--text); padding: 6px 8px; text-align: left; cursor: pointer; font-size: 12px; }
    .knowledge-cascade-option:hover, .knowledge-cascade-option.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
    .knowledge-cascade-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .knowledge-cascade-option::after { content: "›"; color: var(--muted); }
    .knowledge-cascade-column:last-child .knowledge-cascade-option::after { content: ""; }
    .knowledge-product-path { display: inline-flex; align-items: center; min-height: 26px; max-width: 100%; gap: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .knowledge-product-path strong { color: var(--brand-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
    .knowledge-product-path span { color: #9aabba; }
    .knowledge-product-count { color: var(--muted); font-size: 12px; }
    .knowledge-stat-strip { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; scrollbar-color: #dbe3ee #f7f9fc; }
    .knowledge-stat-strip::-webkit-scrollbar { height: 8px; }
    .knowledge-stat-strip::-webkit-scrollbar-track { background: #f3f7fb; border-radius: 999px; }
    .knowledge-stat-strip::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 999px; border: 2px solid #f7f9fc; }
    .knowledge-stat-card { min-width: 160px; flex: 1 0 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 9px 10px; }
    .knowledge-stat-card span { display: block; color: var(--muted); font-size: 12px; }
    .knowledge-stat-card strong { display: block; margin-top: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: 15px; }
    .knowledge-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
    .knowledge-category-btn { min-width: 0; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); color: var(--text); padding: 9px 10px; text-align: left; cursor: pointer; }
    .knowledge-category-btn:hover, .knowledge-category-btn.active { border-color: #b7cae1; background: var(--brand-soft); color: var(--brand-dark); }
    .knowledge-category-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
    .knowledge-category-btn strong { font-size: 16px; line-height: 1; }
    .knowledge-product-grid { min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 220px)); align-content: start; justify-content: start; gap: 10px; padding-right: 8px; padding-bottom: 12px; }
    .knowledge-product-scroll { min-height: 0; height: 100%; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #dbe3ee #f7f9fc; padding-right: 2px; }
    .knowledge-product-scroll::-webkit-scrollbar { width: 8px; }
    .knowledge-product-scroll::-webkit-scrollbar-track { background: #f3f7fb; border-radius: 999px; }
    .knowledge-product-scroll::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 999px; border: 2px solid #f7f9fc; }
    .knowledge-product-card { min-width: 0; height: 138px; display: grid; grid-template-rows: minmax(0, 1fr); border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 11px; overflow: hidden; }
    .knowledge-product-card:hover, .knowledge-product-card.active { border-color: #b7cae1; background: #fbfdff; }
    .knowledge-product-main { min-width: 0; min-height: 0; height: 100%; display: grid; grid-template-rows: auto 36px 22px; gap: 8px; border: 0; background: transparent; color: var(--text); padding: 0; text-align: left; cursor: pointer; overflow: hidden; }
    .knowledge-product-head { display: grid; gap: 3px; min-width: 0; }
    .knowledge-product-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: 14px; font-weight: 700; }
    .knowledge-product-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
    .knowledge-product-summary { width: 100%; height: 36px; min-height: 36px; max-height: 36px; min-width: 0; margin: 0; color: #405165; font-size: 12px; line-height: 18px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
    .knowledge-product-meta { min-width: 0; height: 22px; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 6px; color: var(--muted); font-size: 11px; overflow: hidden; }
    .knowledge-product-meta span { min-width: 0; display: inline-flex; align-items: center; min-height: 22px; max-width: 100%; border-radius: 999px; background: var(--soft); padding: 2px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .knowledge-compare-check { display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; color: #536476; font-size: 12px; cursor: pointer; user-select: none; }
    .knowledge-compare-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--brand); }
    .product-compare-panel { position: relative; z-index: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 9px; border: 1px solid #dce8f5; border-radius: 10px; background: #f8fbff; padding: 10px; overflow: hidden; }
    .product-compare-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .product-compare-head strong { color: var(--brand-dark); font-size: 14px; }
    .product-compare-head span { color: var(--muted); font-size: 12px; }
    .product-compare-page { grid-template-rows: auto auto minmax(0, 1fr); }
    .product-compare-selector { position: relative; z-index: 4; min-height: fit-content; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; }
    .product-compare-selector-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .product-compare-selector-head strong { color: var(--brand-dark); font-size: 14px; }
    .product-compare-selector-head span { color: var(--muted); font-size: 12px; }
    .product-compare-picker-row { display: flex; align-items: flex-start; gap: 8px; }
    .product-compare-picker { position: relative; flex: 1 1 auto; min-width: 0; }
    .product-compare-picker-trigger { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); padding: 7px 10px; text-align: left; }
    .product-compare-picker-trigger::after { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
    .product-compare-picker-value { min-width: 0; max-height: 66px; display: flex; flex-wrap: wrap; gap: 5px; overflow: auto; padding-right: 2px; }
    .product-compare-picker-placeholder { color: var(--muted); line-height: 22px; }
    .product-compare-picker-panel { position: fixed; z-index: 60; box-sizing: border-box; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 7px; max-height: 310px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(20,38,60,.14); overflow: hidden; }
    .product-compare-picker-search { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; outline: 0; }
    .product-compare-picker-options { min-height: 0; max-height: 230px; display: grid; gap: 3px; padding: 0 2px 5px 0; overflow-x: hidden; overflow-y: auto; }
    .product-compare-picker-option { display: flex; align-items: center; gap: 8px; min-height: 32px; border-radius: 7px; padding: 5px 7px; cursor: pointer; }
    .product-compare-picker-option:hover { background: var(--brand-soft); }
    .product-compare-picker-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--brand); }
    .product-compare-picker-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 12px; }
    .product-compare-picker-option small { margin-left: auto; color: var(--muted); font-size: 11px; }
    .product-compare-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
    .product-compare-table-wrap { min-height: 0; height: 100%; max-height: none; overflow: auto; border: 1px solid #dbe6f3; border-radius: 8px; background: #fff; }
    .product-compare-table { min-width: 0; width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
    .product-compare-table > thead > tr > th:first-child, .product-compare-table > tbody > tr > th:first-child, .product-compare-table > tbody > tr > td:first-child { width: 150px; }
    .product-compare-table > thead > tr > th, .product-compare-table > tbody > tr > th, .product-compare-table > tbody > tr > td { border-bottom: 1px solid #edf2f7; border-right: 1px solid #edf2f7; padding: 8px 9px; vertical-align: top; text-align: left; overflow-wrap: anywhere; word-break: break-word; }
    .product-compare-table > thead > tr > th:last-child, .product-compare-table > tbody > tr > th:last-child, .product-compare-table > tbody > tr > td:last-child { border-right: 0; }
    .product-compare-table > tbody > tr:last-child > th, .product-compare-table > tbody > tr:last-child > td { border-bottom: 0; }
    .product-compare-table > thead > tr > th { position: sticky; top: 0; z-index: 2; background: #f2f6fb; color: #314155; font-weight: 700; }
    .product-compare-table > thead > tr > th:first-child { left: 0; z-index: 4; }
    .product-compare-table > tbody > tr > th { position: sticky; left: 0; z-index: 1; background: #f2f6fb; color: #314155; font-weight: 700; }
    .product-compare-table > tbody > tr > td { color: #405165; line-height: 1.55; }
    .product-compare-cell-markdown { max-height: min(42vh, 420px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #8ba2bd #edf2f7; color: #405165; font-size: 12px; line-height: 1.65; }
    .product-compare-cell-markdown::-webkit-scrollbar { width: 9px; height: 9px; }
    .product-compare-cell-markdown::-webkit-scrollbar-track { border-radius: 8px; background: #edf2f7; }
    .product-compare-cell-markdown::-webkit-scrollbar-thumb { border: 2px solid #edf2f7; border-radius: 8px; background: #8ba2bd; }
    .product-compare-cell-markdown::-webkit-scrollbar-thumb:hover { background: #627e9e; }
    .product-compare-cell-markdown p { margin-bottom: 6px; }
    .product-compare-cell-markdown h1, .product-compare-cell-markdown h2, .product-compare-cell-markdown h3, .product-compare-cell-markdown h4, .product-compare-cell-markdown h5, .product-compare-cell-markdown h6 { margin: 8px 0 5px; font-size: 13px; }
    .product-compare-cell-markdown ul, .product-compare-cell-markdown ol { margin: 5px 0 7px; padding-left: 18px; }
    .product-compare-cell-markdown table { margin: 6px 0; font-size: 11px; }
    .product-compare-cell-markdown th, .product-compare-cell-markdown td { position: static; min-width: 88px; padding: 5px 6px; background: #fff; color: #405165; font-weight: 400; }
    .product-compare-cell-markdown th { background: #f6f9fd; font-weight: 700; }
    .product-compare-table .product-name-cell { color: var(--brand-dark); font-weight: 700; }
    .knowledge-product-actions { display: none; }
    .knowledge-product-actions .btn { min-height: 30px; padding: 5px 9px; font-size: 12px; }
    .drawer.product-detail-drawer { width: min(980px, 94vw); }
    .knowledge-detail-shell { width: 100%; min-width: 0; display: grid; gap: 16px; color: #24384d; }
    .knowledge-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
    .knowledge-detail-shell > .knowledge-detail-head { position: sticky; top: -14px; z-index: 3; margin: -14px -2px 0; padding: 14px 2px 12px; border-bottom: 1px solid var(--line); background: #fff; }
    .knowledge-detail-head h2 { margin: 0; font-size: 18px; }
    .knowledge-detail-section { width: 100%; min-width: 0; border-top: 1px solid var(--line); padding-top: 11px; }
    .knowledge-detail-section h3 { margin: 0 0 8px; font-size: 13px; color: var(--brand-dark); }
    .knowledge-detail-note { width: 100%; min-width: 0; max-width: 100%; border: 0; border-radius: 0; background: #fff; padding: 0; color: #334b62; line-height: 1.75; overflow: hidden; }
    .product-detail-card { display: grid; gap: 16px; color: var(--text); }
    .product-detail-overview { display: grid; gap: 12px; padding: 14px; border: 1px solid #cfe0f5; border-radius: 10px; background: #f5faff; }
    .product-detail-overview-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #164d7c; font-size: 14px; font-weight: 700; }
    .product-detail-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .product-detail-overview-item { min-width: 0; padding: 10px 11px; border: 1px solid #dceaf7; border-radius: 8px; background: #fff; }
    .product-detail-overview-item span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
    .product-detail-overview-item strong { display: block; color: #132c46; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
    .product-detail-group { display: grid; gap: 10px; }
    .product-detail-group > h3 { margin: 0; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: #123e65; font-size: 15px; }
    .product-detail-module { display: grid; gap: 7px; }
    .product-detail-module h4 { margin: 0; color: #243f5a; font-size: 13px; }
    .product-detail-module .knowledge-detail-note { background: #fff; }
    .product-detail-package-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
    .product-detail-package { border: 1px solid var(--line); background: #fff; padding: 12px; display: grid; gap: 9px; }
    .product-detail-package-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .product-detail-package dl { margin: 0; display: grid; gap: 6px; }
    .product-detail-package dl > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
    .product-detail-package dt { color: var(--muted); }
    .product-detail-package dd { margin: 0; color: var(--text); word-break: break-word; }
    .product-detail-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .product-detail-stat { min-width: 0; padding: 10px; border: 1px solid #e0e8f0; border-radius: 8px; background: #fbfdff; }
    .product-detail-stat strong { display: block; margin-bottom: 3px; color: #124d7e; font-size: 16px; }
    .product-detail-stat span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
    .product-detail-card .knowledge-markdown table { width: 100%; min-width: 0; }
    .product-detail-card .knowledge-markdown th, .product-detail-card .knowledge-markdown td { min-width: 0; }
    .product-detail-card .knowledge-markdown { color: #334b62; line-height: 1.7; }
    @media (max-width: 680px) {
      .product-detail-overview-grid, .product-detail-stat-grid { grid-template-columns: 1fr; }
    }
    .knowledge-markdown { width: 100%; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
    .knowledge-markdown > :first-child { margin-top: 0; }
    .knowledge-markdown > :last-child { margin-bottom: 0; }
    .knowledge-markdown p { margin: 0 0 10px; white-space: normal; }
    .knowledge-markdown h1, .knowledge-markdown h2, .knowledge-markdown h3, .knowledge-markdown h4, .knowledge-markdown h5, .knowledge-markdown h6 { margin: 16px 0 8px; color: #172b3f; line-height: 1.45; }
    .knowledge-markdown h1 { font-size: 19px; }
    .knowledge-markdown h2 { font-size: 17px; }
    .knowledge-markdown h3 { font-size: 15px; }
    .knowledge-markdown h4, .knowledge-markdown h5, .knowledge-markdown h6 { font-size: 14px; }
    .knowledge-markdown ul, .knowledge-markdown ol { margin: 7px 0 11px; padding-left: 22px; }
    .knowledge-markdown li { margin: 4px 0; }
    .knowledge-markdown ol.knowledge-merged-steps { margin: 0; padding-left: 0; list-style-position: inside; }
    .knowledge-markdown ol.knowledge-merged-steps > li { margin: 0; padding: 12px 8px; border-bottom: 1px solid #dfe7ef; }
    .knowledge-markdown ol.knowledge-merged-steps > li:last-child { border-bottom: 0; }
    .knowledge-markdown blockquote { margin: 9px 0; padding: 7px 11px; border-left: 3px solid #a8c2da; background: #f5f8fb; color: #4b6074; }
    .knowledge-markdown blockquote p { margin: 0; }
    .knowledge-markdown code { padding: 2px 5px; border-radius: 4px; background: #eef2f6; color: #b4235a; font: 12px/1.5 Consolas, "Courier New", monospace; }
    .knowledge-markdown pre { max-width: 100%; margin: 10px 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; overflow-x: auto; font: inherit; white-space: pre-wrap; }
    .knowledge-markdown pre code { padding: 0; background: transparent; color: inherit; white-space: pre-wrap; font: inherit; }
    .knowledge-markdown a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
    .knowledge-markdown hr { margin: 13px 0; border: 0; border-top: 1px solid #dfe7ef; }
    .knowledge-markdown table { display: block; width: 100%; min-width: 100%; max-width: 100%; margin: 10px 0; border-collapse: collapse; overflow-x: auto; background: #fff; }
    .product-compare-cell-markdown.knowledge-markdown table { display: table; overflow: visible; }
    .knowledge-markdown th, .knowledge-markdown td { min-width: 92px; padding: 7px 9px; border: 1px solid #dce5ed; text-align: left; vertical-align: top; white-space: pre-wrap; }
    .knowledge-markdown th { background: #f3f7fa; font-weight: 700; }
    .policy-detail-card { display: grid; gap: 18px; color: var(--text); }
    .policy-detail-hero { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
    .policy-detail-eyebrow { color: var(--brand); font-size: 13px; font-weight: 700; }
    .policy-detail-hero h2 { margin: 0; color: #07192d; font-size: 22px; line-height: 1.35; }
    .policy-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
    .policy-detail-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; border-radius: 999px; background: #eef4fb; color: #405165; padding: 2px 10px; font-size: 12px; font-weight: 600; }
    .policy-detail-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .65; }
    .policy-detail-tag.warn { background: #fff2df; color: #b76413; }
    .policy-detail-tag.ai { background: #eaf3ff; color: var(--brand); }
    .policy-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .policy-detail-info { min-height: 94px; border: 1px solid #dfe9f4; border-radius: 8px; background: #f8fafc; padding: 14px; }
    .policy-detail-info span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
    .policy-detail-info strong { display: block; color: #07192d; line-height: 1.55; overflow-wrap: anywhere; }
    .policy-detail-section { display: grid; gap: 9px; }
    .policy-detail-section h3 { margin: 0; color: #07192d; font-size: 14px; }
    .policy-detail-box { border: 1px solid #cfe0f5; border-radius: 8px; background: #f7fbff; padding: 13px 14px; color: #405165; line-height: 1.75; overflow-wrap: anywhere; }
    .policy-detail-source { display: block; color: #405165; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
    .policy-detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .policy-detail-section-head h3 { margin: 0; }
    .policy-detail-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .policy-detail-inline-actions .btn { min-height: 30px; padding: 5px 10px; font-size: 12px; }
    .policy-original-box { max-height: 440px; overflow: auto; background: #fff; }
    .policy-plain-text { white-space: pre-wrap; word-break: break-word; }
    .policy-original-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; color: #314155; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.75; }
    @media (max-width: 760px) {
      .crm-auth-gate { padding: 14px; }
      .crm-auth-gate-card { grid-template-columns: minmax(0, 1fr); gap: 20px; width: min(520px, 100%); height: auto; min-height: 0; max-height: calc(100vh - 28px); overflow-y: auto; padding: 22px; }
      .crm-auth-gate-intro { padding: 0; }
      .crm-auth-gate-brand { margin-bottom: 17px; }
      .crm-auth-gate-eyebrow { margin-bottom: 8px; }
      .crm-auth-gate-intro h1 { margin-bottom: 5px; font-size: 30px; }
      .crm-auth-gate-intro p { font-size: 12px; }
      .crm-auth-gate-login { min-height: 0; padding: 20px; }
    }
    @media (max-width: 720px) {
      .policy-detail-grid { grid-template-columns: 1fr; }
      .policy-detail-hero h2 { font-size: 19px; }
    }

    .knowledge-list { min-height: 0; display: grid; gap: 10px; align-content: start; overflow: auto; }
    .knowledge-list[data-type="product"] { height: 100%; overflow: hidden; align-content: stretch; }
    .knowledge-list[data-type="product"] .knowledge-product-area { height: 100%; min-height: 0; }
    .knowledge-summary-row { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 10px 12px; color: #405165; }
    .knowledge-summary-row strong { display: block; color: var(--brand-dark); font-size: 14px; }
    .knowledge-summary-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
    .knowledge-list-item { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; text-align: left; color: var(--text); }
    .knowledge-list-item:hover, .knowledge-list-item.active { border-color: #b7cae1; background: #f7fbff; }
    .knowledge-list-main { min-width: 0; display: grid; gap: 7px; }
    .knowledge-list-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand-dark); font-size: 14px; font-weight: 700; }
    .knowledge-list-meta { display: flex; flex-wrap: wrap; gap: 6px; }
    .knowledge-list-meta span { display: inline-flex; align-items: center; min-height: 22px; border-radius: 999px; background: var(--soft); color: #536476; padding: 2px 8px; font-size: 12px; }
    .knowledge-list-summary { margin: 0; color: #405165; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .knowledge-list-arrow { color: var(--muted); font-size: 20px; line-height: 1; }
    .knowledge-script-table { table-layout: fixed; }
    .knowledge-script-table th:nth-child(1), .knowledge-script-table td:nth-child(1) { width: 15%; }
    .knowledge-script-table th:nth-child(2), .knowledge-script-table td:nth-child(2) { width: 11%; }
    .knowledge-script-table th:nth-child(3), .knowledge-script-table td:nth-child(3) { width: 14%; }
    .knowledge-script-table th:nth-child(4), .knowledge-script-table td:nth-child(4) { width: auto; }
    .knowledge-script-table th:nth-child(5), .knowledge-script-table td:nth-child(5) { width: 9%; }
    .knowledge-script-table th:nth-child(6), .knowledge-script-table td:nth-child(6) { width: 150px; }
    .knowledge-script-table th:nth-child(7), .knowledge-script-table td:nth-child(7) { width: 214px; min-width: 214px; }
    .knowledge-script-summary { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #405165; line-height: 1.5; }
    .knowledge-script-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; justify-content: stretch; gap: 6px; width: 100%; }
    .knowledge-script-actions .btn { min-width: 52px; min-height: 36px; padding: 7px 8px; white-space: nowrap; }
    .policy-parse-preview { border: 1px solid #cfe0f5; border-radius: 9px; background: #f7fbff; color: #405165; padding: 10px; line-height: 1.65; }
    .policy-parse-preview strong { display: block; color: var(--brand-dark); margin-bottom: 4px; }
    .form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
    .filter-actions-sticky { position: sticky; bottom: -18px; margin: 14px -18px -18px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 14px 14px; }
    .multi-check-list { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px; max-height: 220px; overflow: auto; }
    .multi-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .check-option { display: flex; align-items: center; gap: 7px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 6px 8px; color: var(--text); }
    .check-option input { width: 15px; height: 15px; flex: 0 0 auto; }
    .check-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .check-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
    .profile-picker { grid-column: 1 / -1; position: relative; }
    .profile-picker-button { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
    .profile-picker-button.has-value { color: var(--text); font-weight: 600; }
    .profile-picker-button::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -3px; flex: 0 0 auto; }
    .profile-picker-panel { display: none; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px; max-height: 260px; overflow: auto; box-shadow: 0 12px 28px rgba(20,38,60,.12); }
    .profile-picker.active .profile-picker-panel { display: block; }
    .table-link { border: 0; background: transparent; padding: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
    .table-link:hover { text-decoration: underline; }
    .demand-summary { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
    .customer-filter-panel { padding: 14px; }
    .customer-filter-bar { display:grid; grid-template-columns:minmax(220px,1.55fr) repeat(5,minmax(130px,1fr)) minmax(250px,1.45fr) minmax(150px,1fr); gap:10px 8px; overflow:visible; padding-bottom:0; }
    .customer-filter-bar .field { width:auto; min-width:0; }
    .customer-filter-bar .search-field { min-width:0; }
    .customer-filter-bar .range-field { flex-basis: 112px; }
    .customer-filter-bar .filter-action-field { grid-column:1; width:max-content; }
    .customer-filter-bar .btn { white-space: nowrap; }
    .searchable-filter-field { position:relative; }
    .searchable-filter-native { position:absolute !important; width:1px !important; height:1px !important; margin:-1px !important; padding:0 !important; overflow:hidden !important; clip:rect(0 0 0 0); white-space:nowrap; border:0 !important; }
    .searchable-filter-select { position:relative; width:100%; }
    .searchable-filter-trigger { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; height:36px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
    .searchable-filter-trigger.is-placeholder { color:var(--muted); font-weight:400; }
    .searchable-filter-trigger span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .searchable-filter-trigger i { width:7px; height:7px; flex:0 0 auto; border-right:1.5px solid #65758b; border-bottom:1.5px solid #65758b; transform:rotate(45deg) translateY(-2px); transition:transform .18s ease; }
    .searchable-filter-select.open .searchable-filter-trigger { border-color:var(--primary); box-shadow:0 0 0 2px rgba(38,103,255,.12); }
    .searchable-filter-select.open .searchable-filter-trigger i { transform:rotate(225deg) translate(-2px,-1px); }
    .searchable-filter-panel { position:fixed; z-index:180; top:auto; left:auto; width:220px; max-width:calc(100vw - 24px); padding:7px; border:1px solid #dbe3ef; border-radius:9px; background:#fff; box-shadow:0 10px 28px rgba(31,45,61,.16); }
    .searchable-filter-panel[hidden] { display:none; }
    .searchable-filter-search { width:100%; height:34px; padding:7px 10px !important; border:1px solid var(--primary) !important; border-radius:7px !important; box-shadow:0 0 0 2px rgba(38,103,255,.08); }
    .searchable-filter-options { max-height:268px; margin-top:6px; overflow-y:auto; scrollbar-width:thin; }
    .searchable-filter-option { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:34px; padding:7px 9px; border:0; border-radius:5px; background:#fff; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
    .searchable-filter-option:hover, .searchable-filter-option.selected { background:#edf4ff; color:var(--primary); }
    .searchable-filter-option i { visibility:hidden; color:var(--primary); font-style:normal; font-size:14px; }
    .searchable-filter-option.selected i { visibility:visible; }
    .searchable-filter-option[hidden] { display:none; }
    .searchable-filter-empty { padding:18px 8px; color:var(--muted); text-align:center; }
    .searchable-filter-empty[hidden] { display:none; }
    .customer-list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 2px; }
    .customer-list-toolbar .actions { display:flex; gap:8px; margin-left:auto; }
    .customer-attention-filters { display:flex; align-items:center; gap:10px; margin:0; }
    .customer-attention-chip { display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:6px 12px; border:1px solid #cfddf0; border-radius:999px; background:#f5f9ff; color:#29588f; cursor:pointer; }
    .customer-attention-chip:hover, .customer-attention-chip.active { border-color:var(--brand); background:var(--brand-soft); color:var(--brand-dark); }
    .customer-attention-chip strong { min-width:22px; height:22px; display:inline-grid; place-items:center; padding:0 6px; border-radius:999px; background:#fff; color:inherit; font-size:12px; }
    .budget-range { min-width:250px; display:grid; grid-template-columns:minmax(100px,1fr) auto minmax(100px,1fr); align-items:center; gap:7px; }
    .budget-range input { width:100%; min-width:0; height:40px; border:1px solid #bfd0e7; border-radius:9px; background:#fff; color:var(--text); outline:0; padding:0 12px; }
    .budget-range input:focus { border-color:var(--primary); box-shadow:0 0 0 2px rgba(38,103,255,.1); }
    .budget-range input::placeholder { color: var(--muted); opacity: 1; }
    .range-separator { color: var(--muted); font-size: 13px; white-space: nowrap; }
    .notification-list { display: grid; gap: 9px; max-height: 420px; overflow: auto; }
    .notification-load-more { padding: 9px 0 3px; color: var(--muted); font-size: 12px; text-align: center; }
    .notification-card { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 11px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; color: var(--text); }
    .notification-card:hover { border-color: var(--brand); background: #f8fbff; }
    .notification-card.is-read { background: #f8fafc; color: #627084; }
    .notification-card.is-read .notification-icon { background: #edf1f5; color: #7a8798; }
    .notification-card.is-read:hover { border-color: #aab9ca; background: #f3f6f9; }
    .notification-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
    .notification-card strong { display: block; }
    .notification-card p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
    .notification-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
    .developer-hint { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-bottom: 10px; border: 1px solid #c8e0ff; border-radius: 10px; background: #f4f8ff; color: #24415f; padding: 10px 11px; }
    .developer-hint strong { display: block; margin-bottom: 3px; color: var(--brand-dark); }
    .developer-hint p { margin: 0; color: #4f6680; font-size: 12px; line-height: 1.55; }
    .developer-hint button { border: 0; background: transparent; color: var(--muted); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }
    .developer-hint button:hover { background: #e5f0ff; color: var(--brand-dark); }
    .flow-viewer { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; max-height: calc(100vh - 220px); }
    .flow-canvas { transform-origin: top left; width: fit-content; min-width: 100%; }
    .check-row { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); padding: 8px 0; }
    .check-row:last-child { border-bottom: 0; }
    .check-row input { width: 16px; height: 16px; }
    .permission-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .permission-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 56px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); padding: 11px 12px; }
    .permission-choice input { width: 16px; height: 16px; margin-top: 2px; }
    .permission-choice span { display: grid; gap: 2px; }
    .permission-choice small { color: var(--muted); font-size: 12px; }
    .assign-validity-date { display: none; }
    .assign-validity-date.active { display: grid; }
    .login-status { min-height: 22px; margin-top: 8px; color: var(--muted); }
    .login-status.error { color: var(--red); }
    .login-status.success { color: var(--green); }
    .ai-hero {
      position: relative;
      overflow: hidden;
      color: #fff;
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 16px;
      box-shadow: var(--shadow);
      padding: 18px;
      background:
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(135deg, #123050 0%, #174f9f 48%, #0b8ea8 100%);
      background-size: 24px 24px, 24px 24px, auto;
    }
    .ai-hero h1 { margin: 8px 0 8px; font-size: 26px; }
    .ai-hero p { margin: 0; color: rgba(255,255,255,.78); }
    .ai-hero .tag { background: rgba(255,255,255,.16); color: #fff; }
    .ai-command {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
      gap: 14px;
      align-items: stretch;
    }
    .ai-action {
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 12px;
      background: rgba(255,255,255,.1);
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .ai-action strong { display: block; }
    .ai-action span { color: rgba(255,255,255,.72); font-size: 12px; }
    .ai-action .btn { width: fit-content; border-color: rgba(255,255,255,.35); background: #fff; color: var(--brand-dark); }
    .signal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .signal-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: linear-gradient(180deg, #fff, #f9fcff);
      padding: 12px;
    }
    .signal-card strong { display: block; margin-bottom: 4px; }
    .pipeline {
      display: grid;
      grid-template-columns: repeat(6, minmax(120px, 1fr));
      gap: 10px;
      overflow: auto;
      padding-bottom: 2px;
    }
    .stage-card {
      min-height: 126px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--soft);
      padding: 10px;
    }
    .stage-card h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 13px; }
    .stage-card .deal {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      padding: 8px;
      margin-top: 8px;
      cursor: pointer;
    }
    .stage-card .deal:hover { border-color: var(--brand); }
    .ai-pill { background: var(--cyan-soft); color: var(--cyan); }
    .dashboard-heading { align-items: center; margin-bottom: 0; }
    .dashboard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
    .dashboard-period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .dashboard-period select, .dashboard-period input { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 8px 10px; color: var(--text); }
    .dashboard-filter-panel { padding-top: 10px; padding-bottom: 8px; }
    .dashboard-filter-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 0; border-top: 0; min-height: 0; }
    .dashboard-filter-row .top-context-controls { flex-wrap: nowrap; overflow-x: auto; }
    .dashboard-filter-row .context-control { flex: 0 0 auto; }
    .dashboard-filter-row .period-control select { min-width: 74px; }
    .dashboard-stat-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
    .stat-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; }
    .stat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .stat-panel-head h2 { margin: 0; font-size: 15px; }
    .stat-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .stat-list.demand { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .stat-panel-head .period-compare { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
    .mini-stat small .stat-change { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; color: #9aa7b5; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .mini-stat small .stat-change.up .stat-change-arrow,
    .mini-stat small .stat-change.up .stat-change-value { color: var(--green); }
    .mini-stat small .stat-change.down .stat-change-arrow,
    .mini-stat small .stat-change.down .stat-change-value { color: var(--red); }
    .mini-stat small .stat-change.flat .stat-change-arrow,
    .mini-stat small .stat-change.flat .stat-change-value { color: #9aa7b5; }
    .mini-stat small .stat-change .stat-change-arrow { font-size: 10px; line-height: 1; }
    .knowledge-policy-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; justify-content: stretch; gap: 6px; width: 100%; white-space: nowrap; }
    .requirements-doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
    .requirements-doc { min-width: 0; }
    .requirements-doc h2 { margin-bottom: 10px; font-size: 16px; }
    .requirements-doc ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
    .requirements-doc-full { display: grid; gap: 12px; }
    .requirements-doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .requirements-doc-toolbar p { margin: 0; color: var(--muted); }
    .requirements-doc-markdown { max-height: 68vh; overflow: auto; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; color: #26384b; font: 13px/1.75 "Microsoft YaHei", Arial, sans-serif; white-space: pre-wrap; word-break: break-word; }
    @media (max-width: 980px) { .requirements-doc-grid { grid-template-columns: 1fr; } }
    .mini-stat { border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 9px 10px; min-height: 68px; }
    button.mini-stat { text-align: left; cursor: pointer; color: var(--text); font-family: inherit; }
    button.mini-stat:hover { border-color: var(--brand); background: #f7fbff; }
    .mini-stat span { display: block; color: var(--muted); font-size: 12px; }
    .mini-stat strong { display: block; margin-top: 3px; font-size: 20px; }
    .mini-stat small { display: block; margin-top: 2px; color: var(--muted); line-height: 1.35; }
    .bar-chart { display: grid; gap: 11px; }
    .source-city-list { max-height: 286px; overflow: auto; padding-right: 4px; }
    .deal-rank-list { display: grid; gap: 8px; }
    .deal-rank-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 48px; gap: 10px; align-items: center; min-height: 58px; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 8px 10px; }
    .deal-rank-row:hover { border-color: #b9d2f2; background: #fbfdff; }
    .rank-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 5px 12px rgba(31, 45, 61, .12); }
    .rank-mark { position: relative; }
    .rank-1 { background: linear-gradient(135deg, #f0b429, #f6d365); color: #5a3b00; }
    .rank-2 { background: linear-gradient(135deg, #8fa7c2, #d8e2ec); color: #314154; }
    .rank-3 { background: linear-gradient(135deg, #c27a46, #f0b27a); color: #4c2910; }
    .rank-4 { background: #dcecff; color: #245b96; box-shadow: none; }
    .rank-5 { background: #e7e2ff; color: #5542a1; box-shadow: none; }
    .deal-rank-content { min-width: 0; }
    .deal-rank-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
    .deal-rank-title strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
    .deal-rank-title span { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
    .rank-progress-line { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; align-items: center; margin-top: 7px; }
    .rank-progress { height: 7px; border-radius: 999px; background: #eaf0f7; overflow: hidden; }
    .rank-progress-fill { height: 100%; min-width: 7px; border-radius: inherit; }
    .rank-fill-1 { background: #e5a617; }
    .rank-fill-2 { background: #7394b5; }
    .rank-fill-3 { background: #c27a46; }
    .rank-fill-4 { background: #65a9e8; }
    .rank-fill-5 { background: #8d7bd6; }
    .deal-rank-share { color: var(--muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
    .deal-rank-value { text-align: right; }
    .deal-rank-value strong { display: block; color: var(--brand-dark); font-size: 18px; line-height: 1; }
    .deal-rank-value span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
    .bar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 42px; align-items: center; gap: 10px; }
    .bar-label { color: var(--text); font-weight: 600; }
    .bar-track { height: 10px; border-radius: 999px; background: #e6edf6; overflow: hidden; }
    .bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--cyan)); }
    .bar-value { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
    .dashboard-chart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
    .ratio-main { display: flex; justify-content: space-between; gap: 14px; align-items: flex-end; margin-bottom: 12px; }
    .big-percent { display: block; font-size: 34px; line-height: 1; font-weight: 800; color: var(--brand-dark); }
    .ratio-note { color: var(--muted); font-size: 12px; }
    .donut-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; }
    .donut-chart { position: relative; width: 154px; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 8px 20px rgba(20,38,60,.08); }
    .donut-chart::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--line); }
    .donut-center { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; text-align: center; pointer-events: none; }
    .donut-center strong { display: block; font-size: 28px; line-height: 1; color: var(--brand-dark); }
    .donut-center span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
    .chart-breakdown { display: grid; gap: 10px; }
    .chart-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 72px; align-items: center; gap: 10px; }
    .chart-label { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .chart-track { height: 10px; border-radius: 999px; background: #e6edf6; overflow: hidden; }
    .chart-fill { height: 100%; border-radius: inherit; background: var(--brand); }
    .chart-fill.converted, .legend-dot.converted { background: #6b8f9e; }
    .chart-fill.pending, .legend-dot.pending { background: #cbd4df; }
    .chart-value { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
    .stacked-bar { display: flex; height: 16px; border-radius: 999px; background: #e6edf6; overflow: hidden; margin-bottom: 10px; }
    .stacked-segment { min-width: 4%; height: 100%; }
    .stacked-paid { background: linear-gradient(90deg, var(--green), var(--cyan)); }
    .stacked-unpaid { background: #d8e3ef; }
    .source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
    .source-card { border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 10px; text-align: left; display: grid; gap: 4px; color: var(--text); }
    .source-card:hover { border-color: var(--brand); background: #f7fbff; }
    .followup-more-wrap { display: grid; gap: 8px; margin-top: 12px; }
    .followup-more-wrap > .btn { justify-self: start; }
    .followup-more-panel { display: none; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
    .followup-more-panel.active { display: grid; }
    .followup-more-panel .source-grid { margin-top: 0; }
    .followup-more-panel .voice-assist { margin-top: 0; }
    .followup-normal-fields { margin-bottom: 0; }
    .followup-bottom-actions { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; margin: 0 !important; padding: 12px 2px 0; border-top: 1px solid var(--line); background: var(--surface); }
    .batch-followup-modal { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; height: 100%; min-height: 0; overflow: hidden; }
    .batch-followup-fixed-head { display: grid; gap: 10px; }
    .batch-followup-fixed-head .form-grid { grid-template-columns: minmax(0, 1fr); }
    .batch-selected-summary { color: var(--muted); font-size: 13px; line-height: 1.4; }
    .batch-selected-summary strong { color: var(--brand-dark); font-size: 15px; }
    .batch-followup-fixed-head textarea { min-height: 72px; max-height: 86px; }
    .batch-followup-list { min-height: 0; max-height: none; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
    .batch-followup-attachment-module { margin-top: 2px; }
    .batch-followup-attachment-module .followup-attachment-dropzone { border-color: var(--brand); background: #f6f9ff; }
    .batch-followup-table { width: 100%; min-width: 620px; table-layout: fixed; }
    .batch-followup-table th { position: sticky; top: 0; z-index: 1; }
    .batch-followup-table td, .batch-followup-table th { padding: 8px 10px; }
    .batch-followup-table .check-cell { width: 40px; text-align: center; }
    .batch-followup-table .muted-cell { color: var(--muted); }
    .batch-followup-table th:nth-child(2), .batch-followup-table td:nth-child(2) { width: 30%; }
    .batch-followup-table th:nth-child(3), .batch-followup-table td:nth-child(3) { width: 17%; }
    .batch-followup-table th:nth-child(4), .batch-followup-table td:nth-child(4) { width: 17%; }
    .batch-followup-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 9px 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: #fff; color: var(--muted); font-size: 12px; }
    .batch-pagination-controls { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
    .batch-pagination-controls select, .batch-pagination-controls input { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 4px 7px; }
    .batch-pagination-controls select { min-width: 60px; }
    .batch-pagination-controls input { width: 54px; text-align: center; }
    .batch-pagination-controls .btn { min-width: 32px; min-height: 32px; padding: 4px 8px; }
    .batch-pagination-controls .page-current { border-color: var(--brand); background: var(--brand); color: #fff; }
    .batch-followup-fixed-foot { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 2px; background: #fff; }
    .batch-followup-fixed-foot .form-actions { margin-top: 0; }
    .voice-assist { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 12px; margin-top: 12px; }
    .live-box { border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; padding: 11px; display: grid; gap: 8px; }
    .live-box textarea { min-height: 72px; }
    .live-status { color: var(--brand-dark); font-weight: 700; }
    .case-preview { min-height: 260px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, #102b46, #126b7d); color: #fff; padding: 22px; display: grid; align-content: space-between; overflow: hidden; }
    .case-preview h2 { color: #fff; margin: 0; font-size: 28px; }
    .case-preview p { margin: 8px 0; color: rgba(255,255,255,.82); }
    .case-preview .case-name { font-size: 34px; font-weight: 800; }
    .case-preview .case-footer { display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.72); font-size: 12px; }
    .info-section { display: grid; gap: 10px; margin-bottom: 14px; }
    .info-section:last-child { margin-bottom: 0; }
    .info-section h3 { margin: 0; font-size: 14px; color: var(--brand-dark); }
    .table-actions { text-align: center; white-space: nowrap; }
    .workbench-lists { align-items: stretch; }
    .grid-2.workbench-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .workbench-lists .panel { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
    .workbench-todo-list { display: grid; align-content: start; gap: 10px; }
    .workbench-todo-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 64px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 9px 12px; color: var(--text); }
    .workbench-todo-item:hover { border-color: var(--brand); background: #f7fbff; }
    .workbench-todo-main { min-width: 0; display: grid; gap: 4px; }
    .workbench-todo-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.45; }
    .workbench-todo-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 12px; line-height: 1.4; }
    .workbench-todo-side { display: grid; justify-items: end; min-width: 64px; }
    .todo-filter-bar { display: grid; grid-template-columns: 240px 148px 148px 190px minmax(286px, 300px) 52px; align-items: center; column-gap: 10px; row-gap: 8px; min-width: max-content; overflow-x: auto; overflow-y: hidden; }
    .todo-filter-bar .search-field,
    .todo-filter-bar .field,
    .todo-filter-bar .range-field { width: auto; min-width: 0; }
    .todo-filter-bar .range-field { flex: none; }
    .todo-filter-bar .range-inputs input { flex: 1 1 0; min-width: 0; width: 0; }
    .todo-filter-bar .range-inputs .date-placeholder-wrap { flex: 1 1 0; min-width: 0; }
    .todo-filter-bar .range-inputs .date-placeholder-wrap > input { width: 100%; }
    .todo-filter-bar > .btn { grid-column: 6; min-width: 52px; width: 52px; flex: none; margin-left: 0; white-space: nowrap; }
    .todo-filter-bar .range-field + .btn { margin-left: 0; }
    #todoMetrics { gap: 10px; }
    #todoMetrics .metric { padding: 10px 14px; }
    #todoMetrics .metric strong { margin-top: 2px; font-size: 24px; }
    .todo-view-switch { display: flex; align-items: center; justify-content: flex-start; gap: 18px; padding: 8px 10px; }
    .todo-view-switch > .btn.primary { flex: 0 0 auto; }
    .todo-view-switch .segmented-control { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
    .todo-view-switch .segmented-control .btn { min-width: 86px; padding: 7px 10px; border-color: transparent; background: transparent; }
    .todo-view-switch .segmented-control .btn.active { border-color: var(--brand); background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(20,38,60,.08); }
    .todo-view-switch .small { margin-left: auto; }
    .todo-calendar-panel { grid-column: 1 / -1; width: 100%; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 14px; overflow: hidden; }
    .route.list-page .todo-calendar-panel.is-hidden,
    .route.list-page .todo-list-panel.is-hidden { display: none; }
    .todo-calendar-main, .todo-calendar-detail { width: 100%; min-width: 0; min-height: 0; }
    .todo-calendar-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
    .todo-calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; }
    .todo-calendar-toolbar h2 { margin: 0; font-size: 17px; }
    .todo-calendar-toolbar .actions { flex-wrap: nowrap; }
    .todo-calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; color: var(--muted); font-size: 12px; text-align: center; }
    .todo-calendar-week span { padding: 4px 2px; }
    .todo-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(94px, 1fr); gap: 6px; min-height: 0; overflow: auto; padding-right: 2px; }
    .todo-calendar-day { min-width: 0; min-height: 94px; display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); text-align: left; overflow: hidden; cursor: pointer; pointer-events: auto; }
    .todo-calendar-day:hover { border-color: var(--brand); background: #f8fbff; }
    .todo-calendar-day.outside-month { background: #fafbfd; color: #a4afbc; }
    .todo-calendar-day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px rgba(47,111,237,.16); }
    .todo-calendar-day.selected { background: var(--brand-soft); border-color: var(--brand); }
    .todo-calendar-date { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-weight: 700; font-size: 13px; }
    .todo-calendar-count { min-width: 19px; height: 19px; display: inline-grid; place-items: center; border-radius: 999px; background: #eaf1f9; color: var(--brand-dark); font-size: 11px; }
    .todo-calendar-items { min-width: 0; display: grid; gap: 3px; overflow: hidden; }
    .todo-calendar-item { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 5px; border-radius: 5px; background: #f3f6f9; color: #405165; font-size: 11px; line-height: 1.35; }
    .todo-calendar-item.overdue { background: var(--red-soft); color: var(--red); }
    .todo-calendar-item.done { background: #f4f5f6; color: #9aa4ae; text-decoration: line-through; }
    .todo-calendar-more { color: var(--muted); font-size: 11px; }
    .todo-calendar-detail { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; border-left: 1px solid var(--line); padding-left: 14px; overflow: hidden; }
    .todo-calendar-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 10px; }
    .todo-calendar-detail-head h3 { margin: 0; font-size: 15px; }
    .todo-calendar-detail-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
    .todo-calendar-detail-list { min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-content: start; gap: 8px; overflow: auto; padding-right: 3px; }
    .todo-calendar-detail-item { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
    .todo-calendar-detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
    .todo-calendar-detail-title strong { min-width: 0; line-height: 1.45; }
    .todo-calendar-detail-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: 12px; }
    .todo-calendar-detail-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
    .customer-status-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .plan-preview-shell { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 22px; overflow: hidden; background: #fff; }
    .plan-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: rgba(47,111,237,.08); font-size: 42px; font-weight: 800; transform: rotate(-24deg); white-space: nowrap; }
    .template-file-note { color: var(--muted); font-size: 12px; }
    .selection-cell { width: 42px; text-align: center; }
    .selection-cell input,
    #customerSelectAll { width: 16px; height: 16px; margin: 0; cursor: pointer; vertical-align: middle; }
    .pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; }
    .pagination-summary { color: var(--muted); font-size: 13px; }
    .pagination-controls { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
    .pagination-controls select, .pagination-controls input { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 4px 7px; }
    .pagination-controls input { width: 54px; text-align: center; }
    .pagination-controls .btn { min-width: 32px; min-height: 32px; padding: 4px 8px; }
    .pagination-controls .page-current { border-color: var(--brand); background: var(--brand); color: #fff; }
    .platform-modal { width: min(560px, 100%); padding: 20px; }
    .platform-modal .modal-head { align-items: center; padding-bottom: 16px; }
    .platform-modal .modal-head h2 { font-size: 20px; }
    .platform-switch-list { display: grid; gap: 10px; padding-top: 2px; }
    .platform-option { width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); padding: 13px 14px; text-align: left; }
    .platform-option:hover { border-color: var(--brand); background: #f7fbff; }
    .platform-option.current { border-color: #b7d5ff; background: #f5f9ff; }
    .platform-option-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800; letter-spacing: .4px; }
    .platform-option.current .platform-option-icon { background: var(--brand); color: #fff; }
    .platform-option-title { min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.4; }
    .send-success { display: grid; justify-items: center; gap: 10px; padding: 18px 8px 8px; text-align: center; }
    .send-success-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 34px; font-weight: 700; }
    .send-success h3 { margin: 0; font-size: 18px; }
    .send-success p { max-width: 500px; margin: 0; color: var(--muted); }
    .send-success-meta { width: min(100%, 480px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 2px; text-align: left; }
    .plan-detail-shell { display: grid; gap: 14px; }
    .plan-detail-top { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 14px; align-items: start; }
    .plan-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .plan-meta-card { border: 1px solid var(--line); border-radius: 10px; background: var(--soft); padding: 10px; }
    .plan-meta-card span { display: block; color: var(--muted); font-size: 12px; }
    .plan-meta-card strong { display: block; margin-top: 4px; font-size: 14px; }
    .plan-document { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 16px; }
    .plan-document h3 { margin: 0 0 10px; color: var(--brand-dark); }
    .plan-document h4 { margin: 14px 0 6px; font-size: 14px; }
    .plan-document p { margin: 0; color: #405165; line-height: 1.75; }
    .plan-action-bar { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
    .plan-action-bar .plan-action-status { margin-right: auto; align-self: center; color: var(--muted); font-size: 12px; }
    .modal.plan-audit-modal { width: min(760px, 100%); padding: 20px; }
    .plan-audit-modal .modal-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
    .plan-audit-modal .modal-head h2 { font-size: 20px; }
    .plan-audit-shell { display: grid; gap: 16px; }
    .plan-audit-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .plan-audit-card { min-width: 0; min-height: 64px; display: flex; flex-direction: column; justify-content: center; border: 1px solid #d5e2f2; border-radius: 10px; background: #f5f8fc; padding: 10px; }
    .plan-audit-card span { color: #66788e; font-size: 12px; line-height: 1.3; }
    .plan-audit-card strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1d334d; font-size: 14px; }
    .plan-audit-field { display: grid; gap: 7px; }
    .plan-audit-field label { color: #66788e; font-size: 12px; }
    .plan-audit-field textarea { min-height: 92px; border-color: #d5e2f2; border-radius: 9px; padding: 10px; resize: vertical; }
    .plan-audit-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
    .plan-audit-actions .btn { min-width: 80px; min-height: 38px; }
    .plan-audit-actions .btn.danger { color: #e5484d; border-color: #ffc5c8; background: #fff7f7; }
    .business-record-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 12px; align-items: start; }
    .record-stack { display: grid; gap: 12px; }
    .record-block { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; }
    .record-block h3 { margin: 0 0 10px; font-size: 14px; color: var(--brand-dark); }
    .record-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .record-block-head h3 { margin: 0; }
    .followup-timeline { display: grid; gap: 8px; max-height: 520px; overflow: auto; padding-right: 4px; }
    .followup-load-state { min-height: 88px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px dashed #cfdeee; border-radius: 8px; background: #fbfdff; color: var(--muted); font-size: 13px; }
    .followup-load-state.is-error { flex-wrap: wrap; }
    .followup-load-state.is-error .btn { min-height: 30px; padding: 4px 10px; }
    .followup-item { position: relative; border-left: 3px solid var(--brand); background: #f4f7fb; border-radius: 6px; padding: 10px 10px 34px; color: #405165; font-size: 12px; line-height: 1.5; }
    .followup-item.clickable { cursor: pointer; transition: background-color .16s ease, box-shadow .16s ease; }
    .followup-item.clickable:hover { background: #edf4fb; box-shadow: 0 2px 10px rgba(32, 63, 94, .08); }
    .followup-item.clickable:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
    .followup-item .followup-record-title { display: block; margin: 0 0 5px; color: #071d35; font-size: 14px; line-height: 1.45; }
    .followup-record-owner { color: #60758c; }
    .followup-item .followup-record-content { margin: 7px 0 0; color: #20364d; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
    .followup-item .followup-annotations { margin: 0; }
    .followup-record-summary { margin-top: 7px; padding-top: 7px; border-top: 1px solid #dfe8f2; color: #60758c; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
    .followup-record-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; padding-right: 58px; }
    .followup-record-count { padding: 0; border: 0; background: transparent; color: #60758c; font: inherit; font-size: 11px; line-height: 1.5; cursor: pointer; }
    .followup-record-count:hover { color: var(--brand); }
    .followup-record-footer .btn { min-height: 22px; padding: 1px 6px; font-size: 10px; }
    .followup-activity-details { display: grid; gap: 3px; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
    .followup-activity-details span { color: var(--text); overflow-wrap: anywhere; }
    .followup-activity-files { display: grid; gap: 4px; margin-top: 5px; }
    .followup-activity-file { width: fit-content; max-width: 100%; padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 12px; text-align: left; text-decoration: underline; overflow-wrap: anywhere; cursor: pointer; }
    .crm-followup-link { color: var(--brand); }
    .followup-annotations { display: grid; gap: 5px; }
    .followup-annotations-head { position: absolute; right: 9px; bottom: 7px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
    .followup-annotations-title { margin-right: auto; color: var(--muted); font-size: 11px; }
    .followup-annotations-head .btn { min-height: 24px; padding: 2px 7px; font-size: 11px; }
    .followup-annotation { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 8px; min-height: 30px; padding: 5px 8px; border-left: 2px solid #c7d4e3; background: #f7f9fc; }
    .followup-annotation-meta { grid-column: 1; grid-row: 1; color: var(--muted); font-size: 10px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .followup-annotation-content { grid-column: 1 / -1; grid-row: 2; margin: 0; color: #405165; font-size: 11px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
    .followup-annotation-actions { grid-column: 2; grid-row: 1; display: inline-flex; gap: 6px; flex: 0 0 auto; justify-self: end; }
    .crm-followup-next { display: grid; gap: 2px; margin-left: 46px; padding: 9px 10px; border: 1px solid #6894ff; border-radius: 16px; color: #333; font-size: 12px; }
    .crm-followup-next strong { display: inline; margin: 0; color: #333; }
    .crm-followup-next > div:first-child span { color: #2f6fed; font-weight: 600; }
    .crm-followup-next-content { padding-left: 52px; color: #777; }
    .proposal-template-preview { position: relative; width: 100%; max-width: 100%; max-height: calc(100vh - 220px); box-sizing: border-box; overflow-x: hidden; overflow-y: auto; padding: 18px; background: #edf0f3; border: 1px solid var(--line); border-radius: 10px; }
    .proposal-document { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; margin: 0 auto; color: #202833; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; line-height: 1.72; }
    #proposalPreviewDoc, #proposalPreviewDoc > * { max-width: 100%; min-width: 0; box-sizing: border-box; }
    .proposal-preview-to-top { position: sticky; top: auto; bottom: 14px; z-index: 12; display: grid; width: 36px; height: 36px; margin: 0 0 -36px auto; place-items: center; border: 1px solid #d6b965; border-radius: 6px; background: rgba(255,255,255,.96); color: #1A2740; box-shadow: 0 5px 14px rgba(20,38,60,.16); cursor: pointer; }
    .proposal-preview-to-top:hover { background: #fffaf0; color: #9b7927; }
    .proposal-preview-to-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .crm-agent-embed-preview { position: relative; padding: 0; overflow: hidden; background: #f4f6f8; }
    .crm-agent-embed-preview.is-loading { min-height: calc(100vh - 245px); }
    .crm-agent-embed-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; min-height: 240px; color: #52616c; background: #f4f6f8; font-size: 13px; }
    .crm-agent-embed-preview:not(.is-loading) .crm-agent-embed-loading { display: none; }
    .crm-agent-embed-preview.is-error .crm-agent-embed-loading { display: grid; }
    .crm-agent-embed-preview.is-loading .crm-agent-proposal-embed { opacity: 0; }
    .crm-agent-embed-preview.is-error .crm-agent-proposal-embed { opacity: 0; }
    .crm-agent-proposal-embed { display: block; width: 100%; min-height: 70dvh; height: 70dvh; border: 0; background: #f4f6f8; }
    .source-proposal-preview { padding: 16px; }
    .source-proposal-document { width: min(707px, 100%); }
    .source-proposal-page { margin: 0 0 16px; padding: 0; background: #fff; box-shadow: 0 8px 22px rgba(31, 41, 51, .12); }
    .source-proposal-page:last-child { margin-bottom: 0; }
    .source-proposal-page img { display: block; width: 100%; height: auto; }
    .proposal-document.preview-editing { outline: 2px solid rgba(47,111,237,.35); outline-offset: 8px; background: #fff; }
    .proposal-document.preview-editing * { cursor: text; }
    .proposal-document.preview-editing .proposal-table { outline: 1px dashed rgba(47,111,237,.35); outline-offset: 3px; }
    .proposal-table-tools { display: flex; align-items: center; gap: 6px; margin: 12px 0 8px; padding: 7px 8px; border: 1px solid #cfe0f5; border-radius: 8px; background: #f7fbff; color: #405165; font-size: 12px; }
    .proposal-table-tools strong { margin-right: auto; color: var(--brand-dark); font-size: 12px; }
    .proposal-table-tools .btn { min-height: 26px; padding: 3px 7px; font-size: 12px; }
    .proposal-table-cell-active { outline: 2px solid var(--brand); outline-offset: -2px; background: #f3f8ff !important; }
    .source-proposal-edit-panel { margin-top: 18px; padding: 18px 20px; background: #fff; border: 1px solid #d8e2ec; border-radius: 8px; box-shadow: 0 5px 14px rgba(31, 41, 51, .08); }
    .source-proposal-edit-panel h3 { margin: 0 0 8px; color: #253242; font-size: 15px; }
    .source-proposal-editable { min-height: 96px; padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; color: #202833; white-space: pre-wrap; line-height: 1.7; }
    .proposal-document.preview-editing .source-proposal-editable { border-color: #b9d2ed; background: #fbfdff; outline: none; }
    .proposal-preview-toolbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 12px; padding: 10px 0; background: #edf0f3; }
    .proposal-preview-toolbar .small { margin-right: auto; }
    .plan-prompt-adjustment { display: grid; grid-template-columns: minmax(0, .9fr) minmax(300px, 1.1fr); gap: 12px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #d8e2ee; border-radius: 10px; background: #fff; }
    .plan-prompt-adjustment.readonly { display: block; }
    .plan-prompt-readonly { display: flex; align-items: center; gap: 9px; min-height: 38px; color: var(--muted); font-size: 12px; }
    .plan-prompt-readonly strong { color: var(--text); font-size: 13px; }
    .plan-prompt-editor, .plan-prompt-history { min-width: 0; display: grid; gap: 10px; align-content: start; }
    .plan-prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .plan-prompt-head strong { color: var(--text); font-size: 14px; }
    .plan-prompt-status { color: var(--muted); font-size: 12px; }
    .plan-prompt-input-wrap { position: relative; display: grid; }
    .plan-prompt-input-wrap textarea { height: 92px; min-height: 92px; max-height: 92px; padding: 10px 88px 10px 11px; resize: none; border-color: #e3eaf2; }
    .plan-prompt-input-wrap textarea:focus { border-color: #d2deea; box-shadow: 0 0 0 2px rgba(39, 116, 184, .06); }
    .plan-prompt-input-actions { position: absolute; right: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 6px; }
    .plan-prompt-tool, .plan-prompt-send { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; padding: 0; cursor: pointer; }
    .plan-prompt-tool { background: #eef3f8; color: #64748b; }
    .plan-prompt-tool:hover, .plan-prompt-tool.listening { background: #e0ecfb; color: var(--brand-dark); }
    .plan-prompt-tool:disabled { opacity: .55; cursor: not-allowed; }
    .plan-prompt-send { background: var(--brand); color: #fff; }
    .plan-prompt-send:hover { background: var(--brand-dark); }
    .plan-prompt-send:disabled { background: #cbd5df; color: #fff; cursor: not-allowed; }
    .plan-prompt-tool svg, .plan-prompt-send svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .plan-prompt-result { display: grid; gap: 8px; padding: 10px; border: 1px solid #dbe5ef; border-radius: 8px; background: #f8fafc; }
    .plan-prompt-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .plan-prompt-result-box { min-height: 86px; max-height: 156px; overflow: auto; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #405165; line-height: 1.6; white-space: pre-wrap; }
    .plan-prompt-records { height: 92px; max-height: 92px; min-width: 0; overflow-y: auto; overflow-x: hidden; display: grid; align-content: start; gap: 6px; padding-right: 2px; }
    .plan-prompt-record { display: grid; gap: 4px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbfd; }
    .plan-prompt-record.active { border-color: #b8d3f6; background: #f3f8ff; }
    .plan-prompt-record-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
    .plan-prompt-record-title strong { min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: normal; font-size: 13px; line-height: 1.45; }
    .plan-prompt-meta { color: var(--muted); font-size: 12px; line-height: 1.55; }
    .plan-prompt-actions { display: none; }
    @media (max-width: 980px) {
      .plan-prompt-adjustment { grid-template-columns: 1fr; }
      .plan-prompt-result-grid { grid-template-columns: 1fr; }
    }
    .proposal-sheet { position: relative; min-height: 1120px; margin-bottom: 18px; padding: 52px 62px 60px; background: #fff; border: 1px solid #d8dde3; box-shadow: 0 14px 36px rgba(31, 41, 51, 0.07); }
    .proposal-cover { display: grid; grid-template-rows: auto minmax(250px, 1fr) auto auto; min-height: 1120px; padding: 58px 62px 48px; overflow: hidden; background: linear-gradient(180deg, #182231 0 292px, #fff 292px 100%); isolation: isolate; }
    .proposal-cover::before { content: ""; position: absolute; top: 0; right: 0; width: 430px; height: 292px; background: repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 1px, transparent 1px 22px); clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); opacity: .58; }
    .proposal-cover::after { content: ""; position: absolute; z-index: 0; right: 34px; bottom: 34px; width: 250px; height: 170px; border-right: 14px solid #edf1f5; border-bottom: 14px solid #edf1f5; opacity: .9; pointer-events: none; }
    .proposal-brand-line { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; color: #fff; }
    .proposal-brand-left { display: flex; align-items: center; gap: 14px; }
    .proposal-brand-logo { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.36); background: rgba(255,255,255,.08); font-size: 22px; font-weight: 800; letter-spacing: 1px; }
    .proposal-brand-name strong { display: block; font-size: 22px; line-height: 1.25; }
    .proposal-brand-name span { display: block; margin-top: 4px; color: rgba(255,255,255,.68); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
    .proposal-cover-code { color: rgba(255,255,255,.72); font-size: 12px; letter-spacing: 2px; }
    .proposal-cover-main { position: relative; z-index: 1; align-self: center; max-width: 820px; margin: 64px 0 34px; }
    .proposal-cover-main::before { content: ""; display: block; width: 82px; height: 4px; margin-bottom: 32px; background: #182231; }
    .proposal-cover-main h1 { max-width: 760px; margin: 0 0 14px; color: #182231; font-size: 48px; line-height: 1.22; letter-spacing: 0; }
    .proposal-client-line { margin-bottom: 22px; color: #3f4d5d; font-size: 20px; letter-spacing: 1px; }
    .proposal-en-title { color: #9aa3ad; font-size: 14px; letter-spacing: 3px; }
    .proposal-fields { position: relative; z-index: 1; width: min(620px, 100%); margin: 0; border-top: 1px solid #d8dde3; border-bottom: 1px solid #d8dde3; padding: 20px 0 6px; }
    .proposal-field { display: grid; grid-template-columns: 150px 1fr; align-items: center; margin-bottom: 14px; }
    .proposal-field-name { color: #7d858e; font-size: 14px; }
    .proposal-field-value { min-height: 30px; padding: 3px 0; color: #182231; font-weight: 700; }
    .proposal-confidential { position: relative; z-index: 1; margin: 30px 0 0; padding-top: 16px; border-top: 1px solid #edf1f5; color: #989fa7; font-size: 13px; letter-spacing: 1px; }
    .kyc-preview { display: grid; gap: 14px; }
    .kyc-preview-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 15px 16px; border: 1px solid #cfe0f5; border-radius: 12px; background: linear-gradient(135deg, #f8fbff, #eef7fb); }
    .kyc-preview-head h3 { margin: 8px 0 4px; color: var(--brand-dark); font-size: 17px; }
    .kyc-preview-head p { margin: 0; color: var(--muted); font-size: 12px; }
    .kyc-preview-meta { flex: 0 0 auto; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: right; }
    .kyc-preview-section { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; }
    .kyc-preview-section h4 { margin: 0 0 10px; color: var(--brand-dark); font-size: 14px; }
    .customer-kyc-scope { display: grid; gap: 10px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
    .customer-kyc-scope-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
    .customer-kyc-scope-head strong { color: var(--brand-dark); font-size: 14px; }
    .customer-kyc-scope-head span { color: var(--muted); font-size: 12px; }
    .customer-kyc-demand-tabs { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
    .customer-kyc-demand-tab { flex: 1 1 0; min-width: 0; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 8px 10px; text-align: left; }
    .customer-kyc-demand-tab:hover { border-color: var(--brand); background: var(--brand-soft); }
    .customer-kyc-demand-tab.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 1px rgba(44,111,182,.08); }
    .customer-kyc-demand-tab strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .customer-kyc-demand-tab small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
    .kyc-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .kyc-field { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); padding: 9px; }
    .kyc-field.wide { grid-column: span 2; }
    .kyc-field-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .kyc-field-head > span:first-child { color: var(--muted); font-size: 12px; }
    .kyc-field-head .tag { padding: 2px 6px; font-size: 10px; }
    .kyc-field strong { display: block; margin-top: 5px; color: var(--text); font-size: 13px; line-height: 1.55; word-break: break-word; }
    .kyc-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
    .kyc-check-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
    .kyc-check { display: inline-flex; align-items: center; min-height: 26px; border: 1px solid #d8e2ee; border-radius: 999px; background: #fff; color: #536476; padding: 4px 8px; font-size: 12px; }
    .kyc-check.checked { border-color: #bcd3ef; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
    .kyc-account-table { margin-top: 8px; }
    .kyc-account-table { table-layout: fixed; }
    .kyc-account-table th { background: #eef4fb; color: #405165; }
    .kyc-account-table td { background: #fff; line-height: 1.6; }
    .kyc-account-table th, .kyc-account-table td { white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
    .kyc-account-table th:nth-child(1), .kyc-account-table td:nth-child(1) { width: 8%; }
    .kyc-account-table th:nth-child(2), .kyc-account-table td:nth-child(2) { width: 28%; }
    .kyc-account-table th:nth-child(3), .kyc-account-table td:nth-child(3) { width: 29%; }
    .kyc-account-table th:nth-child(4), .kyc-account-table td:nth-child(4) { width: 35%; }
    .kyc-account-table tbody tr:last-child td { border-bottom: 0; }
    .kyc-pain-list { display: grid; gap: 8px; }
    .kyc-pain-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 9px 10px; }
    .kyc-pain-item .tag { margin-top: 1px; }
    .kyc-pain-item strong { display: block; margin-bottom: 3px; }
    .kyc-pain-item p { margin: 0; color: #405165; line-height: 1.65; }
    .kyc-form-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
    .kyc-analysis-result { margin-bottom: 14px; }
    .kyc-form-table table { border-collapse: collapse; }
    .kyc-form-table th, .kyc-form-table td { border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.75; }
    .kyc-form-table tbody tr:last-child th, .kyc-form-table tbody tr:last-child td { border-bottom: 0; }
    .kyc-form-table th { width: 210px; color: var(--brand-dark); background: #f4f8fc; font-weight: 700; white-space: normal; }
    .kyc-value-line { display: inline-block; min-width: 180px; min-height: 22px; border-bottom: 1px solid #9fb2c8; vertical-align: -2px; }
    .kyc-value-stack { display: grid; gap: 8px; }
    .kyc-value-stack > div { min-height: 24px; }
    .kyc-note { margin-top: 6px; color: var(--muted); font-size: 12px; }
    .kyc-account-table .kyc-value-line, .kyc-account-table .kyc-template-blank { min-width: 120px; }
    .kyc-template-table { border: 1px solid #c8d7e8; border-radius: 8px; overflow: hidden; background: #fff; }
    .kyc-template-table table { border-collapse: collapse; }
    .kyc-template-table th, .kyc-template-table td { border-bottom: 1px solid #d5e1ee; padding: 10px 12px; vertical-align: top; line-height: 1.7; }
    .kyc-template-table tbody tr:last-child th, .kyc-template-table tbody tr:last-child td { border-bottom: 0; }
    .kyc-template-table th { width: 220px; background: #edf4fb; color: #174b83; font-weight: 700; white-space: normal; }
    .kyc-template-table td { color: #173e6c; background: #fff; }
    .kyc-date-input {
      width: 160px;
      min-height: 34px;
      padding: 5px 8px;
      border: 1px solid #9fb2c8;
      border-radius: 6px;
      background: #fff;
      color: #173e6c;
      font: inherit;
      line-height: 1.4;
      vertical-align: middle;
    }
    .kyc-date-input:focus {
      border-color: var(--brand);
      outline: 2px solid rgba(30, 111, 190, 0.14);
      outline-offset: 1px;
    }
    .kyc-sign-row td { width: 50%; }
    .kyc-template-value { display: inline-block; min-width: 72px; min-height: 24px; padding: 0 8px 1px; border-bottom: 1px solid #8ea5bd; color: #173e6c; text-align: center; vertical-align: -3px; }
    .kyc-template-blank { display: inline-block; min-width: 210px; height: 23px; border-bottom: 1px solid #8ea5bd; vertical-align: -3px; }
    .kyc-check-text { display: inline-block; margin-right: 12px; white-space: nowrap; }
    .kyc-pain-point-list { display: grid; gap: 5px; }
    .kyc-pain-point-list .kyc-check-text { display: block; margin-right: 0; white-space: normal; line-height: 1.65; }
    .kyc-pain-point-list .kyc-edit-option { display: flex; align-items: flex-start; margin: 0; line-height: 1.65; }
    .kyc-pain-point-list .kyc-edit-option input { flex: 0 0 auto; margin-top: 5px; }
    .kyc-section-note { color: var(--muted); font-size: 12px; font-weight: 400; }
    .enterprise-background { display: grid; gap: 12px; }
    .enterprise-background-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .enterprise-background-head h3 { margin: 0; color: var(--brand-dark); font-size: 15px; }
    .enterprise-background-head h4 { margin: 0; color: var(--brand-dark); font-size: 15px; }
    .enterprise-background-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
    .enterprise-background-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .enterprise-refresh-button { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; font-size: 0; }
    .enterprise-refresh-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .enterprise-query-status { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 12px; white-space: nowrap; }
    .enterprise-query-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
    .enterprise-layer { display: grid; gap: 9px; }
    .enterprise-layer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
    .enterprise-layer-title { color: var(--brand-dark); font-size: 13px; font-weight: 600; }
    .enterprise-layer-note { color: var(--muted); font-size: 11px; font-weight: 400; }
    .enterprise-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
    .enterprise-summary-item { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); padding: 9px 10px; }
    .enterprise-summary-item span { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
    .enterprise-summary-item strong { display: block; margin-top: 4px; color: var(--text); font-size: 14px; line-height: 1.45; word-break: break-word; }
    .enterprise-summary-item .enterprise-summary-label { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
    .enterprise-summary-item .enterprise-summary-label svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .enterprise-summary-item .enterprise-capital-summary { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; white-space: nowrap; }
    .enterprise-summary-item .enterprise-capital-summary > span { display: inline-flex; align-items: baseline; gap: 5px; margin: 0; color: var(--text); font-size: 14px; }
    .enterprise-summary-item .enterprise-capital-summary > span b { font-size: 13px; }
    .enterprise-summary-item .enterprise-capital-summary > span strong { display: inline; margin: 0; font-size: 14px; white-space: nowrap; }
    .enterprise-summary-item .enterprise-capital-summary > i { width: 1px; height: 20px; background: #b7c9df; }
    .enterprise-industry { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 10px; }
    .enterprise-industry-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .enterprise-industry-title { color: var(--muted); font-size: 12px; }
    .enterprise-view-all-link { border: 0; background: transparent; color: var(--brand); cursor: pointer; padding: 0; font-size: 12px; white-space: nowrap; }
    .enterprise-view-all-link:hover { color: var(--brand-dark); text-decoration: underline; }
    .enterprise-industry-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
    .enterprise-industry-item { border: 1px solid #cfe0f5; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); padding: 5px 9px; font-size: 12px; }
    .enterprise-table { table-layout: fixed; }
    .enterprise-table { min-width: 980px; }
    .enterprise-table th, .enterprise-table td { white-space: normal; word-break: break-word; overflow-wrap: anywhere; vertical-align: top; }
    .enterprise-table th { background: #eef4fb; color: #405165; }
    .enterprise-table th:nth-child(1), .enterprise-table td:nth-child(1) { width: 42px; }
    .enterprise-table th:nth-child(2), .enterprise-table td:nth-child(2) { width: 23%; }
    .enterprise-table th:nth-child(3), .enterprise-table td:nth-child(3) { width: 10%; }
    .enterprise-table th:nth-child(4), .enterprise-table td:nth-child(4) { width: 10%; }
    .enterprise-table th:nth-child(5), .enterprise-table td:nth-child(5) { width: 10%; }
    .enterprise-table th:nth-child(6), .enterprise-table td:nth-child(6) { width: 9%; }
    .enterprise-table th:nth-child(7), .enterprise-table td:nth-child(7) { width: 9%; }
    .enterprise-table th:nth-child(8), .enterprise-table td:nth-child(8) { width: 12%; }
    .enterprise-table th:nth-child(9), .enterprise-table td:nth-child(9) { width: 14%; }
    .enterprise-table th:nth-child(10), .enterprise-table td:nth-child(10) { width: 100px; }
    .enterprise-table .enterprise-name { color: var(--brand-dark); font-weight: 600; }
    .enterprise-list-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
    .enterprise-list-toolbar input { flex: 1 1 260px; min-width: 180px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); outline: 0; padding: 8px 10px; }
    .enterprise-list-toolbar input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(44,111,182,.08); }
    .enterprise-list-note { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
    .enterprise-list-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
    .enterprise-list-modal .table-wrap { max-height: min(52vh, 520px); overflow: auto; }
    .enterprise-list-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
    .enterprise-list-pagination .pagination-summary { color: var(--muted); font-size: 13px; }
    .enterprise-list-pagination .pagination-controls { margin-left: auto; }
    .enterprise-list-pagination .pagination-controls select,
    .enterprise-list-pagination .pagination-controls input { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 4px 7px; }
    .enterprise-list-pagination .pagination-controls select { min-width: 60px; }
    .enterprise-list-pagination .pagination-controls input { width: 54px; text-align: center; }
    .enterprise-list-pagination .pagination-controls .btn { min-width: 32px; min-height: 32px; padding: 4px 8px; }
    .enterprise-list-pagination .pagination-controls .page-current { border-color: var(--brand); background: var(--brand); color: #fff; }
    .enterprise-editor-capital { display: flex; gap: 6px; min-width: 0; }
    .enterprise-editor-capital input { flex: 1 1 calc(100% - 120px); min-width: 0; }
    .enterprise-editor-capital select { flex: 0 0 116px; width: 116px; min-width: 116px; }
    @media (max-width: 980px) {
      .enterprise-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    @media (max-width: 720px) {
      .enterprise-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .enterprise-table { min-width: 720px; }
    }
    .kyc-template-textarea { min-height: 56px; }
    .kyc-template-title { margin: 0 0 10px; color: #174b83; font-size: 16px; font-weight: 700; }
    .kyc-template-subtitle { margin: -4px 0 12px; color: #52708f; font-size: 12px; }
    .kyc-edit-surface.is-editing { outline: 2px solid rgba(47,111,237,.24); border-radius: 10px; background: #fbfdff; }
    .kyc-edit-surface.is-editing .kyc-preview { padding: 4px; }
    .kyc-edit-surface.is-editing [data-kyc-edit-value="true"] { cursor: text; }
    .kyc-edit-surface.is-editing [data-kyc-edit-value="true"]:focus { outline: 2px solid rgba(30,111,190,.14); outline-offset: 1px; }
    .kyc-edit-surface.is-editing [data-kyc-edit-value="true"]:empty::before { content: "\00a0"; }
    .kyc-edit-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
    .kyc-edit-option { display: inline-flex; align-items: center; gap: 4px; margin: 2px 10px 2px 0; color: #173e6c; cursor: pointer; font-weight: 400; }
    .kyc-edit-option input { width: 15px; height: 15px; margin: 0; cursor: pointer; }
    .kyc-edit-option input[type="radio"], .kyc-edit-option input[type="checkbox"] { appearance: none; -webkit-appearance: none; border: 1px solid #8ea5bd; border-radius: 2px; background: #fff; }
    .kyc-edit-option input[type="radio"]:checked, .kyc-edit-option input[type="checkbox"]:checked { border-color: var(--brand); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.7 9 10 3' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 11px no-repeat; }
    .recommend-rule { grid-column: 1 / -1; border: 1px solid #cfe0f5; border-radius: 10px; background: #f7fbff; padding: 12px; }
    .recommend-rule h3 { margin: 0 0 9px; color: var(--brand-dark); font-size: 14px; }
    .recommend-rule table { background: #fff; }
    .proposal-page-head { display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid #d8dde3; color: #9299a1; font-size: 13px; }
    .proposal-section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 42px 0 22px; padding-bottom: 14px; border-bottom: 3px solid #192231; }
    .proposal-section-head h2 { margin: 0; color: #192231; font-size: 24px; line-height: 1.35; }
    .proposal-section-head h2 span { margin-right: 16px; color: #4d555e; font-weight: 400; }
    .proposal-section-en { color: #9ca3ab; font-size: 13px; letter-spacing: 3px; }
    .proposal-subhead { margin: 26px 0 12px; color: #192231; font-size: 18px; font-weight: 700; }
    .proposal-subhead::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: #192231; vertical-align: 2px; }
    .proposal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
    .proposal-table th, .proposal-table td { padding: 12px; border-bottom: 1px solid #d8dde3; text-align: left; vertical-align: top; }
    .proposal-table th { width: 190px; padding-right: 22px; color: #7d858e; font-weight: 400; }
    .proposal-table.service th { color: #fff; background: #192231; font-weight: 700; }
    .proposal-table.service td { border: 1px solid #d8dde3; }
    .proposal-table.service tbody tr:nth-child(even) { background: #f8f9fa; }
    .proposal-demand { margin-top: 26px; padding: 18px 22px; border-left: 4px solid #192231; background: #f5f6f8; }
    .proposal-demand small { display: block; margin-bottom: 8px; color: #9aa1aa; letter-spacing: 2px; }
    .proposal-demand strong { color: #192231; font-size: 17px; }
    .proposal-process { display: grid; gap: 10px; counter-reset: process; }
    .proposal-step { position: relative; padding: 12px 14px 12px 48px; border: 1px solid #d8dde3; background: #f8f9fa; }
    .proposal-step::before { counter-increment: process; content: counter(process, decimal-leading-zero); position: absolute; left: 12px; top: 12px; color: #192231; font-weight: 800; }
    .proposal-fee { margin-top: 18px; padding: 18px 22px; background: #fff8ed; border: 1px solid #ead2aa; color: #463924; }

    /* CRM Agent presentation-pages-v1 parity. Agent owns the page protocol;
       these rules keep the OpsAgent preview on the same presentation canvas
       and palette while still allowing data-heavy pages to grow naturally. */
    .proposal-agent-page {
      --proposal-agent-ink: #1A2740;
      --proposal-agent-gold: #C9A962;
      --proposal-agent-paper: #FFFFFF;
      --proposal-agent-soft: #F5F7FA;
      --proposal-agent-muted: #718097;
      --proposal-agent-border: #D0D8E6;
      box-sizing: border-box;
      aspect-ratio: 16 / 9;
      min-height: 0;
      margin-bottom: 22px;
      padding: 3.25% 5.9% 5.8%;
      overflow: hidden;
      border: 0;
      border-bottom: 3px solid var(--proposal-agent-gold);
      border-radius: 0;
      background: var(--proposal-agent-paper);
      color: var(--proposal-agent-ink);
      font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
      line-height: 1.5;
      box-shadow: 0 8px 22px rgba(31, 41, 51, .12);
    }
    .proposal-layout-fixed_template_image,
    .proposal-layout-sales_profile { padding: 0; }
    .proposal-agent-fixed-image { width: 100%; height: 100%; }
    .proposal-agent-fixed-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
    .plan-editor-grid { gap: 13px 11px; }
    .plan-editor-grid .field { min-width: 0; }
    .plan-editor-grid .field > label { margin-bottom: 6px; }
    .plan-editor-grid .field input,
    .plan-editor-grid .field select { min-height: 39px; }
    .plan-editor-grid .field textarea { min-height: 94px; }
    .plan-editor-grid .field input:disabled { color: #667085; -webkit-text-fill-color: #667085; background: #f2f4f7; cursor: not-allowed; }
    .plan-sales-owner-picker { min-width: 0; }
    .plan-sales-owner-picker select { display: block; width: 100%; min-height: 39px; }
    @media (max-width: 600px) {
      .plan-editor-grid { grid-template-columns: minmax(0, 1fr); }
      .plan-editor-grid .wide-field { grid-column: auto; }
    }
    .proposal-agent-page:not(.proposal-layout-minimal_cover):not(.proposal-layout-toc):not(.proposal-layout-chapter_divider):not(.proposal-layout-closing):not(.proposal-layout-fixed_template_image):not(.proposal-layout-sales_profile) {
      aspect-ratio: auto;
      min-height: 540px;
      overflow: visible;
    }
    .proposal-agent-page-head {
      display: grid;
      grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
      align-items: center;
      gap: 14px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--proposal-agent-border);
      color: var(--proposal-agent-muted);
      font-size: 11px;
      letter-spacing: .04em;
      line-height: 1.25;
    }
    .proposal-agent-page-head span:first-child { color: var(--proposal-agent-gold); }
    .proposal-agent-page-head span:nth-child(2) { color: var(--proposal-agent-ink); }
    .proposal-agent-page-head span:nth-child(3), .proposal-agent-page-head span:last-child { overflow-wrap: anywhere; text-align: right; }
    .proposal-agent-page-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--proposal-agent-border); color: var(--proposal-agent-muted); font-size: 10px; letter-spacing: .04em; }
    .proposal-layout-minimal_cover .proposal-agent-page-foot,
    .proposal-layout-closing .proposal-agent-page-foot { display: none; }
    .proposal-agent-cover {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
      align-items: center;
      justify-items: center;
      width: 100%;
      height: 100%;
      min-height: 0;
      padding: 5.2% 6.2%;
      border-bottom: 5px solid var(--proposal-agent-gold);
      background: #0A1628;
      color: #F5F7FA;
      text-align: center;
    }
    .proposal-agent-cover::before,
    .proposal-agent-cover::after { display: none; }
    .proposal-agent-cover .proposal-brand-line { align-self: start; width: 100%; color: #F5F7FA; }
    .proposal-agent-cover .proposal-brand-logo { border-color: rgba(201,169,98,.6); background: transparent; color: var(--proposal-agent-gold); }
    .proposal-agent-cover .proposal-brand-name strong { color: #F5F7FA; font-size: 18px; }
    .proposal-agent-cover .proposal-brand-name span { color: #D0D8E6; font-size: 10px; }
    .proposal-agent-cover .proposal-cover-code { color: #D0D8E6; }
    .proposal-agent-cover .proposal-cover-main { align-self: center; max-width: 100%; margin: 0; }
    .proposal-agent-cover .proposal-cover-main::before { width: 54px; height: 2px; margin: 0 auto 14px; background: var(--proposal-agent-gold); }
    .proposal-agent-cover .proposal-client-line { color: #D0D8E6; font-size: clamp(11px, 1.5vw, 15px); }
    .proposal-agent-cover .proposal-cover-main h1 { max-width: 100%; margin: 8px 0 12px; color: #F5F7FA; font-size: clamp(18px, 5cqw, 48px); line-height: 1.15; }
    .proposal-agent-cover .proposal-en-title { color: rgba(245,247,250,.75); font-size: clamp(8px, 1.7cqw, 16px); letter-spacing: .12em; }
    .proposal-agent-cover .proposal-confidential { align-self: end; width: 100%; margin: 0; padding-top: 12px; border-top-color: rgba(208,216,230,.34); color: #D0D8E6; font-size: clamp(9px, 1vw, 11px); text-align: left; }
    .proposal-layout-toc { display: block; padding: 5.6% 6.2%; border-bottom: 3px solid var(--proposal-agent-gold); }
    .proposal-layout-toc .proposal-agent-page-head { margin-bottom: 7px; }
    .proposal-layout-toc .proposal-section-head { margin: 2.5% 0 2%; border-bottom: 0; }
    .proposal-layout-toc .proposal-agent-toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 34px; margin: 0; padding: 0; list-style: none; color: var(--proposal-agent-ink); font-size: clamp(12px, 1.45vw, 16px); }
    .proposal-agent-toc li { display: flex; gap: 11px; min-width: 0; padding: 7px 0; border-bottom: 1px solid var(--proposal-agent-border); }
    .proposal-agent-toc li > span { flex: 0 0 auto; color: var(--proposal-agent-gold); font-weight: 700; }
    .proposal-agent-toc li strong { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
    .proposal-layout-chapter_divider { display: flex; flex-direction: column; padding: 5.2% 6.2%; }
    .proposal-agent-chapter { position: absolute; top: 24%; right: 10%; bottom: 17%; left: 10%; display: grid; grid-template-columns: 16% minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 4%; }
    .proposal-agent-chapter > span { grid-row: 1 / span 2; align-self: center; color: var(--proposal-agent-gold); font-size: clamp(54px, 8vw, 96px); font-weight: 700; line-height: 1; }
    .proposal-agent-chapter h2 { margin: 0; color: var(--proposal-agent-ink); font-size: clamp(27px, 4vw, 48px); line-height: 1.15; }
    .proposal-layout-closing { display: grid; place-items: center; border: 0; background: #0A1628; color: #F5F7FA; text-align: center; }
    .proposal-agent-closing { display: grid; gap: 12px; place-items: center; }
    .proposal-agent-closing span { color: var(--proposal-agent-gold); font-size: 11px; letter-spacing: .14em; }
    .proposal-agent-closing h2 { margin: 0; color: var(--proposal-agent-gold); font-size: clamp(30px, 4.5vw, 56px); line-height: 1; }
    .proposal-agent-closing p { margin: 0; color: #D0D8E6; font-size: clamp(13px, 1.6vw, 19px); }
    .proposal-agent-page .proposal-section-head { align-items: baseline; margin: 5% 0 4%; padding: 0 0 3%; border-bottom: 2px solid var(--proposal-agent-gold); }
    .proposal-agent-page .proposal-section-head h2 { color: var(--proposal-agent-ink); font-size: clamp(19px, 2.6vw, 28px); }
    .proposal-agent-page .proposal-section-en { color: var(--proposal-agent-muted); font-size: clamp(8px, 1.08cqw, 11px); letter-spacing: .08em; }
    .proposal-agent-lead { margin: 0 0 16px; color: #33435C; font-size: clamp(12px, 1.2vw, 16px); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
    .proposal-agent-section { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 13px; min-width: 0; margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--proposal-agent-border); }
    .proposal-agent-section:nth-child(odd) { background: var(--proposal-agent-soft); }
    .proposal-agent-section h3 { margin: 0; color: var(--proposal-agent-gold); font-size: 14px; font-weight: 700; }
    .proposal-agent-section h3::before { content: ""; }
    .proposal-agent-section p { grid-column: 2; margin: -2px 0 0; color: #33435C; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
    .proposal-agent-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .proposal-agent-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; min-width: 0; min-height: 142px; padding: 18px 20px; border-top: 2px solid var(--proposal-agent-gold); border-right: 1px solid var(--proposal-agent-border); border-bottom: 1px solid var(--proposal-agent-border); border-left: 1px solid var(--proposal-agent-border); background: var(--proposal-agent-soft); }
    .proposal-agent-card-index { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--proposal-agent-gold); color: var(--proposal-agent-gold); font-weight: 700; }
    .proposal-agent-card h3 { min-width: 0; margin: 7px 0 0; color: var(--proposal-agent-ink); font-size: clamp(13px, 1.3vw, 17px); }
    .proposal-agent-card p { grid-column: 2; margin: -4px 0 0; color: #33435C; font-size: clamp(11px, 1.15vw, 14px); line-height: 1.55; overflow-wrap: anywhere; }
    .proposal-agent-card em { grid-column: 2; color: var(--proposal-agent-gold); font-size: 12px; font-style: normal; }
    .proposal-agent-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 10px; align-content: start; }
    .proposal-agent-timeline-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 13px; min-width: 0; min-height: 170px; padding: 12px 10px; border-top: 2px solid var(--proposal-agent-gold); border-right: 1px solid var(--proposal-agent-border); border-bottom: 1px solid var(--proposal-agent-border); border-left: 1px solid var(--proposal-agent-border); background: var(--proposal-agent-soft); }
    .proposal-agent-timeline-index { color: var(--proposal-agent-gold); font-size: 16px; font-weight: 700; }
    .proposal-agent-timeline-step > div { min-width: 0; }
    .proposal-agent-timeline-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .proposal-agent-timeline-meta strong { color: var(--proposal-agent-ink); font-size: clamp(13px, 1.3vw, 17px); }
    .proposal-agent-timeline-meta span { flex: 0 0 auto; color: #C19A4B; font-size: 12px; font-weight: 600; white-space: nowrap; }
    .proposal-agent-timeline-step small { display: block; margin-top: 6px; color: var(--proposal-agent-muted); font-size: 11px; }
    .proposal-agent-timeline-step p { margin: 10px 0 0; color: #33435C; font-size: clamp(10px, 1.05vw, 13px); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
    .proposal-agent-table-wrap { max-width: 100%; min-width: 0; margin-top: 4%; overflow-x: hidden; }
    .proposal-agent-table { width: 100%; max-width: 100%; min-width: 0; table-layout: fixed; color: var(--proposal-agent-ink); font-size: clamp(10px, 1vw, 14px); }
    .proposal-agent-table th, .proposal-agent-table td { min-width: 0; padding: 11px 12px; border: 1px solid var(--proposal-agent-border); text-align: left; vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
    .proposal-agent-table th { background: var(--proposal-agent-ink); color: #F5F7FA; font-weight: 700; }
    .proposal-agent-table tr:nth-child(even) td { background: var(--proposal-agent-soft); }
    .proposal-agent-risk-table th:nth-child(1), .proposal-agent-risk-table td:nth-child(1) { width: 16%; }
    .proposal-agent-risk-table th:nth-child(2), .proposal-agent-risk-table td:nth-child(2) { width: 26%; }
    .proposal-agent-risk-table th:nth-child(3), .proposal-agent-risk-table td:nth-child(3) { width: 12%; text-align: center; }
    .proposal-agent-risk-table th:nth-child(4), .proposal-agent-risk-table td:nth-child(4) { width: 46%; }
    .proposal-agent-risk-level { display: inline-block; padding: 3px 8px; border: 1px solid var(--proposal-agent-gold); color: #8c6f2a; background: #fffaf0; font-size: 11px; font-weight: 700; }
    .proposal-agent-investment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
    .proposal-agent-investment-card { min-width: 0; padding: 14px 14px 16px; border-top: 3px solid var(--proposal-agent-gold); border-right: 1px solid var(--proposal-agent-border); border-bottom: 1px solid var(--proposal-agent-border); border-left: 1px solid var(--proposal-agent-border); background: var(--proposal-agent-soft); }
    .proposal-agent-investment-card h3 { margin: 0 0 12px; color: var(--proposal-agent-ink); font-size: clamp(13px, 1.15vw, 16px); }
    .proposal-agent-investment-card .proposal-agent-section { display: block; margin: 0; padding: 8px 0; background: transparent; }
    .proposal-agent-investment-card .proposal-agent-section h3 { margin: 0; color: var(--proposal-agent-ink); font-size: 12px; }
    .proposal-agent-investment-card .proposal-agent-section p { margin: 4px 0 0; color: #33435C; font-size: 12px; }
    .proposal-agent-investment-card > p { margin: 0; color: #33435C; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
    .proposal-agent-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .proposal-agent-metrics article { min-width: 0; min-height: 112px; padding: 16px 20px; border-top: 2px solid var(--proposal-agent-gold); border-right: 1px solid var(--proposal-agent-border); border-bottom: 1px solid var(--proposal-agent-border); border-left: 1px solid var(--proposal-agent-border); background: var(--proposal-agent-soft); }
    .proposal-agent-metrics article strong { display: block; color: var(--proposal-agent-ink); font-size: clamp(15px, 1.6vw, 22px); line-height: 1.35; overflow-wrap: anywhere; }
    .proposal-agent-metrics article span { display: block; margin-top: 10px; color: var(--proposal-agent-muted); font-size: 12px; }
    .proposal-agent-note { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--proposal-agent-gold); background: var(--proposal-agent-soft); color: #33435C; }
    .proposal-agent-note strong { color: var(--proposal-agent-ink); }
    .proposal-agent-note p { margin: 6px 0 0; overflow-wrap: anywhere; }
    @media (max-width: 720px) {
      .proposal-agent-page { margin-bottom: 14px; padding: 22px 18px; }
      .proposal-agent-page:not(.proposal-layout-minimal_cover):not(.proposal-layout-toc):not(.proposal-layout-chapter_divider):not(.proposal-layout-closing) { min-height: 0; }
      .proposal-agent-cover { min-height: 0; padding: 24px 18px; }
      .proposal-agent-cover .proposal-brand-name strong { font-size: 16px; }
      .proposal-agent-page-head { grid-template-columns: 1fr; gap: 4px; }
      .proposal-agent-page-head span:nth-child(3), .proposal-agent-page-head span:last-child { text-align: left; }
      .proposal-layout-toc .proposal-agent-toc { grid-template-columns: 1fr; gap: 4px; }
      .proposal-agent-chapter { top: 22%; right: 8%; bottom: 15%; left: 8%; grid-template-columns: 25% minmax(0, 1fr); }
      .proposal-agent-card-grid, .proposal-agent-metrics { grid-template-columns: 1fr; }
      .proposal-agent-card { min-height: 0; }
      .proposal-agent-timeline { grid-template-columns: 1fr; }
      .proposal-agent-timeline-step { min-height: 0; }
      .proposal-agent-investment-grid { grid-template-columns: 1fr; }
      .proposal-agent-table-wrap { margin-right: 0; padding-right: 0; overflow-x: hidden; }
    }

    /* Shared phone layout: keep every routed page inside the viewport while
       allowing dense CRM tables and document previews to scroll locally. */
    @media (max-width: 720px) {
      html, body { min-height: 100%; height: auto; }
      body { overflow-x: hidden; overflow-y: auto; }
      .app { display: flex; flex-direction: column; min-height: 100dvh; height: auto; }
      .app.sidebar-collapsed { --side: 100%; }
      .sidebar, .sidebar-collapsed .sidebar {
        position: sticky; top: 0; z-index: 40; order: 0; flex: 0 0 auto;
        width: 100%; max-height: none; min-height: 54px; flex-direction: row;
        align-items: center; gap: 4px; padding: 6px 8px; overflow-x: auto;
        overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin;
      }
      .brand, .sidebar-toggle { display: none; }
      .sidebar > .nav-btn, .sidebar .knowledge-menu > .nav-btn, .sidebar .dev-launcher > .nav-btn {
        display: flex; flex: 0 0 auto; width: auto; min-width: 54px; min-height: 42px;
        margin: 0; padding: 7px 10px; border-radius: 9px; flex-direction: row; gap: 6px;
        justify-content: center; white-space: nowrap;
      }
      .sidebar .nav-item { display: inline-flex; gap: 6px; }
      .sidebar .nav-label, .sidebar-collapsed .nav-label { display: inline; font-size: 12px; }
      .sidebar .nav-btn[data-short]::after, .sidebar-collapsed .nav-btn[data-short]::after { display: none; }
      .sidebar .knowledge-menu, .sidebar .dev-launcher { flex: 0 0 auto; margin: 0; }
      .sidebar .knowledge-submenu, .sidebar .dev-submenu { display: none !important; }
      .main { display: flex; flex: 1 0 auto; flex-direction: column; min-height: calc(100dvh - 54px); height: auto; }
      .topbar { position: sticky; top: 54px; z-index: 30; padding: 9px 12px; }
      .top-row { align-items: flex-start; gap: 8px; }
      .top-left { min-width: 0; }
      .top-left strong { font-size: 15px; }
      .top-actions { gap: 5px; }
      .top-actions .platform-switch-button { min-height: 32px; padding: 0 7px; font-size: 12px; }
      .top-actions .account-menu { margin-left: 0; }
      .top-actions .account-box { min-width: 0; padding-right: 5px; grid-template-columns: 30px auto 8px; gap: 4px; }
      .account-dropdown { left: auto; right: 0; transform: none; }
      .workspace { flex: 1; min-height: 0; overflow: visible; padding: 12px; }
      .route, .panel, .page-head, .page-head > *, .toolbar, .filters, .form-grid,
      .grid-2, .grid-3, .grid-4, .split-app, .list-split, .dashboard-chart-grid,
      .customer-detail-layout, .customer-detail-main, .customer-detail-side { min-width: 0; max-width: 100%; }
      .route.list-page.active, #todos.route.list-page.active, #knowledge.route.active {
        display: grid; height: auto; min-height: 0; grid-template-rows: auto auto auto;
        overflow: visible;
      }
      .route.list-page .list-data-panel, .route.list-page .list-split,
      .route.list-page .list-split > .panel:first-child, .todo-data-views {
        display: block; min-height: 0; overflow: visible;
      }
      .route.list-page .list-data-panel > .table-wrap,
      .route.list-page .list-split > .panel:first-child > .table-wrap,
      .table-wrap { display: block; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
      table { min-width: 640px; }
      .page-head { align-items: flex-start; flex-direction: column; gap: 10px; }
      .page-head .actions, .page-head-actions, .toolbar, .filter-actions,
      .form-actions, .list-toolbar, .list-toolbar-actions { width: 100%; flex-wrap: wrap; }
      .filters { grid-template-columns: minmax(0, 1fr); }
      .filters > *, .form-grid > *, .filter-row > * { min-width: 0; }
      .demand-team-toolbar { align-items: flex-start; flex-direction: column; }
      .demand-team-toolbar .actions { width: 100%; }
      .demand-team-user-list { grid-template-columns: minmax(0, 1fr); }
      .panel { padding: 12px; border-radius: 10px; }
      .modal-backdrop, .drawer-backdrop { padding: 0; align-items: end; }
      .modal-backdrop.active { display: grid; place-items: end center; }
      .modal, .modal.large, .modal.batch-followup-box, .modal.followup-detail-modal {
        width: 100%; max-width: 100%; max-height: 92dvh; height: auto;
        border-radius: 16px 16px 0 0; padding: 14px; overflow: auto;
      }
      #planPreviewPage.route.active { min-height:100%; overflow:visible; }
      .plan-preview-page-content { min-height:100%; grid-template-rows:auto auto auto auto; }
      .plan-preview-page-summary { align-items:flex-start; flex-direction:column; }
      .plan-preview-page-summary .proposal-preview-toolbar { width:100%; justify-content:flex-start; flex-wrap:wrap; }
      .plan-preview-page-document .proposal-preview-to-top { right:12px; bottom:12px; }
      .plan-preview-page-document { min-height:70dvh; overflow:visible; }
      .plan-preview-page-document > .proposal-template-preview { min-height:70dvh; overflow:visible; }
      .modal.batch-followup-box { height: 92dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
      .modal.batch-followup-box #modalContent { min-height: 0; overflow: hidden; }
      .batch-followup-modal { gap: 8px; }
      .batch-followup-fixed-head { gap: 7px; }
      .batch-followup-fixed-head .form-grid { gap: 7px; }
      .batch-followup-fixed-head textarea { min-height: 56px; max-height: 72px; }
      .batch-followup-list { overscroll-behavior: contain; }
      .modal.followup-detail-modal { display: block; }
      .modal-head { position: sticky; top: -14px; z-index: 5; margin: -14px -14px 12px; padding: 14px; background: #fff; }
      .drawer, .drawer.drawer-form, .drawer.drawer-wide, .drawer.followup-drawer {
        width: 100%; max-width: 100%; height: 94dvh; max-height: 94dvh;
        border-radius: 16px 16px 0 0; overflow: auto;
      }
      input, select, textarea { max-width: 100%; }
      .btn, button { max-width: 100%; }
      .dashboard-kpis, .customer-status-grid, .stat-list, .stat-list.demand,
      .pipeline, .customer-detail-field-grid, .customer-detail-field-grid.two-columns,
      .customer-detail-field-grid.three-columns, .customer-detail-field-grid.four-columns,
      .compact-info-grid, .business-record-grid, .kyc-field-grid, .ai-summary-grid,
      .product-detail-overview-grid, .product-detail-stat-grid, .policy-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .chat-shell { min-width: 0; }
      .proposal-sheet, .proposal-cover { min-height: 0; padding: 22px 18px; }
      .proposal-cover { grid-template-rows: auto minmax(150px, 1fr) auto auto; }
      .proposal-cover-main { margin: 32px 0 20px; }
      .proposal-cover-main h1 { font-size: clamp(28px, 8vw, 42px); }
      .proposal-fields { width: 100%; }
      .proposal-field { grid-template-columns: minmax(90px, 34%) minmax(0, 1fr); gap: 8px; }
      .proposal-page-head, .proposal-section-head { gap: 10px; flex-wrap: wrap; }
    }
    @media (max-width: 420px) {
      .workspace { padding: 9px; }
      .topbar { padding: 8px 9px; }
      .top-left span { display: none; }
      .top-actions { gap: 2px; }
      .top-actions .platform-switch-button span { display: none; }
      .account-meta { display: none; }
      .top-actions .account-box { grid-template-columns: 30px 8px; }
      .dashboard-kpis, .customer-status-grid, .stat-list, .stat-list.demand,
      .pipeline, .customer-detail-field-grid, .customer-detail-field-grid.two-columns,
      .customer-detail-field-grid.three-columns, .customer-detail-field-grid.four-columns,
      .compact-info-grid, .business-record-grid, .kyc-field-grid, .ai-summary-grid,
      .product-detail-overview-grid, .product-detail-stat-grid, .policy-detail-grid {
        grid-template-columns: minmax(0, 1fr);
      }
      .nav-icon { width: 16px; height: 16px; }
      .sidebar > .nav-btn, .sidebar .knowledge-menu > .nav-btn { min-width: 48px; padding: 6px 8px; }
      .modal, .drawer, .drawer.drawer-form, .drawer.drawer-wide, .drawer.followup-drawer { padding: 11px; }
      .modal-head { top: -11px; margin: -11px -11px 10px; padding: 11px; }
    }
    /* Desktop and tablet widths: reclaim content space progressively instead
       of letting fixed sidebar, filters, and dense page grids compete. */
    @media (min-width: 721px) and (max-width: 1280px) {
      .workspace { padding: clamp(12px, 1.5vw, 18px); }
      .topbar { padding-left: clamp(12px, 1.5vw, 18px); padding-right: clamp(12px, 1.5vw, 18px); }
      .top-actions { gap: 6px; }
      .account-box { margin-left: 4px; }
      .page-head { align-items: flex-start; }
      .page-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
      .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .compact-filters { display: flex; flex-wrap: wrap; }
      .compact-filters .field { flex: 1 1 145px; width: auto; min-width: 130px; }
      .compact-filters .search-field { flex: 2 1 230px; width: auto; }
      .compact-filters .range-field { flex: 1 1 130px; width: auto; }
      .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .customer-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .customer-basic-info-grid, .customer-facts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .customer-contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .customer-detail-field-grid.four-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .enterprise-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .knowledge-product-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
      .chat-shell { grid-template-columns: minmax(190px, 220px) minmax(0, 1fr); }
      .plan-detail-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .todo-filter-bar { min-width: 0; grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(110px, 140px)) minmax(148px, .8fr) minmax(220px, 1.3fr) 44px; }
    }
    @media (min-width: 981px) and (max-width: 1100px) {
      .app { --side: 64px; }
      .sidebar { padding: 12px 5px 46px; }
      .brand { justify-content: center; padding: 4px 0 12px; margin-bottom: 10px; }
      .brand-text { display: none; }
      .brand-mark { width: 34px; height: 34px; }
      .sidebar .nav-btn { width: 52px; min-height: 50px; margin: 3px auto; justify-content: center; padding: 7px 4px; border-radius: 8px; flex-direction: column; gap: 3px; }
      .sidebar .nav-item { justify-content: center; display: grid; place-items: center; gap: 3px; }
      .sidebar .nav-icon { width: 17px; height: 17px; }
      .sidebar .nav-label { display: none; }
      .sidebar .nav-btn[data-short]::after { content: attr(data-short); display: block; width: 100%; overflow: hidden; color: currentColor; font-size: 10px; line-height: 1.12; text-align: center; white-space: nowrap; opacity: .86; }
      .sidebar .knowledge-menu, .sidebar .dev-launcher { margin: 0; }
      .sidebar .knowledge-submenu, .sidebar .dev-submenu { display: none !important; }
      .sidebar .knowledge-toggle-icon, .sidebar .dev-toggle-icon { display: none; }
      .sidebar .sidebar-toggle { right: 21px; bottom: 12px; width: 22px; height: 22px; }
    }
    @media (min-width: 721px) and (max-width: 1280px) {
      body { overflow: auto; }
      .app { display: flex; flex-direction: column; min-height: 100vh; height: auto; }
      .sidebar { position: sticky; top: 0; z-index: 40; flex: 0 0 auto; width: 100%; min-height: 58px; max-height: 64px; flex-direction: row; align-items: center; gap: 4px; padding: 6px 10px; overflow-x: auto; overflow-y: hidden; }
      .brand, .sidebar-toggle { display: none; }
      .sidebar > .nav-btn, .sidebar .knowledge-menu > .nav-btn, .sidebar .dev-launcher > .nav-btn { display: flex; flex: 0 0 auto; width: auto; min-width: 64px; min-height: 42px; margin: 0; padding: 7px 9px; border-radius: 8px; flex-direction: row; justify-content: center; gap: 6px; white-space: nowrap; }
      .sidebar .nav-item { display: inline-flex; gap: 6px; }
      .sidebar .nav-label { display: inline; font-size: 12px; }
      .sidebar .nav-btn[data-short]::after { display: none; }
      .sidebar .knowledge-menu, .sidebar .dev-launcher { flex: 0 0 auto; margin: 0; }
      .sidebar .knowledge-submenu, .sidebar .dev-submenu { display: none !important; }
      .main { display: flex; min-height: calc(100vh - 58px); height: auto; flex-direction: column; }
      .topbar { position: sticky; top: 58px; z-index: 30; }
      .workspace { flex: 1; min-height: 0; overflow: visible; }
      .route.list-page.active, #todos.route.list-page.active, #knowledge.route.active { height: auto; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); overflow: visible; }
      .route.list-page .list-data-panel, .route.list-page .list-split, .route.list-page .list-split > .panel:first-child, .todo-data-views { min-height: 0; overflow: visible; }
      .route.list-page .list-data-panel > .table-wrap, .route.list-page .list-split > .panel:first-child > .table-wrap, .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
      .customer-filter-bar .field { flex: 1 1 140px; }
      .customer-filter-bar .search-field { flex: 2 1 240px; }
      .customer-filter-bar .budget-range { flex: 1 1 170px; }
    }
    .enterprise-background { gap: 12px; }
    .enterprise-background-head { align-items: center; min-height: 26px; }
    .enterprise-background-head h3 { font-size: 14px; }
    .enterprise-background-head p { display: none; }
    .enterprise-background-actions { gap: 8px; }
    .enterprise-query-status { font-size: 11px; }
    .enterprise-query-status::before { width: 6px; height: 6px; }
    .enterprise-tabs { display: flex; align-items: center; gap: 12px; min-height: 42px; border-bottom: 1px solid var(--line); }
    .enterprise-tabs .enterprise-add-button { margin-left: auto; align-self: center; }
    .enterprise-tab { position: relative; align-self: stretch; min-width: 56px; border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 0 2px; font-size: 13px; }
    .enterprise-tab:hover, .enterprise-tab.active { color: var(--brand-dark); }
    .enterprise-tab.active { font-weight: 700; }
    .enterprise-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--brand); content: ""; }
    .enterprise-add-button { min-height: 34px; border-color: #c9d9ee; color: var(--brand); }
    .enterprise-add-button span { margin-right: 3px; font-size: 16px; }
    .enterprise-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .enterprise-summary-item { min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 8px; background: #f5f8fc; padding: 8px; text-align: center; }
    .enterprise-summary-item strong { margin: 0; color: #172b3f; font-size: 14px; }
    .enterprise-summary-item span { color: var(--muted); font-size: 11px; }
    .enterprise-table.domestic-table { min-width: 1120px; }
    .enterprise-table.overseas-table { width: 1660px; min-width: 1660px; table-layout: fixed; }
    .enterprise-table.overseas-table th:nth-child(1), .enterprise-table.overseas-table td:nth-child(1) { width: 180px; min-width: 180px; }
    .enterprise-table.overseas-table th:nth-child(2), .enterprise-table.overseas-table td:nth-child(2) { width: 90px; min-width: 90px; }
    .enterprise-table.overseas-table th:nth-child(3), .enterprise-table.overseas-table td:nth-child(3) { width: 110px; min-width: 110px; }
    .enterprise-table.overseas-table th:nth-child(4), .enterprise-table.overseas-table td:nth-child(4),
    .enterprise-table.overseas-table th:nth-child(5), .enterprise-table.overseas-table td:nth-child(5) { width: 130px; min-width: 130px; }
    .enterprise-table.overseas-table th:nth-child(6), .enterprise-table.overseas-table td:nth-child(6),
    .enterprise-table.overseas-table th:nth-child(7), .enterprise-table.overseas-table td:nth-child(7) { width: 95px; min-width: 95px; white-space: nowrap; }
    .enterprise-table.overseas-table th:nth-child(8), .enterprise-table.overseas-table td:nth-child(8) { width: 130px; min-width: 130px; }
    .enterprise-table.overseas-table th:nth-child(9), .enterprise-table.overseas-table td:nth-child(9) { width: 100px; min-width: 100px; }
    .enterprise-table.overseas-table th:nth-child(10), .enterprise-table.overseas-table td:nth-child(10) { width: 90px; min-width: 90px; }
    .enterprise-table.overseas-table th:nth-child(11), .enterprise-table.overseas-table td:nth-child(11) { width: 210px; min-width: 210px; }
    .enterprise-table.overseas-table th:nth-child(12), .enterprise-table.overseas-table td:nth-child(12) { width: 110px; min-width: 110px; }
    .enterprise-table.overseas-table th:nth-child(13), .enterprise-table.overseas-table td:nth-child(13) { width: 150px; min-width: 150px; white-space: nowrap; }
    .enterprise-table.overseas-table th:nth-child(14), .enterprise-table.overseas-table td:nth-child(14) { width: 126px; min-width: 126px; white-space: nowrap; }
    .enterprise-table.domestic-table th, .enterprise-table.overseas-table th { padding: 9px 8px; background: #edf3fa; text-align: center; white-space: nowrap; }
    .enterprise-table.domestic-table td, .enterprise-table.overseas-table td { padding: 9px 8px; vertical-align: middle; }
    .enterprise-table.domestic-table th:nth-child(1), .enterprise-table.domestic-table td:nth-child(1) { width: 260px; min-width: 260px; }
    .enterprise-table.domestic-table th:nth-child(2), .enterprise-table.domestic-table td:nth-child(2) { width: 100px; }
    .enterprise-table.domestic-table th:nth-child(3), .enterprise-table.domestic-table td:nth-child(3),
    .enterprise-table.domestic-table th:nth-child(4), .enterprise-table.domestic-table td:nth-child(4) { width: 140px; }
    .enterprise-table.domestic-table th:nth-child(5), .enterprise-table.domestic-table td:nth-child(5),
    .enterprise-table.domestic-table th:nth-child(6), .enterprise-table.domestic-table td:nth-child(6) { width: 100px; }
    .enterprise-table.domestic-table th:nth-child(7), .enterprise-table.domestic-table td:nth-child(7) { width: 140px; }
    .enterprise-table.domestic-table th:nth-child(8), .enterprise-table.domestic-table td:nth-child(8) { width: 180px; }
    .enterprise-table.domestic-table th:nth-child(9), .enterprise-table.domestic-table td:nth-child(9) { width: 100px; }
    .enterprise-table.domestic-table th:nth-child(10), .enterprise-table.domestic-table td:nth-child(10) { width: 260px; }
    .enterprise-table .empty { min-height: 56px; display: grid; place-items: center; border: 1px dashed #cfdeee; border-radius: 8px; color: var(--muted); }
    @media (max-width: 720px) {
      .enterprise-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .enterprise-table.domestic-table { min-width: 1000px; }
      .enterprise-table.overseas-table { width: 1660px; min-width: 1660px; }
      .enterprise-background-head { align-items: flex-start; }
      .enterprise-background-actions { gap: 6px; }
    }
    @media (max-width: 1280px) {
      .split-app { grid-template-columns: 1fr; }
      .side-detail { position: static; max-height: none; }
      .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .ai-command { grid-template-columns: 1fr; }
      .signal-grid { grid-template-columns: 1fr; }
      .import-layout, .evidence-grid, .followup-input-grid { grid-template-columns: 1fr; }
      .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .stat-list.demand { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .assistant-sections { grid-template-columns: 1fr; }
      .dashboard-chart-grid, .voice-assist, .source-grid { grid-template-columns: 1fr; }
      .knowledge-product-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 220px)); }
      .customer-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .plan-detail-top, .multi-check-grid, .business-record-grid, .compact-info-grid, .kyc-field-grid, .ai-summary-grid { grid-template-columns: 1fr; }
      .customer-detail-field-grid.four-columns, .customer-detail-field-grid.three-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .detail-info-block-head { align-items: flex-start; flex-direction: column; gap: 3px; }
      .kyc-field.wide { grid-column: auto; }
      .kyc-preview-head { flex-direction: column; }
      .kyc-preview-meta { text-align: left; }
      .chat-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 10px; padding: 10px; height: clamp(500px, calc(100vh - 96px), 760px); }
      .chat-sidebar-inner { padding: 14px; }
      .chat-header { padding-left: 16px; padding-right: 16px; }
      .chat-messages { padding-left: 16px; padding-right: 16px; }
      .chat-footer { padding-left: 16px; padding-right: 16px; }
      .drawer.followup-drawer { width: min(860px, 90vw); }
      .product-compare-table { font-size: 11px; }
      .product-compare-table th:first-child, .product-compare-table td:first-child { width: 128px; }
      .product-compare-table th, .product-compare-table td { padding: 6px 7px; }
    }
    @media (max-width: 980px) {
      body { overflow: auto; }
      .app { grid-template-columns: 1fr; height: auto; }
      .sidebar { position: static; max-height: none; }
      .main { height: auto; }
      .workspace { display: block; overflow: visible; }
      .page-outlet { height: auto; }
      .app:not(.authenticated) .workspace { padding: 18px; }
      .login-screen { min-height: auto; align-items: stretch; }
      .login-screen > .hero { padding: 8px 0 0; }
      .agent-preview { min-height: 320px; }
      .top-row { flex-wrap: wrap; }
      .top-context-row { justify-content: flex-start; }
      .top-context-controls { justify-content: flex-start; }
      .grid-4, .grid-3, .grid-2, .login-screen { grid-template-columns: 1fr; }
      .filters, .form-grid { grid-template-columns: 1fr; }
      .todo-editor-grid, .customer-status-grid { grid-template-columns: 1fr; }
      .todo-editor-grid .todo-content { grid-column: auto; }
      .stat-list, .stat-list.demand { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .knowledge-product-grid { grid-template-columns: 1fr; }
      .knowledge-policy-toolbar .knowledge-product-toolbar-main { flex-wrap: wrap; }
      .knowledge-cascade-field { width: 100% !important; }
      .knowledge-cascade-trigger { width: 100%; }
      .knowledge-cascade-panel { width: min(100%, 366px); }
      .knowledge-cascade-columns { grid-template-columns: 1fr; }
      .dashboard-stat-groups, .grid-2.workbench-lists { grid-template-columns: 1fr; }
      .followup-steps { grid-template-columns: 1fr; }
      .chat-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(500px, 1fr); height: auto; min-height: 0; }
      .chat-sidebar-inner { height: auto; }
      .chat-recent-list { height: auto; max-height: 152px; }
      .chat-main { min-height: 500px; }
      .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .pipeline { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
      .todo-calendar-panel { grid-template-columns: 1fr; overflow: auto; }
      .todo-calendar-detail { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; min-height: 260px; }
      .todo-calendar-grid { grid-auto-rows: minmax(78px, 1fr); }
      .todo-calendar-day { min-height: 78px; padding: 6px; }
    }
    @media (max-width: 720px) {
      .customer-detail-field-grid.four-columns, .customer-detail-field-grid.three-columns { grid-template-columns: 1fr; }
      .customer-detail-tabs .tab { min-width: 0; flex: 1 1 auto; }
      .detail-tab-toolbar { align-items: flex-start; flex-direction: column; }
      .app:not(.authenticated) .workspace { padding: 10px; }
      .login-screen { padding: 14px; border-radius: 14px; }
      .login-intro { margin: 22px 0 16px; }
      .agent-preview { min-height: 0; }
      .agent-preview::before,
      .agent-preview::after { display: none; }
      .agent-preview-body { display: grid; gap: 10px; min-height: 0; padding: 12px; }
      .agent-core,
      .agent-chip { position: static; transform: none; width: 100%; }
      .agent-core { height: 112px; }
      .agent-chip { max-width: none; }
      .login-form-panel { padding: 20px; }
      .drawer,
      .drawer.drawer-form,
      .drawer.drawer-wide,
      .drawer.followup-drawer { width: 100vw; padding: 12px; }
      .drawer-head { min-height: 48px; padding-bottom: 10px; }
      .drawer-head h2 { font-size: 16px; }
      #drawerContent { padding-top: 10px; }
      .drawer .form-actions { position: sticky; bottom: -12px; z-index: 2; margin: 12px -12px -12px; padding: 10px 12px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
      .drawer .kyc-account-table,
      .drawer .kyc-form-table,
      .drawer .kyc-template-table { font-size: 12px; }
      .drawer .table-wrap { overflow-x: auto; }
      .chat-shell { grid-template-rows: auto minmax(460px, 1fr); gap: 8px; padding: 8px; }
      .chat-sidebar-inner { padding: 12px; }
      .chat-recent-list { max-height: 126px; }
      .chat-header { padding: 9px 12px; }
      .chat-header strong { font-size: 14px; }
      .chat-header span { font-size: 11px; }
      .chat-messages { padding: 14px 12px 16px; }
      .ai-welcome { gap: 13px; padding: 18px 4px; }
      .ai-welcome-copy h2 { font-size: 18px; }
      .ai-welcome-capabilities { grid-template-columns: 1fr; }
      .chat-footer { padding: 10px 12px 12px; }
      .chat-compose textarea { min-height: 74px; }
      .quick-qa-list { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
      .quick-qa-chip { flex: 0 0 auto; max-width: 260px; }
      .message-group { max-width: 94%; }
      .ai-context-request { width: min(100%, 520px); }
      .ai-context-request-fields { grid-template-columns: 1fr; }
      .ai-todo-request { width: min(100%, 520px); }
      .product-compare-table { font-size: 10px; }
      .product-compare-table th:first-child, .product-compare-table td:first-child { width: 104px; }
      .product-compare-table th, .product-compare-table td { padding: 6px 5px; }
    }

    /* Final mobile auth-gate overrides: keep the reference card dimensions
       after the app's broader responsive rules have been evaluated. */
    @media (max-width: 760px) {
      .crm-auth-gate {
        display: block;
        min-height: 100%;
        padding: 30px 0;
        overflow: hidden;
        background-color: #041426;
        background-image:
          linear-gradient(rgba(125, 158, 190, .075) 1px, transparent 1px),
          linear-gradient(90deg, rgba(125, 158, 190, .075) 1px, transparent 1px),
          linear-gradient(155deg, transparent 0 64%, rgba(37, 66, 101, .52) 64.2%, rgba(12, 31, 53, .45) 100%),
          linear-gradient(20deg, transparent 0 55%, rgba(0, 183, 218, .1) 55.5%, transparent 76%);
        background-size: 38px 38px, 38px 38px, 100% 100%, 100% 100%;
      }
      .crm-auth-gate-card {
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
      }
      .crm-auth-gate-card::before,
      .crm-auth-gate-card::after,
      .crm-auth-gate-intro { display: none; }
      .crm-auth-gate-login {
        width: min(372px, calc(100vw - 52px));
        min-height: 382px;
        margin: 0 auto;
        padding: 26px;
      }
    }

    .modal.policy-source-config-modal {
      width: min(980px, calc(100vw - 40px));
      max-height: 80vh;
      max-height: 80dvh;
      box-sizing: border-box;
      overflow: auto;
    }
    .policy-source-config-content { display: grid; gap: 10px; min-width: 0; }
    .policy-source-records { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
    .policy-source-list-scroll { max-height: min(46vh, 460px); overflow: auto; overscroll-behavior: contain; }
    .policy-source-row {
      display: grid;
      grid-template-columns: minmax(105px, .8fr) minmax(180px, 1.8fr) 48px 124px;
      align-items: center;
      gap: 8px;
      min-width: 560px;
      padding: 6px 9px;
      border-bottom: 1px solid var(--line);
    }
    .policy-source-row:last-child { border-bottom: 0; }
    .policy-source-row:hover:not(.policy-source-header) { background: #f7fafc; }
    .policy-source-header { position: sticky; top: 0; z-index: 1; min-height: 34px; background: #f5f8fb; color: var(--muted); font-size: 12px; font-weight: 600; }
    .policy-source-input { width: 100%; min-width: 0; height: 34px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 8px; color: var(--text); font-size: 13px; }
    .policy-source-input:focus { border-color: var(--brand); outline: 2px solid rgba(47, 111, 237, .12); }
    .policy-source-toggle { position: relative; display: block; justify-self: center; width: 36px; height: 22px; cursor: pointer; }
    .policy-source-toggle input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
    .policy-source-switch-track { position: absolute; inset: 1px; border-radius: 999px; background: #c5cdd5; transition: background-color .15s ease; }
    .policy-source-switch-track > span { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 38, 60, .24); transition: transform .15s ease; }
    .policy-source-toggle input:checked + .policy-source-switch-track { background: #13866e; }
    .policy-source-toggle input:checked + .policy-source-switch-track > span { transform: translateX(14px); }
    .policy-source-toggle input:focus-visible + .policy-source-switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }
    .policy-source-toggle input:disabled + .policy-source-switch-track { opacity: .55; }
    .policy-source-row.is-saving { opacity: .7; }
    .policy-source-actions { display: flex; justify-content: flex-end; gap: 5px; white-space: nowrap; }
    .policy-source-actions .btn { min-height: 30px; padding: 4px 8px; font-size: 12px; }
    .policy-source-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
    .policy-source-pager-actions { display: flex; align-items: center; gap: 8px; }
    .policy-source-pager-actions .btn { min-height: 32px; padding: 5px 9px; }
    .policy-source-add-row { border: 1px dashed #b8c8d8; border-radius: 8px; background: #fbfcfd; }
    @media (max-width: 720px) {
      .modal.policy-source-config-modal { width: 100%; max-width: 100%; max-height: 80vh; max-height: 80dvh; border-radius: 12px 12px 0 0; }
      .policy-source-pager { align-items: flex-start; flex-direction: column; }
      .policy-source-pager-actions { width: 100%; justify-content: space-between; }
    }

    /* Final customer-filter breakpoints: this block intentionally stays last
       so legacy prototype rules cannot restore the old overflowing row. */
    @media (min-width: 1281px) and (max-width: 1600px) {
      .customer-filter-bar { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; overflow:visible; }
      .customer-filter-bar .field, .customer-filter-bar .search-field,
      .customer-filter-bar .budget-range, .customer-filter-bar .filter-action-field { grid-column:auto; width:auto; min-width:0; }
    }
    @media (min-width: 981px) and (max-width: 1280px) {
      .customer-filter-bar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; overflow:visible; }
      .customer-filter-bar .field, .customer-filter-bar .search-field,
      .customer-filter-bar .budget-range, .customer-filter-bar .filter-action-field { grid-column:auto; width:auto; min-width:0; }
      .customer-filter-bar .filter-action-field .btn { width:100%; }
    }
    @media (min-width: 721px) and (max-width: 980px) {
      .customer-filter-bar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; overflow:visible; }
      .customer-filter-bar .field, .customer-filter-bar .search-field,
      .customer-filter-bar .budget-range, .customer-filter-bar .filter-action-field { grid-column:auto; width:auto; min-width:0; }
      .customer-filter-bar .filter-action-field .btn { width:100%; }
    }
    @media (min-width: 421px) and (max-width: 720px) {
      .customer-filter-bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; overflow:visible; }
      .customer-filter-bar .field, .customer-filter-bar .filter-action-field { grid-column:auto; width:auto; min-width:0; }
      .customer-filter-bar .search-field, .customer-filter-bar .budget-range { grid-column:1 / -1; width:auto; min-width:0; }
      .customer-filter-bar .filter-action-field .btn { width:100%; }
      .searchable-filter-panel { width:100%; min-width:0; }
    }
    @media (max-width: 420px) {
      .customer-filter-bar { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; overflow:visible; }
      .customer-filter-bar .field, .customer-filter-bar .search-field,
      .customer-filter-bar .budget-range, .customer-filter-bar .filter-action-field { grid-column:auto; width:auto; min-width:0; }
      .customer-filter-bar .filter-action-field .btn { width:100%; }
      .searchable-filter-panel { width:100%; min-width:0; }
    }

    /* Final todo breakpoints: keep the route usable without page-level horizontal overflow. */
    @media (max-width: 1600px) {
      #todos,
      #todos > *,
      #todos .panel,
      #todos .todo-data-views,
      #todos .todo-list-panel,
      #todos .todo-list-panel > .table-wrap { min-width:0; max-width:100%; box-sizing:border-box; }
      #todos .todo-filter-bar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; min-width:0; overflow:visible; }
      #todos .todo-filter-bar .field { width:auto; min-width:0; }
      #todos .todo-filter-bar input,
      #todos .todo-filter-bar select { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
      #todos .todo-filter-bar > .btn { grid-column:auto; width:100%; min-width:0; }
      #todos .todo-list-panel > .table-wrap { overflow:auto; }
    }
    @media (min-width: 721px) and (max-width: 980px) {
      #todos .todo-filter-bar { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
      #todos .todo-filter-bar .search-field,
      #todos .todo-filter-bar .range-field { grid-column:1 / -1; }
      #todos .todo-filter-bar > .btn { grid-column:auto; width:100%; min-width:0; }
      #todos #todoMetrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
    }
    @media (max-width: 1280px) {
      #todos.route.list-page.active { display:grid; gap:10px; height:auto; grid-template-rows:auto auto auto auto; overflow:visible; }
      #todos,
      #todos > *,
      #todos .panel { min-width:0; max-width:100%; box-sizing:border-box; }
      #todos > .panel { padding:10px; }
      #todos #todoMetrics { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
      #todos #todoMetrics .metric { padding:10px; }
      #todos #todoMetrics .metric strong { font-size:22px; }
      #todos .todo-filter-bar { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; overflow:visible; }
      #todos .todo-filter-bar .field { width:auto; min-width:0; }
      #todos .todo-filter-bar .search-field,
      #todos .todo-filter-bar .range-field,
      #todos .todo-filter-bar > .btn { grid-column:1 / -1; }
      #todos .todo-filter-bar .range-inputs { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:5px; }
      #todos .todo-filter-bar .range-inputs .date-placeholder-wrap,
      #todos .todo-filter-bar .range-inputs input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
      #todos .todo-filter-bar input,
      #todos .todo-filter-bar select { width:100%; min-width:0; max-width:100%; box-sizing:border-box; }
      #todos .todo-filter-bar > .btn { width:100%; min-width:0; }
      #todos .todo-view-switch { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; padding:10px; }
      #todos .todo-view-switch > .btn.primary { min-width:72px; }
      #todos .todo-view-switch .segmented-control { width:100%; min-width:0; }
      #todos .todo-view-switch .segmented-control .btn { flex:1 1 0; min-width:0; padding-left:6px; padding-right:6px; }
      #todos .todo-data-views,
      #todos .todo-list-panel,
      #todos .todo-list-panel > .table-wrap { display:block; min-width:0; overflow:visible; }
      #todos .todo-list-table { display:block; width:100%; min-width:0 !important; }
      #todos .todo-list-table thead { display:none; }
      #todos .todo-list-table tbody { display:grid; gap:10px; }
      #todos .todo-list-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 8px; padding:8px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 2px 8px rgba(20,38,60,.05); }
      #todos .todo-list-table tbody td { display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:3px; width:auto; min-width:0; padding:6px; border:0; overflow:visible; text-overflow:clip; white-space:normal; overflow-wrap:anywhere; }
      #todos .todo-list-table tbody td::before { content:attr(data-label); color:var(--muted); font-size:11px; line-height:1.3; }
      #todos .todo-list-table tbody td:nth-child(1),
      #todos .todo-list-table tbody td:nth-child(2),
      #todos .todo-list-table tbody td.table-actions { grid-column:1 / -1; }
      #todos .todo-list-table .table-link { max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; }
      #todos .todo-list-table .table-actions { position:static; width:auto; min-width:0; text-align:left; box-shadow:none; }
      #todos .todo-list-table .data-list-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-flow:row; gap:6px; }
      #todos .todo-list-table .data-list-actions .btn { width:100%; }
      #todos .todo-list-table .todo-empty-row { display:block; padding:0; box-shadow:none; }
      #todos .todo-list-table .todo-empty-cell { display:block; }
      #todos .todo-list-table .todo-empty-cell::before { content:none; }
      #todos .pagination { align-items:stretch; flex-direction:column; }
      #todos .pagination-controls { justify-content:flex-start; }
      #todos .todo-calendar-panel { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; overflow:visible; }
      #todos .todo-calendar-main { display:block; min-width:0; overflow-x:auto; overflow-y:hidden; padding-bottom:4px; }
      #todos .todo-calendar-toolbar { position:sticky; left:0; width:100%; max-width:100%; min-width:300px; }
      #todos .todo-calendar-week,
      #todos .todo-calendar-grid { min-width:620px; }
      #todos .todo-calendar-grid { grid-auto-rows:82px; overflow:visible; }
      #todos .todo-calendar-day { min-height:82px; }
      #todos .todo-calendar-detail { min-height:220px; }
    }
    @media (max-width: 420px) {
      #todos .todo-filter-bar .todo-team-member-filter { grid-column:1 / -1; }
      #todos .todo-view-switch { grid-template-columns:auto minmax(0,1fr); }
      #todos .todo-view-switch > .btn.primary { width:auto; }
    }
    @media (max-width: 720px) {
      #todos.route.list-page.active { gap:8px; }
      #todos > .panel { padding:8px; }
      #todos #todoMetrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
      #todos .todo-filter-bar { gap:7px; }
      #todos .todo-filter-bar .field input,
      #todos .todo-filter-bar .field select,
      #todos .todo-filter-bar > .btn { min-height:38px; }
      #todos .todo-view-switch { padding:8px; }
      #todos .todo-list-table tbody tr { padding:7px; }
      #todos .todo-list-table tbody td { padding:5px; }
      #todos .todo-calendar-main { display:grid; grid-template-rows:auto auto auto; width:100%; overflow:visible; padding:0; }
      #todos .todo-calendar-toolbar { position:static; width:100%; min-width:0; flex-wrap:wrap; padding-bottom:8px; }
      #todos .todo-calendar-toolbar .actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
      #todos .todo-calendar-toolbar .actions .btn { min-width:0; padding-left:6px; padding-right:6px; }
      #todos .todo-calendar-week,
      #todos .todo-calendar-grid { width:100%; min-width:0; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
      #todos .todo-calendar-week { font-size:11px; }
      #todos .todo-calendar-week span { padding:3px 0; }
      #todos .todo-calendar-grid { grid-auto-rows:58px; overflow:visible; padding:0; }
      #todos .todo-calendar-day { position:relative; min-width:0; min-height:58px; gap:2px; padding:4px 3px; border-radius:7px; }
      #todos .todo-calendar-date { justify-content:center; font-size:12px; }
      #todos .todo-calendar-count { position:absolute; width:6px; min-width:6px; height:6px; margin:27px 0 0 22px; overflow:hidden; color:transparent; font-size:0; }
      #todos .todo-calendar-items { display:none; }
      #todos .todo-calendar-detail { min-height:0; padding-top:12px; }
      #todos .todo-calendar-detail-list { grid-template-columns:minmax(0,1fr); overflow:visible; padding:0; }
      #todos .todo-calendar-detail-actions .btn { flex:1 1 110px; }
      .modal .todo-editor-grid { grid-template-columns:minmax(0,1fr); }
      .modal .todo-editor-grid .todo-content,
      .modal .todo-editor-grid .wide-field { grid-column:auto; }
      .modal .todo-editor-grid .customer-picker-trigger { display:grid; grid-template-columns:minmax(0,1fr) auto; }
      .modal .todo-editor-grid .customer-picker-trigger input { min-width:0; }
    }
    @media (max-width: 340px) {
      #todos #todoMetrics,
      #todos .todo-filter-bar,
      #todos .todo-list-table tbody tr { grid-template-columns:minmax(0,1fr); }
      #todos .todo-filter-bar .field,
      #todos .todo-filter-bar .search-field,
      #todos .todo-filter-bar .range-field,
      #todos .todo-filter-bar > .btn,
      #todos .todo-list-table tbody td,
      #todos .todo-list-table tbody td:nth-child(1),
      #todos .todo-list-table tbody td:nth-child(2),
      #todos .todo-list-table tbody td.table-actions { grid-column:auto; }
    }
