/* COLLECTION DESCRIPTION MULTILANG V1 */
.c2-description-multilang-btn{white-space:nowrap}
.collection-multilang-source textarea,.collection-multilang-fields textarea{width:100%;min-height:88px;resize:vertical;font-weight:500;color:var(--text);line-height:1.55}
.collection-multilang-description-modal .collection-multilang-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.collection-multilang-description-modal .collection-multilang-fields{grid-template-columns:1fr}}

/* COLLECTION DESCRIPTION AI V1 */
.collection-description-field{display:flex!important;flex-direction:column!important}
.collection-description-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:25px}
.collection-description-label-row>span:first-child{font-size:13px;color:#3e4a4e}
.collection-description-label-row .c2-ai-toolbar{margin-left:auto}
.c2-ai-description-btn{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.c2-ai-description-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
.c2-ai-description-btn.is-loading{opacity:.7}

:root {
  --bg: #f0f2f5;
  --panel: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --success: #059669;
  --success-light: #d1fae5;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --teal: #0891b2;
  --teal-light: #cffafe;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--text); transition: border-color .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
/* 复选框/单选框点击时不要光晕，保留键盘 focus-visible */
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none !important; outline: none !important; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%); }
.login-card { background: #fff; padding: 40px 36px; border-radius: 16px; width: 360px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-card .sub { color: var(--text-secondary); margin: 0 0 24px; font-size: 13px; }
.login-card input { width: 100%; margin-bottom: 14px; }
.login-card button { width: 100%; background: var(--primary-gradient); color: #fff; border: none; padding: 11px; border-radius: var(--radius); font-size: 15px; font-weight: 600; transition: opacity .2s; }
.login-card button:hover { opacity: .9; }
.login-card .hint { margin-top: 16px; font-size: 12px; color: var(--text-muted); text-align: center; }
.login-card .admin-info { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 15px; color: var(--text); margin-bottom: 16px; line-height: 1.8; }
.login-card .admin-info b { color: var(--primary); font-size: 18px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { padding: 20px 18px 14px; font-weight: 800; color: var(--primary); font-size: 20px; letter-spacing: -.5px; display: flex; align-items: center; gap: 8px; }
.sidebar .logo span { background: var(--primary-gradient); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.sidebar nav { flex: 1; padding: 8px 10px; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius); color: var(--text); text-decoration: none; margin-bottom: 2px; font-size: 14px; transition: all .15s; }
.sidebar nav a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar nav a.active { background: var(--primary-gradient); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; margin-left: auto; }
.nav-badge:empty, .nav-badge[data-count="0"] { display: none; }
.user-box { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 13px; background: #fafafa; }
.link { background: none; border: none; color: var(--primary); padding: 0; font-size: 13px; }
.link:hover { text-decoration: underline; }
.content { flex: 1; padding: 24px 28px; overflow: auto; max-height: 100vh; overflow-y: auto; }

/* 通用 */
.view h2 { margin: 0 0 18px; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--primary); color: #fff; border: none; padding: 8px 16px; border-radius: var(--radius); font-size: 14px; font-weight: 500; transition: all .15s; }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #f9fafb; border-color: #d1d5db; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid var(--danger-light); }
.btn.danger:hover { background: var(--danger-light); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* 表格 */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
#tbl-orders .order-row-index { width: 52px; min-width: 52px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
th { background: #f9fafb; font-weight: 600; font-size: 13px; color: var(--text-secondary); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f0f7ff; }

/* 状态标签 */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.pill.pending { background: var(--warning-light); color: var(--warning); }
.pill.pending::before { background: var(--warning); }
.pill.paid { background: var(--primary-light); color: var(--primary); }
.pill.paid::before { background: var(--primary); }
.pill.shipped { background: var(--success-light); color: var(--success); }
.pill.shipped::before { background: var(--success); }
.pill.done { background: #f3f4f6; color: #6b7280; }
.pill.done::before { background: #6b7280; }
.pill.cancelled { background: var(--danger-light); color: var(--danger); }
.pill.cancelled::before { background: var(--danger); }
.pill.refund { background: var(--purple-light); color: var(--purple); }
.pill.refund::before { background: var(--purple); }
.black { color: var(--danger); font-weight: 700; }

/* KPI 卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; transition: box-shadow .2s; }
.card:hover { box-shadow: var(--shadow-md); }
.card .label { color: var(--text-secondary); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.card .value { font-size: 26px; font-weight: 800; margin-top: 2px; letter-spacing: -.5px; }
.card .value.green { color: var(--success); }
.card .value.red { color: var(--danger); }
.card .sub-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.card .trend { font-size: 12px; font-weight: 600; }
.card .trend.up { color: var(--success); }
.card .trend.down { color: var(--danger); }

/* 分页 */
.pager { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
.pager .pager-info { color: var(--text-secondary); font-size: 13px; }
.pager .pager-info b { color: var(--text); font-weight: 600; }
.pager .pager-size { color: var(--text-secondary); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.pager .pager-input { width: 54px; text-align: center; padding: 4px 6px; font-size: 13px; border-radius: 6px; }
.pager .pager-select { min-width: 64px; padding: 5px 8px; font-size: 13px; border-radius: 6px; }
.pager .btn:disabled { opacity: .5; cursor: not-allowed; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
.modal { background: #fff; border-radius: 16px; width: 700px; max-width: 94vw; max-height: 90vh; overflow: auto; padding: 28px 30px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 20px; font-size: 18px; font-weight: 700; }
.modal .row { display: flex; gap: 12px; margin-bottom: 14px; }
.modal .row > label { width: 100px; padding-top: 8px; color: var(--text-secondary); flex-shrink: 0; font-size: 13px; }
.modal .row > div { flex: 1; }
.modal .row input, .modal .row select, .modal .row textarea { width: 100%; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

.items-table input { width: 100%; padding: 5px 7px; }
.add-item { margin-top: 8px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 12px 20px; border-radius: var(--radius); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 1300; font-size: 14px; box-shadow: var(--shadow-lg); white-space: nowrap; }
.toast.show { opacity: 1; }

.section-title { font-weight: 700; margin: 20px 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.section-title:before { content: ''; width: 3px; height: 16px; background: var(--primary); border-radius: 2px; }
.muted { color: var(--text-muted); }
.empty { text-align: center; color: var(--text-muted); padding: 60px; font-size: 15px; }

/* 打印拣货单 */
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area { position: absolute; left: 0; top: 0; width: 100%; }
}

/* 店铺切换器 */
.store-switch { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.store-switch select { width: 100%; font-size: 13px; padding: 6px 10px; }

/* 侧边栏子导航 */
.nav-group { margin: 2px 0; }
.nav-title { display: block; padding: 8px 18px 4px; font-weight: 600; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; cursor: default; }
.nav-children a { display: block; padding: 6px 18px 6px 34px; text-decoration: none; font-size: 13px; color: var(--text-secondary); border-radius: 6px; margin: 1px 8px; transition: all .15s; }
.nav-children a:hover { background: var(--primary-light); color: var(--primary); }
.nav-children a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* 数据大屏 */
.screen-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.screen-bar h2 { margin: 0; font-size: 22px; }
.screen-tools { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg button { border: none; background: #fff; padding: 7px 14px; font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: all .15s; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { background: var(--primary-light); color: var(--primary); }
.seg button.active { background: var(--primary); color: #fff; font-weight: 600; }
.screen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.screen-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.sc-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.chart { width: 100%; height: 300px; }
#view-screen:fullscreen { background: var(--bg); padding: 28px; overflow: auto; }
#view-screen:fullscreen .screen-grid { grid-template-columns: repeat(2, 1fr); }
#view-screen:fullscreen .chart { height: 46vh; }
@media (max-width: 1100px) { .screen-grid { grid-template-columns: 1fr; } }

/* 数据大屏 - 金融卡片（方案一：极简白卡等宽，去渐变） */
#screen-financial { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; justify-content: center; max-width: 1100px; margin-left: auto; margin-right: auto; }
#screen-financial .fin-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 24px; min-width: 0; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s; }
#screen-financial .fin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
#screen-financial .fin-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #6b7280; margin-bottom: 10px; }
#screen-financial .fin-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
#screen-financial .fin-cny { font-size: 36px; font-weight: 800; color: #111827; line-height: 1.1; letter-spacing: -.5px; }
#screen-financial .fin-usd { font-size: 13px; color: #9ca3af; margin-top: 6px; }
@media (max-width: 1100px) { #screen-financial { grid-template-columns: 1fr; max-width: 520px; } }

/* 数据大屏 - 四等分经营指标卡：占满内容区，突出核心数字 */
#screen-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: none; margin: 0 0 18px; }
#screen-kpi .kpi-card { position: relative; display: flex; min-width: 0; min-height: 170px; flex-direction: column; overflow: hidden; text-align: left; border: 1px solid #e2e8e5; background: linear-gradient(155deg,#fff 0%,#fff 68%,color-mix(in srgb,var(--kpi-accent,#14815f) 4%,#fff) 100%); border-radius: 16px; padding: 20px 22px 18px; box-shadow: 0 2px 8px rgba(20,46,38,.045); transition: transform .18s, box-shadow .18s, border-color .18s; }
#screen-kpi .kpi-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--kpi-accent,#14815f); opacity: .8; }
#screen-kpi .kpi-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb,var(--kpi-accent,#14815f) 26%,#dfe7e3); box-shadow: 0 10px 28px rgba(20,46,38,.09); }
#screen-kpi .kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
#screen-kpi .kpi-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin: 0; font-size: 16px; background: var(--ic-bg, var(--primary-light)); color: var(--ic-fg, var(--primary)); flex-shrink: 0; }
#screen-kpi .kpi-icon .icon { width: 18px; height: 18px; }
#screen-kpi .kpi-period { padding: 4px 8px; border: 1px solid color-mix(in srgb,var(--kpi-accent,#14815f) 12%,#e7ebe9); border-radius: 99px; color: var(--text-muted); background: rgba(255,255,255,.72); font-size: 10.5px; letter-spacing: .02em; }
#screen-kpi .kpi-card .label { font-size: 12px; color: #68756f; margin-bottom: 4px; }
#screen-kpi .kpi-card .value { overflow: hidden; font-size: clamp(25px,1.65vw,32px); line-height: 1.18; font-weight: 730; color: #12201c; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
#screen-kpi .kpi-card .value.green { color: var(--success); }
#screen-kpi .kpi-card .value.red { color: var(--danger); }
#screen-kpi .kpi-card .kpi-sub { overflow: hidden; font-size: 11px; color: var(--text-muted); margin-top: 5px; text-overflow: ellipsis; white-space: nowrap; }
#screen-kpi .kpi-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 25px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: 11px; }
#screen-kpi .kpi-meta strong { color: var(--text); font-size: 11.5px; font-weight: 680; }
@media (max-width: 720px) { #screen-kpi { grid-template-columns: repeat(2, 1fr); } }

/* 表格选择列 */
table th input[type=checkbox], table td input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
table tr.selected { background-color: #e0f2fe !important; }
.sel-toolbar { display: none; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); }
.sel-toolbar.visible { display: flex; }
.sel-toolbar .sel-count { font-weight: 600; color: var(--primary); }

/* 热销产品表格 */
#chart-hot-products { max-height: 520px; overflow: auto; border-radius: var(--radius); }
#chart-hot-products table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hot-products-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hot-products-table th, .hot-products-table td { padding: 10px 10px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.hot-products-table th { background: #f9fafb; font-weight: 600; color: var(--text-secondary); position: sticky; top: 0; z-index: 1; }
.hot-products-table td { color: var(--text); }
.hot-products-table td code { font-size: 11px; background: #f3f4f6; padding: 3px 6px; border-radius: 4px; }
.hot-products-table tbody tr:hover { background: #f0f7ff; }
.hot-products-table tbody tr:last-child td { border-bottom: none; }
.hot-product-thumb { display: block; width: 44px; height: 44px; margin: 0 auto; object-fit: cover; border: 1px solid var(--border-light); border-radius: 9px; background: #f5f7f6; }
#chart-hot-products .hot-products-table th:first-child,
#chart-hot-products .hot-products-table td:first-child { width: 36px; min-width: 36px; text-align: center; }
#chart-hot-products .hot-products-table th:nth-child(2),
#chart-hot-products .hot-products-table td:nth-child(2) { width: 92px; min-width: 92px; max-width: 92px; padding-left: 8px; padding-right: 8px; text-align: center; }

/* 盈利/亏损货号图表的图片横轴 */
.product-rank-chart { height: 230px; }
.chart-product-strip { display: grid; align-items: start; gap: 2px; min-height: 82px; margin: 0 20px 0 72px; padding-top: 7px; border-top: 1px solid var(--border-light); }
.chart-product-item { min-width: 0; text-align: center; }
.chart-product-code { min-height: 25px; padding: 0 2px; overflow: hidden; color: var(--text-secondary); font-size: 9.5px; line-height: 1.2; text-overflow: ellipsis; word-break: break-all; }
.chart-product-thumb, .chart-product-placeholder { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; margin: 5px auto 0; border: 1px solid var(--border-light); border-radius: 8px; background: #f5f7f6; color: var(--text-muted); object-fit: cover; }
.chart-product-item.no-image .chart-product-code::after { content: ''; }
@media (max-width: 1200px) {
  .chart-product-code { font-size: 8.5px; }
  .chart-product-thumb, .chart-product-placeholder { width: 34px; height: 34px; }
}
#chart-hot-products th, #chart-hot-products td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); text-align: left; }
#chart-hot-products th { background: #f9fafb; font-weight: 600; position: sticky; top: 0; z-index: 1; }
#chart-hot-products tr:hover { background: #f0f7ff; }
#chart-hot-products tr:first-child td { font-weight: 700; color: var(--primary); }
.green { color: var(--success); font-weight: 600; }
.red { color: var(--danger); font-weight: 600; }
.orange { color: #e08e0b; font-weight: 600; }
/* 折扣监控：>60% 高风险折扣行高亮 */
.discount-high { background: #fff1f0; }
.discount-high td { border-color: #ffccc7; }
.discount-high:hover { background: #ffe7e3; }

/* 店铺排名 */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list-head, .rank-list li { display: grid; grid-template-columns: 36px minmax(160px,1fr) 82px 112px 90px; align-items: center; column-gap: 12px; }
.rank-list-head { padding: 2px 0 7px; color: var(--text-muted); font-size: 10.5px; }
.rank-list-head span:nth-child(n+3) { text-align: right; }
.rank-list li { min-height: 42px; padding: 7px 0; border-bottom: 1px solid var(--border-light); }
.rank-list li:last-child { border-bottom: none; }
.rank-num { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #f3f4f6; color: var(--text-secondary); flex-shrink: 0; }
.rank-num.top1 { background: #fef3c7; color: #d97706; }
.rank-num.top2 { background: #e5e7eb; color: #6b7280; }
.rank-num.top3 { background: #fed7aa; color: #c2410c; }
.rank-name { flex: 1; font-weight: 500; }
.rank-orders { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.rank-orders strong { font-size: 13px; font-weight: 700; }
.rank-orders small { color: var(--text-muted); font-size: 10px; }
.rank-rev { font-weight: 700; color: var(--primary); }
.rank-rev, .rank-profit { text-align: right; font-variant-numeric: tabular-nums; }
.rank-profit { font-size: 12px; color: var(--text-secondary); }

/* 产品销量分析卡片 */
.sales-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.sales-stat.product-sales-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 8px; }
.product-sales-note {
  flex: 0 0 auto;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 12px;
}
.stat-item { background: #f9fafb; border-radius: var(--radius); padding: 12px 16px; text-align: center; }
.stat-item .num { font-size: 20px; font-weight: 800; color: var(--primary); }
.stat-item .lbl { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* 商品缩略图 */
.prod-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border-light); }
.prod-img-sm { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.tag.blue { background: var(--primary-light); color: var(--primary); }
.tag.green { background: var(--success-light); color: var(--success); }
.tag.yellow { background: var(--warning-light); color: var(--warning); }
.tag.red { background: var(--danger-light); color: var(--danger); }
.tag.purple { background: var(--purple-light); color: var(--purple); }

/* 弹窗内的图片 */
.modal img.prod-img-lg { max-width: 100px; max-height: 100px; border-radius: 8px; }

/* 空状态图片列样式 */
td img.prod-img { vertical-align: middle; }

/* SHEIN 账号管理 */
#sh-acct-list table { width: 100%; border-collapse: collapse; font-size: 13px; }
#sh-acct-list th, #sh-acct-list td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.sync-current-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 8px;
  padding: 11px 14px;
  border: 1px solid rgba(23, 121, 91, .14);
  border-radius: 10px;
  background: rgba(23, 121, 91, .06);
  color: var(--text);
}
.sync-current-status b { color: var(--primary); }
.sync-current-status span { color: var(--text-muted); font-size: 12px; white-space: nowrap; }

/* 时间范围切换激活样式 */
.range-btn { }

/* 可排序表头 */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #e5e7eb; }
th.sortable .sort-arrow { color: var(--primary); font-size: 12px; margin-left: 2px; }
th.sortable.sorted { color: var(--primary); }

/* 数据大屏产品销量表格 */
.screen-ps-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.screen-ps-table th, .screen-ps-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.screen-ps-table th { background: #f9fafb; font-weight: 600; color: var(--text-secondary); position: sticky; top: 0; z-index: 1; }
.screen-ps-table td { color: var(--text); vertical-align: middle; }
.screen-ps-table tbody tr:hover { background: #f0f7ff; }

/* 用户区声音开关：悬浮在铃铛正上方的 Apple 风格音量控制 */
#sound-toggle { font-size: 16px; padding: 2px 6px; cursor: pointer; }
.user-box { position: relative; }
.sound-control { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.sound-control::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 56px;
  height: 16px;
  transform: translateX(-50%);
}
.sound-slider {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 220;
  width: 54px;
  height: 174px;
  padding: 11px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 27px;
  color: #24312c;
  background: rgba(247,249,248,.86);
  box-shadow: 0 16px 44px rgba(5,14,10,.22), inset 0 1px rgba(255,255,255,.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(7px) scale(.96);
  transform-origin: 50% 100%;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2,.8,.2,1), visibility .18s;
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
}
.sound-slider::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(255,255,255,.72);
  background: rgba(247,249,248,.9);
  transform: translateX(-50%) rotate(45deg);
}
.sound-slider.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.sound-val {
  min-width: 32px;
  margin-bottom: 7px;
  color: #52605a;
  text-align: center;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.sound-track {
  position: relative;
  width: 30px;
  height: 112px;
  overflow: hidden;
  border: 1px solid rgba(18,31,25,.07);
  border-radius: 16px;
  background: rgba(31,45,39,.09);
  box-shadow: inset 0 1px 4px rgba(9,20,15,.08);
  cursor: ns-resize;
  touch-action: none;
}
.sound-track:focus-visible { outline: 2px solid rgba(22,106,84,.35); outline-offset: 3px; }
.sound-fill {
  position: absolute;
  inset: auto 0 0;
  height: 100%;
  border-radius: 15px;
  background: linear-gradient(180deg, #58b394 0%, #19735a 100%);
  pointer-events: none;
  transition: height .06s linear;
}
.sound-thumb {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  width: 26px;
  height: 5px;
  border: 0;
  border-radius: 4px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 4px rgba(11,25,19,.24);
  transform: translateX(-50%);
  pointer-events: none;
  transition: bottom .06s linear;
}
.sound-slider-icon { width: 13px; height: 13px; margin-top: 7px; color: #67746f; stroke-width: 1.8; }

/* 在线表格（腾讯文档导入，可编辑） */
.sheet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.sheet-card { background: var(--card, #fff); border: 1px solid var(--border-light); border-radius: 8px; padding: 14px; cursor: pointer; transition: .15s; }
.sheet-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.sheet-card-name { font-weight: 600; margin-bottom: 6px; color: var(--text); }
.sheet-card-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.sheet-card-actions { margin-top: 10px; display: flex; justify-content: flex-end; }
.sheet-group { margin: 18px 0 4px; font-size: 15px; color: var(--text); border-left: 3px solid var(--primary); padding-left: 8px; }
.sheet-grid.dim { opacity: .6; }
.sht-editor-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.sht-editor-bar .spacer { flex: 1; }
.sht-editor-bar #sht-title { font-size: 16px; color: var(--text); }
.sht-editor-bar #sht-status { font-size: 12px; }
#sht-lk { border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; background: #fff; }
.sht-loading, .sht-empty { padding: 40px; text-align: center; color: var(--text-secondary); font-size: 15px; }
.sht-tabs { display: flex; align-items: center; gap: 2px; padding: 6px 8px; background: #f8fafc; border-top: 1px solid var(--border-light); overflow-x: auto; flex-shrink: 0; }
.sht-tab { padding: 8px 16px; font-size: 13px; color: var(--text-secondary); cursor: pointer; border-radius: 6px 6px 0 0; white-space: nowrap; user-select: none; border-bottom: 2px solid transparent; }
.sht-tab:hover { background: #eef2ff; color: var(--primary); }
.sht-tab.active { background: #fff; color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.sheet-hidden-list { display: flex; flex-direction: column; gap: 10px; min-width: 280px; }
.sheet-hidden-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f8fafc; border-radius: 6px; }
.sheet-hidden-row span { font-size: 14px; color: var(--text); }
.sheets-grid { overflow-x: auto; margin: 10px 0; border: 1px solid var(--border-light); border-radius: 8px; }
.tbl-sheets { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl-sheets td { border: 1px solid var(--border-light); padding: 5px 8px; vertical-align: top; max-width: 280px; word-break: break-word; color: var(--text); }
.tbl-sheets tr.sheet-head td { background: #f3f4f6; font-weight: 600; }
.tbl-sheets td.cell { cursor: text; }
.tbl-sheets td.cell:hover { background: #fafafe; }
.tbl-sheets td.cell:focus { background: #eef2ff; outline: 2px solid var(--primary); }
.tbl-sheets td.cell.saving { background: #fef9c3; }
.tbl-sheets td.cell.saved { background: #dcfce7; }
.tbl-sheets td.row-no { background: #fafafa; color: var(--text-secondary); text-align: center; width: 38px; }
.tbl-sheets td.row-actions { white-space: nowrap; text-align: center; width: 76px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: #fff; border-radius: 10px; max-width: 90vw; max-height: 85vh; overflow: auto; min-width: 320px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.modal-body { padding: 16px; }

/* ==========================================================================
   2026 UI refresh — quiet, precise and intentionally minimal
   ========================================================================== */
:root {
  --bg: #f4f5f3;
  --panel: #ffffff;
  --panel-soft: #f8f9f7;
  --border: #e3e6e1;
  --border-light: #edf0eb;
  --text: #17201d;
  --text-secondary: #66706c;
  --text-muted: #939b97;
  --primary: #166a54;
  --primary-dark: #0f5744;
  --primary-light: #e9f2ee;
  --primary-gradient: #166a54;
  --success: #16745a;
  --success-light: #e7f3ee;
  --warning: #9a6514;
  --warning-light: #fbf1dd;
  --danger: #b34040;
  --danger-light: #f9e9e7;
  --purple: #6d5a9a;
  --purple-light: #f0ecf7;
  --teal: #277085;
  --teal-light: #e8f2f4;
  --radius: 9px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(22, 32, 29, .05);
  --shadow-md: 0 10px 30px rgba(22, 32, 29, .07);
  --shadow-lg: 0 24px 70px rgba(18, 28, 24, .15);
  --sidebar: #18221f;
  --sidebar-muted: #8f9d97;
  --sidebar-text: #dce4e0;
}

html { background: var(--bg); }
body {
  font-family: Inter, "SF Pro Text", "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -.006em;
  background:
    radial-gradient(circle at 80% -15%, rgba(22,106,84,.045), transparent 28rem),
    var(--bg);
}
::selection { color: #fff; background: rgba(22,106,84,.8); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd0cc; border: 2px solid transparent; border-radius: 10px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aeb6b1; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 21px; height: 21px; }
.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: #a8d4c6;
  background: transparent;
}
.brand-mark .icon { width: 19px; height: 19px; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-wordmark { display: block; flex: 0 0 auto; width: 150px; height: auto; }
.brand-word { font-size: 15px; font-weight: 550; letter-spacing: .06em; white-space: nowrap; }
.brand-word b { font-weight: 760; }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }

button, input, select, textarea { font: inherit; }
input, select, textarea {
  min-height: 38px;
  padding: 8px 11px;
  border-color: var(--border);
  border-radius: 9px;
  background-color: rgba(255,255,255,.92);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
input::placeholder, textarea::placeholder { color: #a5aca8; }
input:hover, select:hover, textarea:hover { border-color: #cbd1cd; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(22,106,84,.65);
  box-shadow: 0 0 0 3px rgba(22,106,84,.1);
  background: #fff;
}
/* 复选框/单选框点击时不要 box-shadow + outline 长方形光晕，保留键盘 focus-visible */
input[type="checkbox"]:focus, input[type="radio"]:focus {
  box-shadow: none !important;
  outline: none !important;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid rgba(64,158,130,.75);
  outline-offset: 2px;
}

/* Login */
.login-wrap {
  padding: 28px;
  background:
    radial-gradient(circle at 20% 16%, rgba(103,183,158,.16), transparent 25rem),
    linear-gradient(145deg, #111a17 0%, #1b2925 54%, #17211e 100%);
}
.login-wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 56px 56px;
}
.login-card {
  position: relative;
  width: min(430px, 100%);
  padding: 38px 40px 34px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 20px;
  box-shadow: 0 30px 100px rgba(0,0,0,.32);
}
.login-brand { display: flex; align-items: center; gap: 13px; color: var(--text); }
.login-brand .brand-mark { width: 76px; height: 76px; }
.login-brand .brand-wordmark { width: 226px; }
.login-brand .brand-mark { color: var(--primary); border: 0; background: transparent; }
.login-intro { margin: 48px 0 26px; }
.login-card h1 { margin: 5px 0 4px; font-size: 28px; font-weight: 680; letter-spacing: -.04em; }
.login-card .sub { margin: 0; color: var(--text-secondary); font-size: 14px; }
.field-label { display: block; margin: 14px 0 6px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.login-card input { margin-bottom: 0; height: 44px; }
.login-card button[type="submit"] {
  margin-top: 20px;
  min-height: 44px;
  border-radius: 10px;
  background: var(--primary);
  font-weight: 650;
  letter-spacing: .01em;
}
.login-card button[type="submit"]:hover { opacity: 1; background: var(--primary-dark); }
.login-card .error { margin: 7px 0 0; }
.login-card .hint { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 20px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #55a98e; box-shadow: 0 0 0 3px rgba(85,169,142,.12); }

/* Navigation */
.sidebar {
  width: 244px;
  flex: 0 0 244px;
  color: var(--sidebar-text);
  background: var(--sidebar);
  border-right: 0;
  box-shadow: inset -1px 0 rgba(255,255,255,.03);
}
.sidebar .logo { min-height: 76px; padding: 7px 12px; color: #f4f7f5; gap: 8px; }
.sidebar .logo .brand-mark {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 0;
  color: #a8d4c6;
  background: transparent;
  font-size: inherit;
  font-weight: inherit;
}
.sidebar .logo .brand-word {
  padding: 0;
  color: #f4f7f5;
  background: transparent;
  border-radius: 0;
  font-size: 18px;
  font-weight: 550;
}
.sidebar .logo .brand-wordmark { width: 126px; height: auto; }
.store-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: rgba(255,255,255,.045);
}
.store-switch > .icon { width: 16px; height: 16px; color: #91a39c; }
.store-switch select {
  width: 100%;
  min-height: 24px;
  padding: 0 20px 0 0;
  border: 0;
  color: #d8e0dc;
  background-color: transparent;
  font-size: 12px;
  box-shadow: none;
}
.store-switch select option { color: var(--text); background: #fff; }
.sidebar nav { padding: 7px 10px 12px; }
.nav-section-label {
  padding: 14px 10px 5px;
  color: #6f8179;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.sidebar nav a {
  position: relative;
  gap: 10px;
  min-height: 38px;
  margin: 1px 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.sidebar nav a .icon { width: 17px; height: 17px; opacity: .9; }
.sidebar nav a:hover { color: #ecf3ef; background: rgba(255,255,255,.055); }
.sidebar nav a.active {
  color: #fff;
  background: rgba(116,190,166,.14);
  box-shadow: none;
  font-weight: 620;
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 2px;
  height: 18px;
  border-radius: 0 2px 2px 0;
  background: #78c2aa;
}
.nav-badge { min-width: 20px; height: 18px; padding: 0 5px; background: rgba(255,255,255,.12); color: #dfe9e5; font-size: 10px; }
.sidebar nav a.active .nav-badge { background: rgba(119,194,169,.2); color: #bfe5d8; }
.user-box {
  min-height: 58px;
  justify-content: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-color: rgba(255,255,255,.075);
  color: #b8c4bf;
  background: rgba(0,0,0,.08);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #78b9a5, #326b59);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
#user-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.sidebar .link { color: #92a29c; font-size: 11px; }
.sidebar .link:hover { color: #fff; text-decoration: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 5px; border: 0; border-radius: 7px; color: inherit; background: transparent; }
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
#sound-toggle { padding: 6px; font-size: inherit; }
#sound-toggle .icon { width: 16px; height: 16px; }

/* Main workspace */
.content {
  position: relative;
  min-width: 0;
  padding: 34px 38px 48px;
  scroll-behavior: smooth;
}
.view { width: 100%; max-width: none; margin: 0; }

/* 数据列表页：标题/筛选/统计固定，仅表格数据区域滚动 */
.frozen-table-page {
  display: flex;
  width: 100%;
  height: calc(100vh - 82px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}
.frozen-page-head { flex: 0 0 auto; }
.order-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}
.order-title-row h2 { margin: 0; }
.order-scope-badge,
.order-scope-all {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid #d7e5df;
  border-radius: 999px;
  background: #edf6f2;
  color: var(--primary);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.order-scope-badge {
  cursor: pointer;
  font-family: inherit;
}
.order-scope-badge:hover {
  border-color: #9fc9b9;
  background: #e3f2ec;
}
.order-scope-all {
  border-color: #e2e6e3;
  background: #f6f7f6;
  color: var(--text-muted);
}
.frozen-page-body {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}
.page-table-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.page-table-scroll table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.page-table-scroll thead th {
  position: sticky;
  z-index: 8;
  top: 0;
  background: #f8faf9;
  box-shadow: inset 0 -1px var(--border), 0 3px 8px rgba(17,35,29,.035);
}

/* 商品采集 / 产品管理等页面表格容器：与 .page-table-scroll 保持一致视觉（白底+边框+圆角+阴影+粘性表头+浅绿表头） */
.table-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.table-scroll table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.table-scroll thead th {
  position: sticky;
  z-index: 8;
  top: 0;
  background: #f8faf9;
  box-shadow: inset 0 -1px var(--border), 0 3px 8px rgba(17,35,29,.035);
}
.frozen-page-body > .pager,
.frozen-page-body > .sel-toolbar,
.frozen-page-summary { flex: 0 0 auto; }
.frozen-page-body > .pager { margin-top: 10px; }
.frozen-page-summary { margin: 10px 2px 0; }
.product-sales-frozen-body .sales-stat { flex: 0 0 auto; }
.product-sales-frozen-body > .page-table-scroll { flex: 1 1 auto; }
#view-sheets {
  position: absolute;
  inset: 0;
  width: auto;
  max-width: none;
  margin: 0;
  background: #fff;
}
.sheets-univer-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 600px;
  margin: 0;
  border: 0;
  background: #fff;
}
.view > h2:first-child, .view h2 {
  color: var(--text);
  font-size: 23px;
  font-weight: 660;
  letter-spacing: -.035em;
}
.view > h2:not(:first-child) { margin-top: 30px; font-size: 17px; letter-spacing: -.02em; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-head h2 { margin: 3px 0 0; }
.page-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 13px; }
.page-meta { color: var(--text-muted); font-size: 12px; }

.toolbar { gap: 9px; margin-bottom: 18px; }
.toolbar > label { min-height: 38px; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px 0 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255,255,255,.72);
  color: #6d7872;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}
.filter-chip:hover { color: var(--text); border-color: #cbd2cd; background: #fff; }
.filter-chip input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
}
.filter-chip:has(input:checked) {
  color: var(--primary);
  border-color: #bfd8cc;
  background: #eef6f2;
}
.btn {
  min-height: 36px;
  padding: 7px 13px;
  gap: 7px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: var(--primary);
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: .005em;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn .icon { width: 15px; height: 15px; }
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: none; box-shadow: 0 5px 14px rgba(22,106,84,.14); }
.btn.secondary { color: #3c4843; border-color: var(--border); background: rgba(255,255,255,.8); }
.btn.secondary:hover { color: var(--text); border-color: #cbd2cd; background: #fff; box-shadow: var(--shadow); }
.btn.danger { color: var(--danger); border-color: #efd5d2; background: #fff; }
.btn.danger:hover { color: #963333; border-color: #e7c4c0; background: var(--danger-light); box-shadow: none; }
.btn.sm { min-height: 29px; padding: 4px 9px; border-radius: 7px; font-size: 11.5px; }
.btn.xs { min-height: 24px; padding: 3px 7px; border-radius: 6px; font-size: 10.5px; line-height: 1.2; }
.btn:disabled { opacity: .42; box-shadow: none; cursor: not-allowed; }

/* Cards and metrics */
.cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 28px; }
.card, .screen-card {
  border-color: var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}
.card { padding: 18px 19px; }
.card:hover { border-color: #d9ddd9; box-shadow: 0 8px 22px rgba(22,32,29,.055); }
.card .label { margin-bottom: 10px; color: var(--text-secondary); font-size: 11px; font-weight: 640; letter-spacing: .035em; }
.card .value { margin: 0; color: var(--text); font-size: 25px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.metric-card { position: relative; overflow: hidden; min-height: 118px; }
.metric-card::after { content: ""; position: absolute; right: -28px; bottom: -38px; width: 90px; height: 90px; border: 1px solid var(--border-light); border-radius: 50%; }
.metric-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-light);
}
.metric-icon .icon { width: 16px; height: 16px; }
.metric-card .label, .metric-card .value { padding-right: 35px; }
.status-grid .card { min-height: 86px; padding: 15px 17px; }
.status-grid .card .label { margin-bottom: 5px; }
.status-grid .card .value { font-size: 20px; }

/* Data surfaces */
.table-wrap, .sheets-grid, #sht-lk { border-color: var(--border); border-radius: 12px; box-shadow: var(--shadow); }
table { border-collapse: separate; border-spacing: 0; }
th, td { height: 43px; padding: 9px 13px; border-color: var(--border-light); }
th {
  color: #707a75;
  background: #f7f8f6;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .025em;
}
tbody td { color: #38433e; font-size: 12.5px; }
tbody tr { transition: background-color .12s ease; }
tbody tr:hover, .hot-products-table tbody tr:hover, .screen-ps-table tbody tr:hover { background: #f5f9f7; }
th.sortable:hover { color: var(--text); background: #f1f4f1; }
th.sortable .sort-arrow { color: var(--primary); }
table th:first-child { border-top-left-radius: 10px; }
table th:last-child { border-top-right-radius: 10px; }
.pill { gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 10.5px; font-weight: 650; }
.pill::before { width: 5px; height: 5px; }
.tag { border-radius: 6px; font-weight: 650; }
.prod-img { width: 38px; height: 38px; border-radius: 8px; }
.order-list-img {
  width: 42px;
  height: 42px;
  display: block;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  object-fit: cover;
}
.order-goods-sn {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  color: #35423d;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.order-sku-attr {
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  color: #35423d;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.order-tags-cell {
  min-width: 70px;
  cursor: pointer;
  user-select: none;
}
.order-tags-cell:hover { background: rgba(22,106,84,.04); }
.order-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 4px;
  margin-bottom: 2px;
  line-height: 1.4;
  white-space: nowrap;
}
.order-tag-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 14px;
}
.profit-tags-cell {
  white-space: normal !important;
  line-height: 1.35;
}
.profit-accounting-tag {
  margin-top: 3px;
}
.profit-return-tag {
  margin-top: 3px;
}
.profit-return-tag .order-tag-pill {
  background: #b42318;
  color: #fff;
  font-weight: 700;
}
#tbl-rpt tbody tr.profit-physical-return-row > td {
  background: #fff4f2;
}
#tbl-rpt tbody tr.profit-physical-return-row:hover > td {
  background: #fee9e6;
}
.img-zoomable {
  cursor: zoom-in;
  transition: transform .16s ease, box-shadow .16s ease, outline-color .16s ease;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.img-zoomable:hover {
  position: relative;
  z-index: 2;
  transform: scale(1.06);
  outline-color: rgba(22,106,84,.22);
  box-shadow: 0 4px 12px rgba(14,35,26,.12);
}
.image-hover-preview {
  position: fixed;
  z-index: 1400;
  left: 0;
  top: 0;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 18px;
  background: rgba(247,249,248,.9);
  box-shadow: 0 22px 70px rgba(9,24,17,.24), inset 0 1px rgba(255,255,255,.86);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px) scale(.965);
  transform-origin: center;
  transition: opacity .16s ease, transform .2s cubic-bezier(.2,.8,.2,1), visibility .16s;
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
}
.image-hover-preview.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.image-hover-preview-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(45deg, #eef0ee 25%, transparent 25%),
    linear-gradient(-45deg, #eef0ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef0ee 75%),
    linear-gradient(-45deg, transparent 75%, #eef0ee 75%),
    #f8f9f8;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}
.image-hover-preview img {
  display: block;
  width: min(390px, 34vw);
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}
.empty { padding: 72px 24px; color: var(--text-muted); }

.pager { gap: 8px; padding: 10px 12px; border-color: var(--border); border-radius: 11px; box-shadow: var(--shadow); }
.pager .pager-info, .pager .pager-size { font-size: 11.5px; }
.pager .pager-input, .pager .pager-select { min-height: 29px; }
.sel-toolbar { border-color: #cfe2d9; border-radius: 9px; background: #eef6f2; }

#view-inventory .toolbar #i-new { margin-left: auto; }
#view-inventory .toolbar .spacer { flex: 0; }
.product-sales-table {
  table-layout: fixed;
}
.product-sales-table .ps-rank { width: 44px; }
.product-sales-table .ps-product { width: 30%; max-width: 500px; }
.product-sales-table .ps-sku { width: 128px; }
.product-sales-table .ps-goods { width: 118px; }
.product-sales-table .ps-spec { width: 120px; }
.product-sales-table .ps-store { width: 128px; }
.product-sales-table .ps-num { width: 74px; }
.product-sales-table .ps-rate { width: 76px; }
.product-sales-table .ps-money { width: 96px; }
.product-sales-table .ps-date { width: 150px; }
.product-sales-table th,
.product-sales-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-product-cell,
.ps-spec-cell {
  min-width: 0;
  max-width: 100%;
}
.ps-product-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ps-product-cell > span,
.ps-spec-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dialogs and feedback */
.modal-mask, .modal-overlay { background: rgba(13,22,18,.52); backdrop-filter: blur(8px); }
.modal, .modal-box {
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 17px;
  box-shadow: var(--shadow-lg);
}
.modal { padding: 27px 29px; }
.modal h3 { font-size: 18px; font-weight: 660; letter-spacing: -.025em; }
.modal .row > label { color: var(--text-secondary); font-size: 12px; font-weight: 580; }
.modal-head { padding: 15px 18px; }
.toast { bottom: 28px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: #17211e; font-size: 12px; }
.error { color: var(--danger); }
.section-title { font-size: 14px; }
.section-title::before { width: 2px; height: 14px; background: var(--primary); }

/* Dashboard / analytics */
.screen-bar { margin-bottom: 22px; }
.screen-bar h2 { font-size: 23px; font-weight: 660; letter-spacing: -.035em; }
.screen-card { padding: 18px 20px; }
.sc-title { margin-bottom: 14px; font-size: 12px; font-weight: 660; letter-spacing: .015em; }
.sc-title .icon { width: 16px; height: 16px; color: var(--primary); }
.chart { height: 290px; }
.seg { border-color: var(--border); border-radius: 9px; box-shadow: var(--shadow); }
.seg button { padding: 7px 12px; color: var(--text-secondary); font-size: 11.5px; background: #fff; }
.seg button + button { border-color: var(--border); }
.seg button:hover { color: var(--primary); background: var(--panel-soft); }
.seg button.active { color: #fff; background: var(--primary); }
#screen-kpi .kpi-card { text-align: left; align-items: stretch; }
.rank-num { border-radius: 7px; }
.rank-rev { color: var(--text); }
.stat-item { border: 1px solid var(--border-light); border-radius: 10px; background: var(--panel-soft); }
.stat-item .num { color: var(--text); font-weight: 680; }

/* Settings and sheets */
#view-settings > h2:not(:first-child) {
  padding-top: 25px;
  border-top: 1px solid var(--border);
}
#view-settings details { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: #fff; }
#view-settings code { border-color: var(--border) !important; }
.sheet-card { padding: 17px; border-color: var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.sheet-card:hover { border-color: #bdcec7; box-shadow: var(--shadow-md); }
.sheet-group { border-left: 0; padding-left: 0; font-weight: 650; }
.sht-editor-bar { min-height: 42px; }
.sht-tabs { background: #f7f8f6; }
.sht-tab { border-radius: 7px; }
.sht-tab:hover { color: var(--primary); background: var(--primary-light); }
.sht-tab.active { color: var(--primary); background: #fff; }
/* 订单标签 */
.tag-picker-pop {
  position: absolute;
  z-index: 1100;
  min-width: 180px;
  max-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
}
.tag-picker-title { font-size: 13px; font-weight: 650; margin-bottom: 8px; color: var(--text); }
.tag-picker-list { max-height: 260px; overflow-y: auto; }
.tag-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
}
.tag-picker-item:hover { background: var(--panel-soft); }
.tag-picker-item input { cursor: pointer; }
.tag-color-block {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
}
.tag-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.tag-manager-modal { max-width: 420px; }
.tag-manager-list { max-height: 360px; overflow-y: auto; }
.tag-manager-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.tag-color-input {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}
.tag-name-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.tag-name-input:focus { outline: none; border-color: var(--primary); }
.tag-manager-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 1100px) {
  .sidebar { width: 218px; flex-basis: 218px; }
  .content { padding: 28px 26px 42px; }
  #screen-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  #screen-kpi .kpi-card { min-height: 158px; padding: 17px 16px 15px; }
  #screen-kpi .kpi-card .value { font-size: 23px; }
}
@media (max-width: 900px) {
  #screen-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { display: block !important; }
  .sidebar { position: sticky; z-index: 50; top: 0; width: 100%; height: auto; max-height: none; flex-basis: auto; }
  .sidebar .logo { display: none; }
  .store-switch { float: left; width: 170px; height: 42px; margin: 7px 6px 7px 8px; }
  .sidebar nav { display: flex; gap: 3px; padding: 7px 5px; overflow-x: auto; }
  .nav-section-label { display: none; }
  .sidebar nav a { flex: 0 0 auto; min-height: 42px; margin: 0; padding: 10px; }
  .sidebar nav a.active::before { inset: auto 25% -7px; width: 50%; height: 2px; }
  .nav-label { display: none; }
  .user-box { display: none; }
  .content { max-height: none; min-height: calc(100vh - 56px); padding: 22px 16px 36px; overflow: visible; }
  .frozen-table-page { height: auto; min-height: 0; overflow: visible; }
  .frozen-page-body { overflow: visible; }
  .page-table-scroll { max-height: 70vh; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .toolbar { align-items: stretch; }
  .toolbar input:not([type="checkbox"]), .toolbar select { flex: 1 1 145px; min-width: 0 !important; }
  .toolbar .spacer { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-grid { grid-template-columns: 1fr; }
  .screen-tools { width: 100%; overflow-x: auto; }
  .modal { padding: 22px 18px; }
  .modal .row { flex-wrap: wrap; }
  .modal .row > label { width: 72px; }
  .pager .pager-info { width: 100%; }
  .pager .pager-size { margin-left: 0; }
}
@media (max-width: 480px) {
  .login-wrap { padding: 14px; }
  .login-card { padding: 28px 24px; }
  .login-intro { margin-top: 38px; }
  .cards, #screen-kpi, .sales-stat { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .rank-list-head, .rank-list li { grid-template-columns: 32px minmax(105px,1fr) 62px 94px; column-gap: 8px; }
  .rank-list-head span:last-child, .rank-profit { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.sync-health-center{border:1px solid var(--border,#e2e8e5);border-radius:12px;background:#fbfdfc;padding:12px}
.sync-health-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px;font-size:13px}
.sync-health-pill,.sync-health-module{border-radius:999px;padding:4px 9px;background:#eef2f0;color:#607069}
.sync-health-accounts{display:grid;gap:8px}
.sync-health-account{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:9px 10px;border-radius:9px;background:#fff;border:1px solid #edf1ef}
.sync-health-account-name{min-width:160px;display:flex;align-items:center;gap:7px}
.sync-health-dot{width:9px;height:9px;border-radius:50%;display:inline-block;background:#9aa5a0}
.sync-health-modules{display:flex;gap:6px;flex-wrap:wrap}
.sync-health-module{font-size:12px}.sync-health-module small{display:block;font-size:10px;opacity:.72}
.sync-health-healthy{background:#e7f6ef!important;color:#147455!important}.sync-health-warning,.sync-health-stale{background:#fff4df!important;color:#9a6514!important}.sync-health-error{background:#fdebea!important;color:#b7413c!important}.sync-health-unknown{background:#eef1f0!important;color:#77817d!important}
.profit-ledger-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.profit-ledger-grid>div{display:grid;gap:5px;padding:12px 14px;border:1px solid #e7ece9;border-radius:12px;background:#fbfdfc}
.profit-ledger-grid span,.profit-ledger-grid small{color:#7c8983;font-size:12px}.profit-ledger-grid strong{font-size:20px;color:#18352c}
@media(max-width:720px){.profit-ledger-grid{grid-template-columns:1fr}}

.static-chip{pointer-events:none}
.order-address-card{margin:4px 0 14px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:#f8faf9}
.order-address-title{display:flex;align-items:center;gap:7px;color:var(--text-secondary);font-size:12px;font-weight:700;margin-bottom:6px}
.order-address-title .icon{width:15px;height:15px}.order-address-value{color:var(--text);font-size:14px;font-weight:600;line-height:1.6}
.order-address-note{color:var(--text-secondary);font-size:11px;margin-top:4px}
.return-risk-table{width:100%;min-width:0;table-layout:fixed;font-size:12px}
.return-risk-table td,.return-risk-table th{vertical-align:middle;padding:9px 6px;overflow:hidden;text-overflow:ellipsis}
.return-risk-table th{white-space:normal;line-height:1.25}
.return-risk-table td{white-space:nowrap}
.return-risk-table .rr-index,.return-risk-table .rr-index-th,.return-risk-table .rr-index-cell{width:56px;min-width:56px;max-width:56px;text-align:left;padding-left:6px;padding-right:6px;color:var(--text-muted);font-weight:500}
.return-risk-table .rr-product{width:15%}.return-risk-table .rr-goods{width:7%}.return-risk-table .rr-store{width:8%}
.return-risk-table .rr-count{width:4.5%}.return-risk-table .rr-rate{width:6%}.return-risk-table .rr-critical{width:8%}
.return-risk-table .rr-money{width:6%}.return-risk-table .rr-fee{width:6%}.return-risk-table .rr-suggest{width:7%}.return-risk-table .rr-risk{width:10%}
.return-risk-table .rr-suggest-value{color:var(--accent);white-space:normal;line-height:1.25}
.return-risk-table .ps-product-cell{gap:7px;min-width:0}
.return-risk-table .ps-product-cell img{width:34px;height:34px;flex:0 0 34px}
.return-risk-table .ps-product-cell>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.return-risk-table .risk-badge{min-width:0;max-width:100%;padding:4px 7px;white-space:normal;line-height:1.2}
.return-risk-table tr.risk-danger td{background:#fff5f5}.return-risk-table tr.risk-high td{background:#fff9f2}.return-risk-table tr.risk-warning td{background:#fffdf5}
.risk-badge{display:inline-flex;align-items:center;justify-content:center;min-width:68px;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700}
.risk-badge.risk-safe{color:#08755b;background:#e7f5f0}.risk-badge.risk-warning{color:#9a6700;background:#fff3cd}
.risk-badge.risk-high{color:#b45309;background:#ffead5}.risk-badge.risk-danger{color:#b42318;background:#fee4e2}
.risk-badge.risk-unknown{color:#667085;background:#f2f4f7}
.risk-legend{display:flex;flex-wrap:wrap;gap:16px;padding:12px 4px 4px;color:var(--text-secondary);font-size:12px}
.risk-legend span{display:inline-flex;align-items:center;gap:6px}.risk-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.risk-dot.safe{background:#12a07c}.risk-dot.warning{background:#e6a700}.risk-dot.high{background:#ef7d18}.risk-dot.danger{background:#d64545}.risk-dot.unknown{background:#98a2b3}

.collection-note{margin:8px 0 0;font-size:12px}
.collection-workbench .frozen-page-head{padding-bottom:12px}
.collection-page-title{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.collection-page-title h2{margin:0 0 4px}.collection-page-title p{margin:0;color:var(--text-muted);font-size:13px}
.collection-head-actions{display:flex;gap:8px}
.collection-stats{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin-bottom:14px}
.collection-stat{appearance:none;border:1px solid var(--border);background:rgba(255,255,255,.78);border-radius:12px;padding:11px 14px;display:flex;align-items:center;justify-content:space-between;color:var(--text-secondary);cursor:pointer;transition:.18s}
.collection-stat:hover,.collection-stat.active{border-color:rgba(19,112,86,.34);box-shadow:0 7px 20px rgba(25,67,54,.07);transform:translateY(-1px)}
.collection-stat.active{background:#eef8f4;color:var(--primary)}.collection-stat strong{font-size:20px;color:var(--text)}
.collection-batchbar{display:none;align-items:center;gap:8px;margin:10px 0;padding:9px 12px;border-radius:10px;background:#eef8f4;border:1px solid #cee6dd}#c2-sku-batchbar{position:relative;bottom:auto;z-index:auto;width:100%;box-sizing:border-box;margin:3px 0 0;box-shadow:0 -2px 8px rgba(0,0,0,.04);background:#eef8f4}#c2-sku-batchbar.show{display:flex}
.collection-batchbar.show{display:flex}.collection-batchbar strong{margin-right:8px;color:var(--primary)}
.collection-table{min-width:1360px}
.collection-table > tbody > tr > td{padding-top:14px;padding-bottom:14px;min-height:88px;vertical-align:middle}
.product-management-table > tbody > tr > td{padding-top:14px;padding-bottom:14px;min-height:88px;vertical-align:middle}
.collection-product-cell{display:flex;align-items:center;gap:10px;min-width:350px}
.collection-product-cell .thumb{width:46px;height:46px;border-radius:10px;object-fit:cover;border:1px solid var(--border);background:#f4f7f5;flex:0 0 46px}
.collection-product-cell .thumb.placeholder{display:flex;align-items:center;justify-content:center;color:#98a4a0}
.collection-product-meta{min-width:0;display:grid;gap:4px}
.collection-title{font-weight:700;max-width:430px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.collection-subline{font-size:12px;color:var(--text-secondary)}
.collection-collector{font-weight:700;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.collection-category{max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
.collection-missing{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.source-badge{display:inline-flex;padding:5px 8px;background:#f1f5f3;border:1px solid var(--border);border-radius:7px;font-weight:700;font-size:12px}
.completion{display:flex;align-items:center;gap:7px}.completion>div{width:82px;height:6px;background:#e7eeeb;border-radius:999px;overflow:hidden}
.completion i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2a8c70,#58b698)}
.completion span{font-size:12px;font-weight:700}.completion.large>div{width:100%;height:8px}
.collection-status-ready{color:#0d6b52;background:#e7f5ef}.collection-status-failed{color:#b42318;background:#fee4e2}.collection-status-published{color:#175cd3;background:#eaf1ff}
.collection-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}
.collection-form-grid .row{display:grid;grid-template-columns:86px minmax(0,1fr);gap:8px;align-items:center;margin:0}
.collection-form-grid .row.full{grid-column:1/-1}
.collection-form-grid textarea{width:100%;resize:vertical}
.collection-modal{width:min(920px,92vw);max-width:920px}
.collection-editor-mask{align-items:center;padding:8px;background:rgba(9,25,21,.58);backdrop-filter:blur(5px)}
.collection-editor{width:min(1800px,calc(100vw - 16px));height:min(1080px,calc(100dvh - 16px));background:#fff;border:1px solid rgba(255,255,255,.7);border-radius:18px;box-shadow:0 30px 100px rgba(5,31,24,.27);overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.collection-editor-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px;border-bottom:1px solid var(--border);background:linear-gradient(180deg,#fff,#fbfcfb)}
.collection-editor-product{display:flex;align-items:center;gap:13px;min-width:0}.collection-editor-cover{width:54px;height:54px;border-radius:12px;background:#eef3f1;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 54px}
.collection-editor-cover img{width:100%;height:100%;object-fit:cover}.collection-editor-product h3{margin:2px 0 3px;max-width:750px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px}
.collection-editor-product p,.collection-editor-product .eyebrow{margin:0;color:var(--text-muted);font-size:12px}.collection-editor-product .eyebrow{letter-spacing:.08em;text-transform:uppercase}
.collection-editor-summary{display:flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:12px}.collection-editor-summary>span{background:#f4f7f5;border:1px solid var(--border);padding:6px 9px;border-radius:8px}
.collection-editor-layout{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:0;overflow:hidden}
.collection-editor-aside{padding:18px;background:#f7f9f8;border-right:1px solid var(--border);display:flex;flex-direction:column;gap:14px;overflow:auto}
.collection-editor-aside>label{display:grid;gap:6px;font-size:12px;font-weight:700;color:var(--text-secondary)}
.collection-source-card,.collection-readiness{display:grid;gap:7px;padding:13px;border-radius:12px;background:#fff;border:1px solid var(--border)}
.collection-source-card span{color:var(--text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}.collection-source-card small{color:var(--text-secondary)}.collection-source-card a{font-size:12px;font-weight:700}
.collection-readiness>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:12px}.collection-readiness strong{font-size:18px;color:var(--primary)}.collection-readiness p{font-size:12px;color:var(--text-muted);margin:0;line-height:1.5}
.collection-editor-main{min-width:0;min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr)}
.collection-editor-tabs{display:flex;gap:2px;padding:0 18px;border-bottom:1px solid var(--border);overflow-x:auto}
.collection-editor-tabs button{appearance:none;border:0;border-bottom:2px solid transparent;background:transparent;padding:16px 14px 13px;font-weight:700;color:var(--text-secondary);cursor:pointer;white-space:nowrap}
.collection-editor-tabs button.active{color:var(--primary);border-bottom-color:var(--primary)}.collection-editor-tabs em{font-style:normal;font-size:10px;padding:2px 5px;border-radius:999px;background:#edf3f0}
.collection-editor-scroll{min-width:0;min-height:0;overflow-x:auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:22px 24px 40px;background:#fff}
.collection-tab{display:none}.collection-tab.active{display:block;min-height:100%}
.editor-section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}.editor-section-title h4{font-size:18px;margin:0 0 4px}.editor-section-title p{margin:0;color:var(--text-muted);font-size:13px}
.editor-form{display:grid;gap:15px}.editor-form.two{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-form.compact{margin-bottom:20px}.editor-form label,.editor-block-label{display:grid;gap:7px;color:var(--text-secondary);font-size:12px;font-weight:700}.editor-form .full{grid-column:1/-1}
.editor-form input,.editor-form select,.editor-form textarea,.editor-block-label input,.editor-block-label textarea{width:100%;font-weight:500;color:var(--text)}
.collection-subtoolbar{display:flex;align-items:center;justify-content:space-between;margin:18px 0 10px}
.collection-attr-table{border:1px solid var(--border);border-radius:12px;overflow:hidden}.collection-attr-row{display:grid;grid-template-columns:minmax(180px,.55fr) minmax(320px,1.45fr) 42px;gap:8px;padding:8px;border-bottom:1px solid var(--border)}
.collection-attr-row:last-child{border-bottom:0}.collection-attr-row input{border:0;background:#f8faf9}
.icon-btn{width:32px;height:32px;padding:0;border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--text-secondary);font-size:20px;line-height:1;cursor:pointer}
.collection-variant-summary{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.collection-variant-summary span{padding:7px 9px;border-radius:8px;background:#f3f7f5;border:1px solid var(--border);font-size:12px}
.collection-sku-wrap{overflow:auto;border:1px solid var(--border);border-radius:12px;max-height:55vh;min-height:200px}.collection-sku-table{width:100%;min-width:1240px;border-collapse:separate;border-spacing:0}.collection-sku-table th{background:#f6f8f7;color:var(--text-secondary);font-size:11px;text-align:left;padding:9px;position:sticky;top:0;z-index:5;border-bottom:1px solid var(--border)}.collection-sku-table td{padding:6px;border-top:1px solid var(--border)}
.collection-sku-table input,.collection-sku-table select{width:100%;min-width:92px;padding:7px 8px}.collection-sku-table input[type="checkbox"]{width:16px;height:16px;min-width:0;padding:0;cursor:pointer;vertical-align:middle;margin:0}.collection-sku-table td:first-child{width:36px;text-align:center;padding:8px 4px}.collection-sku-table td:nth-child(3) input{min-width:150px}.sku-dimensions{display:flex;align-items:center;gap:3px}.sku-dimensions input{min-width:54px;width:54px}.sku-dimensions i{font-style:normal;color:var(--text-muted)}
.collection-sku-image{width:126px;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:6px;color:var(--text-muted)}.collection-sku-image img,.collection-sku-image>svg{width:38px;height:38px;border-radius:7px;object-fit:contain;background:#f2f5f3}.collection-sku-image input{min-width:76px!important;font-size:10px!important}
.collection-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:12px;margin:10px 0 16px}.collection-image-grid.details{grid-template-columns:repeat(auto-fill,minmax(105px,1fr))}
.collection-image-card{position:relative;display:grid;gap:7px;padding:7px;border:1px solid var(--border);border-radius:12px;background:#fff;overflow:visible;cursor:pointer}.collection-image-card img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:8px;background:#f3f5f4}.collection-image-card span{font-size:11px;font-weight:700;color:var(--text-secondary)}
.collection-image-card>a{display:block;min-width:0}.collection-image-actions{display:flex;gap:6px}.collection-image-actions .btn{flex:1;min-width:0;padding:5px 7px;font-size:11px;line-height:1.2}.collection-image-card label{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--text-secondary);font-weight:700}.collection-image-card label input{margin:0}
.collection-image-card.is-menu-open{z-index:30}.collection-image-card .collection-image-actions{display:flex;align-items:center;justify-content:flex-end;min-height:30px}.collection-image-menu{position:relative;display:inline-block;margin-left:auto}.collection-image-menu-trigger{list-style:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:30px;padding:0;border:1px solid var(--border);border-radius:8px;background:var(--panel-soft,#f8fafb);color:var(--text-secondary,#6b7280);font-size:18px;line-height:1;cursor:pointer}.collection-image-menu-trigger::-webkit-details-marker{display:none}.collection-image-menu-trigger:hover{color:var(--primary,#0b8068);border-color:var(--primary,#0b8068)}.collection-image-menu-trigger:focus-visible{outline:2px solid var(--primary,#0b8068);outline-offset:2px}.collection-image-menu-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:40;display:grid;gap:4px;min-width:132px;padding:6px;border:1px solid var(--border);border-radius:10px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.18)}.collection-image-menu-panel .btn{width:100%;flex:initial;justify-content:flex-start;white-space:nowrap;margin:0}
.collection-image-card:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 2px rgba(18,119,87,.12)}.collection-image-card.broken{opacity:.45}.collection-empty{display:flex;align-items:center;justify-content:center;min-height:110px;border:1px dashed var(--border);border-radius:12px;color:var(--text-muted)}
.collection-category-picker{position:relative;margin-top:7px}.collection-category-trigger{width:100%;min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);font:inherit;text-align:left;cursor:pointer}.collection-category-trigger:hover,.collection-category-trigger:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(18,119,87,.1);outline:0}.collection-category-trigger span{font-size:16px;color:var(--text-muted)}.collection-category-panel{position:absolute;z-index:35;left:0;right:0;top:calc(100% + 6px);padding:8px;border:1px solid var(--border);border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(16,35,28,.16)}.collection-category-columns{display:flex;min-height:280px;max-height:390px;overflow:auto}.collection-category-column{flex:0 0 230px;padding:4px 7px;border-right:1px solid var(--border);overflow-y:auto}.collection-category-column:last-child{border-right:0}.collection-category-column button,.collection-category-results button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;border-radius:8px;background:transparent;padding:9px 10px;color:var(--text);text-align:left;cursor:pointer}.collection-category-column button:hover,.collection-category-column button.active,.collection-category-results button:hover{background:var(--primary-light);color:var(--primary)}.collection-category-column button:hover i{transform:translateX(2px)}.collection-category-column button i{font-style:normal;color:var(--text-muted);transition:transform .12s ease}.collection-category-results{max-height:390px;overflow:auto}.collection-category-results button{display:grid;justify-content:stretch}.collection-category-results button b{font-size:13px}.collection-category-results button small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-muted)}.collection-category-empty{padding:24px;color:var(--text-muted);text-align:center}
.collection-tab h5{margin:20px 0 6px}.collection-video-preview{margin-top:16px}.collection-video-preview video{width:min(720px,100%);max-height:480px;border-radius:14px;background:#111}
.collection-skc-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 8px}.collection-skc-heading .muted{font-size:11px}.collection-skc-table-wrap{margin:0 0 14px;overflow-x:auto;border:1px solid var(--border);border-radius:11px;background:#fff}.collection-skc-table{min-width:1060px}.collection-skc-header,.collection-skc-row{display:grid;grid-template-columns:76px minmax(150px,.95fr) minmax(170px,1fr) minmax(150px,.9fr) minmax(230px,1.35fr) 92px 56px;align-items:center;column-gap:12px}.collection-skc-actions{display:flex;justify-content:center;align-items:center}.collection-skc-actions .skc-remove{width:32px;height:32px;font-size:18px;line-height:1;background:#fff;border:1px solid var(--border);border-radius:8px;color:#c33;cursor:pointer;transition:all .15s ease}.collection-skc-actions .skc-remove:hover:not(:disabled){background:#fff0f0;border-color:#c33;color:#a22}.collection-skc-actions .skc-remove:disabled{opacity:.35;cursor:not-allowed}.collection-skc-header{min-height:38px;padding:0 12px;background:#f4f7f5;color:var(--text-secondary);font-size:11px;font-weight:700}.collection-skc-row{min-height:82px;padding:10px 12px;border-top:1px solid var(--border);background:#fff}.collection-skc-row:hover{background:#fafcfb}.collection-skc-media{width:62px;height:62px}.collection-skc-row img,.collection-skc-placeholder{width:62px;height:62px;object-fit:contain;border-radius:8px;background:#eef4f1;display:grid;place-items:center;color:var(--primary);font-size:10px}.collection-skc-row label{display:block;min-width:0;margin:0}.collection-skc-row label>span{display:none}.collection-skc-row input,.collection-skc-row select{min-width:0;width:100%;height:38px;padding:7px 9px;border:1px solid var(--border);border-radius:7px;background:#fff;color:var(--text);font:inherit;font-size:12px}.collection-skc-count{display:grid;grid-template-columns:auto auto;align-items:baseline;justify-content:start;gap:3px 5px;min-width:0}.collection-skc-count strong{font-size:16px;color:var(--text)}.collection-skc-count>span{font-size:11px;color:var(--text-secondary)}.collection-skc-count small{grid-column:1/-1;display:block;max-width:86px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--text-muted)}.collection-size-chart{margin-top:18px;padding:14px;border:1px solid var(--border);border-radius:12px;background:#fbfcfb}.collection-size-chart-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.collection-size-chart-head strong,.collection-size-chart-head .muted{display:block}.collection-size-chart-head .muted{font-size:11px;color:var(--text-muted);margin-top:3px}.collection-size-chart-table-wrap{overflow:auto}.collection-size-chart-table{min-width:620px;width:100%;border-collapse:separate;border-spacing:0}.collection-size-chart-table th,.collection-size-chart-table td{padding:6px;border-top:1px solid var(--border);text-align:left}.collection-size-chart-table th{font-size:11px;color:var(--text-secondary)}.collection-size-chart-table input{width:100%;min-width:90px;padding:7px 8px}.collection-size-chart-note{padding:12px;border:1px dashed var(--border);border-radius:9px;color:var(--text-muted);font-size:12px}
.collection-diagnostics{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px;padding:13px;border-radius:12px;background:#f5f8f6;color:var(--text-secondary);font-size:12px}.collection-diagnostics strong{color:var(--text);margin-right:8px}
.collection-source-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.collection-source-metrics>div{display:grid;gap:5px;padding:13px;border:1px solid var(--border);border-radius:11px;background:#fbfcfb}.collection-source-metrics span{font-size:11px;color:var(--text-muted)}.collection-source-metrics strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.collection-source-panels{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.collection-source-panels section{padding:15px;border:1px solid var(--border);border-radius:12px}.collection-source-panels h5{margin:0 0 10px}.collection-price-tiers,.collection-protection{display:flex;gap:8px;flex-wrap:wrap}.collection-price-tiers span,.collection-protection span{display:flex;align-items:center;gap:6px;padding:7px 9px;border-radius:8px;background:#f2f7f5;font-size:12px}.collection-price-tiers em{font-style:normal;color:var(--primary);font-weight:700}.collection-protection svg{width:14px;height:14px;color:var(--primary)}
.collection-editor-foot{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 18px;border-top:1px solid var(--border);background:#fbfcfb}.collection-editor-foot>div{display:flex;gap:8px}
.plugin-config-box{display:grid;gap:10px;margin:14px 0}
.plugin-config-box>div{display:grid;grid-template-columns:86px minmax(0,1fr);align-items:center;gap:10px}
.plugin-steps{margin:10px 0 0;padding-left:22px;line-height:1.8}
@media(max-width:1000px){
  .collection-stats{grid-template-columns:repeat(3,1fr)}.collection-editor-layout{grid-template-columns:1fr}.collection-editor-aside{display:none}.collection-source-metrics{grid-template-columns:1fr 1fr}.collection-source-panels{grid-template-columns:1fr}
  .collection-editor-summary>span{display:none}.editor-form.two{grid-template-columns:1fr}.editor-form .full{grid-column:auto}
}
.required-star{color:#d34b42;font-weight:800;margin-right:2px}
.collection-publish-state{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;background:#eef2ef;color:#486057;font-weight:700}
.collection-publish-state.status-pending_audit{background:#fff4dc;color:#9a6500}
.collection-publish-state.status-published{background:#e6f6ef;color:#08795b}
.collection-publish-state.status-rejected,.collection-publish-state.status-failed{background:#feecea;color:#ba3f37}
.collection-audit-card{display:grid;gap:7px;padding:14px;border:1px solid #dfe5e1;border-radius:13px;background:#f8faf8}
.collection-audit-card>span,.collection-audit-card>small{color:#738078;font-size:12px}
.collection-audit-card>strong{font-size:17px;color:#17231e}
.collection-reject-reason{padding:10px;border-radius:9px;background:#fff0ee;color:#a63932;font-size:12px;line-height:1.6;word-break:break-word}
.collection-reject-reason b{display:block;margin-bottom:3px}
.collection-dynamic-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 20px}
.collection-dynamic-fields>label,.collection-dynamic-fields>.shein-attribute{display:grid;grid-template-rows:auto minmax(42px,auto);align-content:start;gap:7px;min-height:88px;padding:12px;border:1px solid #e1e6e3;border-radius:11px;background:#fff;font-size:13px;font-weight:650;color:#34423b}
.collection-dynamic-fields label select,.collection-dynamic-fields label input,.collection-dynamic-fields label textarea,.collection-dynamic-fields .shein-attribute>input{width:100%;font-weight:400}
.shein-attribute-title{display:flex;align-items:center;gap:4px;min-height:18px;line-height:18px}.shein-attribute-title .required-star{line-height:1}
.collection-multi-select{position:relative;min-width:0;font-weight:400}
.collection-multi-select summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:42px;padding:9px 12px;border:1px solid #dce3df;border-radius:9px;background:#fff;cursor:pointer;list-style:none;user-select:none}
.collection-multi-select summary::-webkit-details-marker{display:none}.collection-multi-select summary i{font-style:normal;color:#748078;transition:transform .18s ease}.collection-multi-select[open] summary{border-color:#75b5a0;box-shadow:0 0 0 3px rgba(28,126,96,.09)}.collection-multi-select[open] summary i{transform:rotate(180deg)}
.collection-multi-select [data-multi-summary]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#24312b}.collection-multi-select [data-multi-summary].placeholder{color:#87928c}
.collection-multi-options{position:absolute;z-index:60;top:calc(100% + 6px);left:0;right:0;display:grid;gap:2px;max-height:250px;padding:6px;overflow-y:auto;border:1px solid #dce3df;border-radius:10px;background:#fff;box-shadow:0 14px 34px rgba(20,42,32,.16)}
.collection-dynamic-fields .collection-multi-option{display:flex;align-items:center;gap:9px;min-height:36px;padding:7px 9px;border:0;border-radius:7px;background:transparent;font-size:13px;font-weight:400;cursor:pointer}.collection-dynamic-fields .collection-multi-option:hover{background:#f0f7f4}.collection-dynamic-fields .collection-multi-option input{width:16px;height:16px;flex:0 0 auto;margin:0;accent-color:#167c60}
.collection-dynamic-fields label small{font-size:11px;color:#8b9690;font-weight:400}
.collection-editor-v2 .collection-sku-table textarea{min-width:170px;resize:vertical}
.collection-editor-v2 .collection-sku-table input[data-s2="supplier_sku"]{min-width:145px}
.collection-editor-v2 .collection-sku-table input[data-s2="options"]{min-width:120px}
@media(max-width:900px){.collection-dynamic-fields{grid-template-columns:1fr}}
.collection-list-reject {
  max-width: 180px;
  margin-top: 6px;
  color: #b43c34;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 产品管理工作台 */
.product-management-page .frozen-page-head{padding-bottom:14px}
.product-management-page .collection-page-title{align-items:flex-start}
.product-management-toolbar{align-items:center;margin-top:14px}
.product-management-stats{grid-template-columns:repeat(6,minmax(120px,1fr));margin-top:14px}
.product-management-stats .collection-stat{min-width:0;text-align:left}
.product-management-table{min-width:1180px}
.product-management-table th,.product-management-table td{vertical-align:middle}
.pm-product-cell{display:flex;align-items:center;gap:10px;min-width:320px}
.pm-product-cell .thumb{width:54px;height:54px;flex:0 0 54px;border-radius:9px;object-fit:cover;background:#f2f6f4;border:1px solid var(--border)}
.pm-product-cell .thumb.placeholder{display:grid;place-items:center;color:var(--text-muted)}
.pm-product-cell>div:last-child{min-width:0;display:grid;gap:4px}
.pm-product-cell .collection-title{display:block;max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-management-table .collection-category{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.collection-image-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 16px}
.collection-image-toolbar .btn{margin:0}
.pm-completion{display:flex;align-items:center;gap:8px;min-width:120px;font-variant-numeric:tabular-nums}
.pm-completion>span{min-width:38px;font-weight:700}
.pm-completion>i{display:block;width:66px;height:6px;overflow:hidden;border-radius:999px;background:#e6eeea}
.pm-completion>i>b{display:block;height:100%;border-radius:inherit;background:var(--primary)}
.pm-actions{white-space:nowrap}
.pm-actions .btn{margin:2px 0}
@media(max-width:1200px){
  .product-management-stats{grid-template-columns:repeat(3,minmax(120px,1fr))}
  .pm-product-cell{min-width:260px}
}
@media(max-width:760px){
  .product-management-stats{grid-template-columns:repeat(2,minmax(120px,1fr))}
  .product-management-toolbar input{min-width:0!important;width:100%}
}

/* 正式商品管理：页面本身可纵向滚动，表格在宽屏下独立横向滚动，详情编辑保持在视口内滚动。 */
.content{overflow-x:hidden;overflow-y:auto;max-height:100vh}
.product-management-page{height:auto;min-height:calc(100vh - 82px);overflow:visible}
.product-management-page .frozen-table-body{flex:0 0 auto;min-height:0;overflow:visible}
.product-management-page .table-scroll{max-width:100%;max-height:calc(100vh - 360px);overflow:auto}
.product-management-table th,.product-management-table td{white-space:nowrap}
.pm-edit-mask{z-index:1200;padding:20px;background:rgba(9,25,21,.58);backdrop-filter:blur(5px)}
.pm-edit-box{width:min(980px,96vw);max-height:90vh;display:flex;flex-direction:column;overflow:hidden}
.pm-edit-box .modal-head{flex:0 0 auto}
.pm-edit-box .modal-body{overflow:auto}
.pm-edit-subtitle{max-width:680px;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pm-edit-form .full{grid-column:1/-1}
.pm-edit-field{display:grid;gap:6px;min-width:0}
.pm-edit-field>span{font-size:12px;font-weight:650;color:var(--text-secondary)}
.pm-edit-field input,.pm-edit-field textarea{width:100%;box-sizing:border-box}
.pm-edit-official{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:16px}
.pm-edit-official>div{min-width:0;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#f7faf8;display:grid;gap:4px}
.pm-edit-official strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-variants{overflow:auto;max-height:280px;margin-top:6px;border:1px solid var(--border);border-radius:10px}
.pm-variants table{min-width:760px}
.pm-commercial-workspace{display:grid;gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid var(--border)}
.pm-commercial-workspace .pm-variants{max-height:360px}
.pm-commercial-workspace table{min-width:1120px}
.pm-commercial-input{width:108px;min-width:108px!important;box-sizing:border-box}
.pm-commercial-status{min-width:230px;white-space:normal!important;vertical-align:top!important}
.pm-commercial-result{display:grid;gap:2px;margin:2px 0;padding:5px 7px;border-radius:7px;font-size:11px;line-height:1.35}
.pm-commercial-result span{font-weight:700}
.pm-commercial-result small{color:inherit;opacity:.88}
.pm-commercial-result.success{background:#edf9f2;color:#17683e}
.pm-commercial-result.pending{background:#fff7e6;color:#8a5a00}
.pm-commercial-result.conflict{background:#f3efff;color:#5d3d94}
.pm-commercial-result.failed{background:#fff0ef;color:#a8322a}
.pm-commercial-preview{padding:9px 11px;border:1px solid var(--border);border-radius:9px;background:#f7faf8;line-height:1.5;font-size:12px}
.pm-commercial-preview ul{margin:5px 0 0 18px;padding:0;max-height:130px;overflow:auto}
.pm-edit-note{margin:14px 0 0;padding:10px 12px;border-radius:9px;background:#f4f8f6;line-height:1.6}
.pm-edit-box .modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px;border-top:1px solid var(--border);background:#fbfcfb;flex:0 0 auto}
.pm-actions{white-space:nowrap;min-width:90px}
@media(max-width:760px){
  .content{overflow-x:hidden;overflow-y:auto;max-height:none}
  .product-management-page{min-height:0}
  .product-management-page .table-scroll{max-height:none}
  .pm-edit-form{grid-template-columns:1fr}
  .pm-edit-form .full{grid-column:auto}
  .pm-edit-box{width:calc(100vw - 24px);max-height:92vh}
  .pm-edit-official{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pm-edit-subtitle{max-width:calc(100vw - 150px)}
}

/* P0 图片与弹窗布局：头尾固定，中间区域拥有明确的可滚动边界。 */
.collection-editor,
.collection-editor-layout,
.collection-editor-main,
.collection-editor-scroll,
.pm-edit-box,
.pm-edit-box .modal-body{min-height:0}
.collection-editor-head,.collection-editor-foot,.pm-edit-box .modal-head,.pm-edit-box .modal-foot{flex-shrink:0}
.collection-editor-scroll{overscroll-behavior:contain}
.collection-image-grid,.pm-image-grid{min-width:0}
/* 商品采集图片点击悬浮大图窗口（替代 target=_blank 新 tab） */
.image-lightbox {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .82);
  z-index: 1500;
  cursor: zoom-out;
  padding: 24px;
}
.image-lightbox.show { display: flex; }
.image-lightbox-img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  background: #fff;
  cursor: default;
}
.image-lightbox-close {
  position: absolute; top: 16px; right: 20px;
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.image-lightbox-close:hover { background: rgba(255, 255, 255, .32); }

.collection-image-card img,.pm-image-preview,.pm-sku-thumb,.collection-sku-image img{object-fit:contain;max-width:100%;max-height:100%}.pm-skc-thumb{width:64px;height:64px;max-width:64px;max-height:64px;object-fit:contain;border-radius:6px;background:#f3f6f4}
/* 商品采集页图片下方的 SVG 图标按钮（下载/删除） */
.collection-image-svg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft, #f8fafb);
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  padding: 0;
}
.collection-image-svg-btn svg { width: 16px; height: 16px; }
.collection-image-svg-btn:hover { color: var(--primary, #0b8068); border-color: var(--primary, #0b8068); background: #fff; }
.collection-image-svg-btn.danger:hover { color: var(--danger, #c0392b); border-color: var(--danger, #c0392b); }
.collection-image-svg-btn:disabled { opacity: .4; cursor: not-allowed; }

.collection-image-actions,.pm-image-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
.collection-sku-table td:nth-child(2) select{min-width:150px}
.collection-sku-table td:nth-child(2){min-width:170px}
.pm-edit-box .modal-body{flex:1 1 auto;overflow:auto;overscroll-behavior:contain}
.pm-image-workspace{display:grid;gap:8px;min-width:0}
.pm-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));grid-auto-rows:130px;gap:10px;max-height:360px;overflow-y:auto;padding:2px}
.pm-image-card{min-width:0;display:grid;gap:6px;padding:8px;border:1px solid var(--border);border-radius:10px;background:#fff}
.pm-image-link{display:grid;place-items:center;min-width:0;height:130px;max-height:130px;border-radius:8px;background:#f3f6f4;overflow:hidden}
.pm-image-preview{width:100%;height:130px;max-height:130px;display:block;object-fit:contain;background:#f3f6f4}
.pm-image-meta{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
.pm-main-badge{padding:3px 6px;border-radius:999px;background:#e7f5ef;color:#08795b;font-size:10px;white-space:nowrap}
.pm-image-help{margin:0 0 4px;line-height:1.5}
.pm-images-empty{min-height:110px;display:grid;place-items:center;border:1px dashed var(--border);border-radius:10px}
.pm-image-actions .btn{flex:1 1 auto;min-width:0;padding:5px 6px;font-size:11px}
.pm-edit-local-note{padding:10px 12px;border:1px solid #f0dfbd;border-radius:9px;background:#fff9ee;color:#785b25;font-size:12px;line-height:1.55}
.product-management-toolbar{display:flex;flex-wrap:wrap;gap:8px}
.product-management-toolbar select{min-width:150px}
.required-star{display:inline!important;margin-left:2px;margin-right:0;line-height:1}
@media(max-width:760px){
  .pm-image-grid{max-height:none;grid-template-columns:repeat(2,minmax(0,1fr))}
  .pm-image-link{height:110px}
}

/* Collection editor: keep SKC media in one horizontal strip and make SKU thumbnails explicit. */
.collection-editor-v2 .collection-skc-table{min-width:1180px}
.collection-editor-v2 .collection-skc-header,
.collection-editor-v2 .collection-skc-row{grid-template-columns:minmax(310px,2fr) minmax(120px,.75fr) minmax(135px,.8fr) minmax(120px,.75fr) minmax(150px,.85fr) 80px 50px}
.collection-editor-v2 .collection-skc-media{width:auto;height:auto;min-width:0;overflow:hidden}
.collection-editor-v2 .collection-skc-image-strip{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;max-width:100%;overflow-x:auto;padding:2px;white-space:nowrap;scrollbar-width:thin}
.collection-editor-v2 .collection-skc-image-option{flex:0 0 58px;width:58px;height:58px;display:grid;place-items:center;padding:2px;border:1px solid var(--border);border-radius:8px;background:#f3f6f4;cursor:pointer;overflow:hidden}
.collection-editor-v2 .collection-skc-image-option img{width:100%;height:100%;object-fit:contain;border-radius:5px;background:#fff}
.collection-editor-v2 .collection-skc-image-option.is-selected{border-color:var(--primary);box-shadow:0 0 0 2px rgba(18,119,87,.12)}
.collection-editor-v2 .collection-skc-media>.collection-skc-placeholder{width:58px;height:58px;flex:0 0 58px}
.collection-editor-v2 .collection-sku-image{min-width:0}
.collection-editor-v2 .collection-sku-thumb-wrap{width:38px;height:38px;display:grid;place-items:center;border-radius:7px;background:#f2f5f3;color:var(--text-muted);font-size:12px;overflow:hidden}
.collection-editor-v2 .collection-sku-thumb-wrap img{width:100%;height:100%;object-fit:contain;background:#f2f5f3}
.collection-editor-v2 .collection-sku-image select{min-width:0!important}
.collection-editor-v2 .required-label{display:inline-flex;align-items:baseline;gap:3px;line-height:1.25;white-space:nowrap}

/* SKU editor: the outer editor scrolls the SKU rows; the selected-row bar
   stays at the bottom of the SKU section until the size chart reaches it. */
.collection-editor-v2 .collection-sku-wrap{
  max-height:none!important;
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
  overscroll-behavior:auto;
  scrollbar-gutter:auto;
}
.collection-editor-v2 #c2-sku-batchbar{
  position:sticky!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
    bottom:0!important;
  left:auto!important;
  z-index:14!important;
  width:100%;
  box-sizing:border-box;
  min-height:42px;
    margin:4px 0 0;
  box-shadow:0 -3px 12px rgba(0,0,0,.08);
  background:#eef8f4;
}
.collection-editor-v2 #c2-sku-batchbar.show{display:flex}
.collection-editor-v2 .collection-editor-scroll{padding-bottom:8px}

/* 批量选择弹窗样式（cbm = collection batch modal） */
.cbm-list{border:1px solid var(--border);border-radius:8px;overflow:hidden;max-height:50vh;overflow-y:auto;background:#fff}
.cbm-store-item{padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .12s ease}
.cbm-store-item:last-child{border-bottom:none}
.cbm-store-item:hover{background:var(--panel-soft,#f8fafb)}
.cbm-store-item.selected{background:#e0f2fe;color:#0c4a6e}
.cbm-store-item.selected .cbm-store-mode{color:#0369a1}
.cbm-store-name{font-weight:600;font-size:14px;color:inherit}
.cbm-store-mode{font-size:12px;margin-top:2px}


/* AI 翻译 / 尺码识别 */
.c2-title-ai-row{display:flex;gap:8px;align-items:stretch}
.c2-title-ai-row input{flex:1;min-width:0}
.c2-ai-toolbar{position:relative;display:flex;justify-content:flex-end;align-items:center;gap:6px;margin:2px 0 6px}
.c2-ai-toolbar .c2-ai-translate-btn{padding:3px 10px;font-size:12px;min-width:0;line-height:1.2;height:30px}
.c2-ai-toolbar .c2-ai-lang-btn{width:30px;height:30px;line-height:1}
.c2-ai-translate-btn{white-space:nowrap}
.c2-ai-lang-btn{width:34px;height:38px;border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer;color:var(--text-muted);font-size:14px;line-height:1}
.c2-ai-lang-btn:hover:not(:disabled){border-color:var(--primary);color:var(--primary)}
.c2-ai-lang-menu{position:absolute;top:calc(100% + 4px);right:0;z-index:60;min-width:190px;max-height:280px;overflow:auto;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 14px 34px rgba(16,35,28,.14);padding:5px}
.c2-ai-lang-menu button{display:block;width:100%;text-align:left;padding:7px 10px;border:0;background:transparent;border-radius:7px;cursor:pointer;color:var(--text);font-size:12px}
.c2-ai-lang-menu button:hover,.c2-ai-lang-menu button.active{background:var(--primary-light);color:var(--primary)}
.collection-size-chart-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}

/* 采集列表 AI 自动处理状态（2026-08-05） */
.ai-badge{display:inline-block;margin:2px 0;padding:1px 7px;font-size:11px;line-height:16px;border-radius:8px;white-space:nowrap;max-width:130px;overflow:hidden;text-overflow:ellipsis}
.ai-badge-run{background:#fff3bf;color:#9a6700}
.ai-badge-ok{background:#d3f9d8;color:#2b8a3e}
.ai-badge-warn{background:#ffe8cc;color:#d9480f}

/* AI 助手悬浮聊天面板（2026-08-05） */
.ai-chat-fab{position:fixed;right:22px;bottom:22px;width:52px;height:52px;border-radius:50%;border:none;background:#e9f2ee;color:inherit;cursor:pointer;z-index:1500;display:none;align-items:center;justify-content:center;transition:transform .15s, box-shadow .15s, background .15s;box-shadow:0 4px 12px rgba(22,106,84,.18);padding:0}
.ai-chat-fab:hover{transform:scale(1.06);box-shadow:0 6px 18px rgba(22,106,84,.28);background:#d8e8e0}
.ai-chat-panel{position:fixed;right:22px;bottom:86px;width:440px;max-width:94vw;height:640px;max-height:80vh;background:var(--panel);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);z-index:1501;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border);font-family:inherit}
.ai-chat-panel[hidden]{display:none}
.ai-chat-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--border-light);background:var(--panel-soft)}
.ai-chat-head .icon-btn{width:30px;height:30px;border:none;background:transparent;cursor:pointer;font-size:14px;color:var(--text-secondary);border-radius:6px;display:inline-flex;align-items:center;justify-content:center}
.ai-chat-head .icon-btn:hover{background:#e9f2ee;color:#166a54}
.ai-chat-title{display:flex;flex-direction:column;gap:2px}
.ai-chat-title strong{color:#166a54;font-size:14px;font-weight:600}
.ai-chat-title .muted{font-size:11px;color:var(--text-muted)}
.ai-chat-messages{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--bg)}
.ai-msg{display:flex}
.ai-msg-user{justify-content:flex-end}
.ai-msg-ai{justify-content:flex-start}
.ai-msg-bubble{max-width:84%;padding:9px 13px;border-radius:14px;font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-word;box-shadow:0 1px 2px rgba(22,32,29,.05)}
.ai-msg-user .ai-msg-bubble{background:#e7f4ef;color:#174f3f;border:1px solid #cde8e0;border-bottom-right-radius:4px}
.ai-msg-ai .ai-msg-bubble{background:var(--panel);color:var(--text);border:1px solid var(--border-light);border-bottom-left-radius:4px}
.ai-msg-error .ai-msg-bubble{background:var(--danger-light);color:var(--danger);border-color:var(--danger-light)}
.ai-msg-loading{color:var(--text-muted);font-style:italic}
.ai-msg-files{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.ai-msg-files a{color:#166a54;text-decoration:underline;font-size:12px;word-break:break-all}
.ai-msg-image{display:block;max-width:280px;max-height:280px;border-radius:8px;cursor:zoom-in}
.ai-msg-with-image{padding:6px}
.ai-chat-img-preview{display:flex;align-items:center;gap:10px;padding:8px 14px;border-top:1px solid var(--border-light);background:var(--panel-soft)}
.ai-chat-img-preview[hidden]{display:none}
.ai-chat-img-preview img{height:54px;border-radius:6px;border:1px solid var(--border)}
.ai-chat-img-preview .icon-btn{width:24px;height:24px;border:none;background:#e9f2ee;cursor:pointer;border-radius:6px;font-size:12px;color:#166a54;display:inline-flex;align-items:center;justify-content:center}
.ai-chat-img-preview .icon-btn:hover{background:#d8e8e0}
.ai-chat-input-wrap{display:flex;flex-direction:column;border-top:1px solid var(--border-light);background:var(--panel)}
.ai-chat-input-row{display:flex;align-items:flex-end;gap:10px;padding:12px 14px;background:var(--panel)}
.ai-chat-input-row textarea{flex:1;width:100%;min-height:64px;max-height:200px;border:none;outline:none;resize:none;padding:10px 12px;font-size:13px;line-height:1.55;font-family:inherit;color:var(--text);background:var(--panel-soft);border-radius:12px;box-sizing:border-box;overflow-y:auto;transition:box-shadow .15s}
.ai-chat-input-row textarea::placeholder{color:var(--text-muted)}
.ai-chat-input-row textarea:focus{box-shadow:inset 0 0 0 1px #166a54}
.ai-chat-send-btn{width:38px;height:38px;min-width:38px;border-radius:50%;border:none;background:#3f3f46;color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;flex:0 0 38px;transition:background .15s, transform .1s}
.ai-chat-send-btn:hover{background:#166a54}
.ai-chat-send-btn:active{transform:scale(.92)}
.ai-chat-send-btn:disabled{opacity:.45;cursor:not-allowed}
.ai-chat-send-btn svg{width:18px;height:18px;display:block}
.ai-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;padding:20px}
.ai-empty-hint{font-size:12px;color:var(--text-muted);opacity:.6;letter-spacing:.3px}
.ai-prompt{padding:10px 12px;background:var(--panel-soft);border:1px solid var(--border-light);border-radius:10px;font-size:12px;color:var(--text);cursor:pointer;text-align:left;transition:all .15s;font-family:inherit;line-height:1.4}
.ai-prompt:hover{background:#e9f2ee;border-color:#166a54;color:#166a54;transform:translateY(-1px)}


/* AI WORKSPACE FRONTEND V1 */
.ai-chat-fab{position:fixed;right:22px;bottom:22px;width:54px;height:54px;border-radius:50%;border:1px solid rgba(22,106,84,.18);background:#e9f2ee;color:inherit;cursor:grab;z-index:1500;display:none;align-items:center;justify-content:center;transition:transform .16s,box-shadow .16s,background .16s;box-shadow:0 8px 24px rgba(22,106,84,.2);padding:0;touch-action:none;user-select:none}
.ai-chat-fab:hover{transform:scale(1.06);box-shadow:0 12px 30px rgba(22,106,84,.28);background:#d8e8e0}
.ai-chat-fab.is-dragging{cursor:grabbing;transform:scale(1.04);box-shadow:0 14px 34px rgba(22,106,84,.3)}
.ai-chat-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.18);backdrop-filter:blur(2px);z-index:1499;opacity:0;transition:opacity .22s ease}
.ai-chat-backdrop.is-open{opacity:1}
.ai-chat-backdrop[hidden]{display:none}
.ai-chat-panel{position:fixed;right:24px;bottom:24px;width:min(1280px,calc(100vw - 48px));height:min(820px,calc(100vh - 48px));max-width:none;max-height:none;background:var(--panel);border:1px solid rgba(148,163,184,.38);border-radius:16px;box-shadow:0 28px 90px rgba(15,23,42,.24);z-index:1501;overflow:hidden;opacity:0;transform:scale(.14);transform-origin:var(--ai-origin-x,100%) var(--ai-origin-y,100%);transition:opacity .22s ease,transform .25s cubic-bezier(.2,.75,.25,1);font-family:inherit}
.ai-chat-panel.is-open{opacity:1;transform:scale(1)}
.ai-chat-panel[hidden]{display:none}
.ai-chat-shell{height:100%;display:flex;min-width:0;background:var(--panel)}
.ai-chat-shell[hidden],.ai-chat-auth-view[hidden],.ai-chat-utility-view[hidden]{display:none}
.ai-chat-sidebar{width:248px;min-width:248px;display:flex;flex-direction:column;background:#f4f7f8;border-right:1px solid var(--border-light);padding:14px 10px 10px;transition:width .2s,min-width .2s,padding .2s;overflow:hidden}
.ai-chat-sidebar.is-collapsed{width:66px;min-width:66px;padding-left:8px;padding-right:8px}
.ai-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:0 4px 12px}
.ai-workspace-brand{display:flex;align-items:center;gap:9px;min-width:0}
.ai-workspace-brand>span:last-child{display:flex;flex-direction:column;min-width:0}
.ai-workspace-brand b{font-size:14px;color:#1f2937;line-height:1.25;white-space:nowrap}
.ai-workspace-brand small{font-size:10px;color:#8a98a0;margin-top:2px;white-space:nowrap}
.ai-brand-dot{width:24px;height:24px;border-radius:8px;background:linear-gradient(145deg,#257c61,#0e5b49);box-shadow:0 5px 12px rgba(22,106,84,.2);position:relative;flex:0 0 24px}
.ai-brand-dot:after{content:'✦';color:#fff;font-size:12px;position:absolute;left:6px;top:4px}
.ai-icon-btn{width:30px;height:30px;border:0;background:transparent;color:#8a969d;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:17px;line-height:1;flex:0 0 30px}
.ai-icon-btn:hover{background:#e2ece8;color:#166a54}
.ai-new-chat{height:38px;display:flex;align-items:center;gap:8px;width:100%;border:1px solid rgba(22,106,84,.2);border-radius:9px;background:#fff;color:#145c4b;padding:0 10px;font:600 12px inherit;cursor:pointer;box-shadow:0 2px 6px rgba(22,32,29,.04)}
.ai-new-chat:hover{background:#eef8f3;border-color:rgba(22,106,84,.38)}
.ai-new-chat-plus{font-size:19px;font-weight:400;line-height:1}
.ai-new-chat kbd,.ai-sidebar-nav kbd{margin-left:auto;border:1px solid #d7e1df;background:#f6f9f8;color:#94a3a8;border-radius:4px;padding:1px 4px;font:10px inherit}
.ai-sidebar-nav{display:flex;flex-direction:column;gap:2px;padding:14px 0 12px}
.ai-sidebar-nav button{display:flex;align-items:center;gap:9px;height:34px;border:0;border-radius:7px;background:transparent;color:#69767d;text-align:left;padding:0 9px;font:12px inherit;cursor:pointer;white-space:nowrap}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e4efea;color:#166a54}
.ai-nav-icon{width:17px;color:#8b9aa0;font-size:17px;text-align:center}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#166a54}
.ai-chat-search-wrap{display:flex;align-items:center;gap:6px;height:34px;border:1px solid #d7e2df;border-radius:8px;background:#fff;padding:0 9px;margin:0 2px 10px;color:#93a0a6}
.ai-chat-search-wrap input{border:0;outline:0;background:transparent;min-width:0;width:100%;font:12px inherit;color:var(--text)}
.ai-chat-search-wrap[hidden]{display:none}
.ai-side-section{min-height:0}
.ai-recent-section{margin-top:14px;overflow:hidden}
.ai-side-section-title{display:flex;align-items:center;justify-content:space-between;color:#a1aeb3;font-size:10px;letter-spacing:.8px;padding:0 8px 6px;text-transform:uppercase}
.ai-side-section-title span:last-child{font-size:10px;color:#b6c1c4}
.ai-conversation-list{display:flex;flex-direction:column;gap:2px;max-height:190px;overflow:auto}
.ai-conversation-item{display:flex;align-items:stretch;gap:2px;border-radius:8px;min-height:40px}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e5efeb}
.ai-conversation-main{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;flex:1;border:0;background:transparent;text-align:left;padding:6px 8px;color:#506067;cursor:pointer}
.ai-conversation-item.active .ai-conversation-main{color:#145c4b}
.ai-conversation-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.ai-conversation-main small{color:#a1adb1;font-size:10px}
.ai-conversation-pin{width:25px;border:0;background:transparent;color:#aeb9bb;cursor:pointer;border-radius:6px;font-size:14px;opacity:0}
.ai-conversation-item:hover .ai-conversation-pin,.ai-conversation-item.active .ai-conversation-pin,.ai-conversation-pin.pinned{opacity:1}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#d69e2e}
.ai-side-empty{padding:7px 8px;color:#b2bdc0;font-size:11px}
.ai-sidebar-spacer{flex:1;min-height:16px}
.ai-chat-user-bar{display:flex;align-items:center;gap:8px;border-top:1px solid #dde7e4;padding:11px 5px 2px;min-width:0}
.ai-user-avatar{width:29px;height:29px;flex:0 0 29px;border-radius:9px;background:#dbeee6;color:#166a54;display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:700}
.ai-user-copy{display:flex;flex-direction:column;min-width:0;flex:1}
.ai-user-copy b{font-size:11px;color:#536168;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-user-copy small{font-size:9px;color:#a0adb1;margin-top:2px}
.ai-user-action{border:0;background:transparent;color:#9aa7ab;cursor:pointer;font-size:16px;width:26px;height:26px;border-radius:6px}
.ai-user-action:hover{background:#e2ece8;color:#166a54}
.ai-chat-sidebar.is-collapsed .ai-workspace-brand>span:last-child,.ai-chat-sidebar.is-collapsed .ai-new-chat span:last-of-type,.ai-chat-sidebar.is-collapsed .ai-new-chat kbd,.ai-chat-sidebar.is-collapsed .ai-sidebar-nav button span:not(.ai-nav-icon),.ai-chat-sidebar.is-collapsed .ai-sidebar-nav kbd,.ai-chat-sidebar.is-collapsed .ai-side-section,.ai-chat-sidebar.is-collapsed .ai-chat-user-bar .ai-user-copy,.ai-chat-sidebar.is-collapsed .ai-user-action{display:none}
.ai-chat-sidebar.is-collapsed .ai-new-chat{justify-content:center;padding:0}
.ai-chat-sidebar.is-collapsed .ai-sidebar-nav button{justify-content:center;padding:0}
.ai-chat-sidebar.is-collapsed .ai-chat-user-bar{justify-content:center}
.ai-chat-main{display:flex;flex-direction:column;min-width:0;flex:1;background:#fff}
.ai-main-head{height:58px;flex:0 0 58px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border-light);padding:0 18px;background:rgba(255,255,255,.92)}
.ai-main-title{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.ai-main-title strong{font-size:13px;font-weight:600;color:#263238;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-main-title span{font-size:10px;color:#a0adb1}
.ai-main-actions{display:flex;gap:2px}
.ai-chat-main-view{display:flex;flex-direction:column;min-height:0;flex:1;background:linear-gradient(180deg,#fff 0%,#fbfcfc 100%)}
.ai-chat-messages{flex:1;min-height:0;width:100%;max-width:920px;margin:0 auto;overflow-y:auto;display:flex;flex-direction:column;gap:13px;padding:32px 42px 26px;background:transparent}
.ai-empty-workspace{margin:auto;text-align:center;color:#647277}
.ai-empty-orb{width:46px;height:46px;border-radius:16px;margin:0 auto 18px;background:#f2f6f5;border:1px solid #e0eae7;display:flex;align-items:center;justify-content:center;color:#9aaca9;font-size:21px}
.ai-empty-workspace h2{font-size:22px;font-weight:500;color:#303b3f;margin:0 0 10px}
.ai-empty-workspace p{font-size:12px;color:#a0adb1;margin:0}
.ai-msg{display:flex;width:100%;animation:ai-message-in .18s ease both}
.ai-msg-user{justify-content:flex-end}
.ai-msg-ai{justify-content:flex-start}
.ai-msg-bubble{max-width:min(760px,86%);padding:11px 14px;border-radius:13px;font-size:13px;line-height:1.68;white-space:pre-wrap;word-break:break-word;box-shadow:none}
.ai-msg-user .ai-msg-bubble{background:#e7f4ef;color:#174f3f;border:1px solid #cde8e0;border-bottom-right-radius:4px}
.ai-msg-ai .ai-msg-bubble{background:#f5f7f7;color:#2c383b;border:1px solid #e6eceb;border-bottom-left-radius:4px}
.ai-msg-error .ai-msg-bubble{background:#fff2f1;color:#b42318;border-color:#ffd8d5}
.ai-msg-text{white-space:pre-wrap}
.ai-msg-image{display:block;max-width:310px;max-height:300px;border-radius:9px;margin-bottom:7px;cursor:zoom-in}
.ai-msg-files{display:flex;flex-direction:column;gap:4px;margin-top:7px}
.ai-msg-files a{color:inherit;text-decoration:underline;font-size:12px;word-break:break-all}
.ai-composer{padding:0 34px 18px;max-width:920px;width:100%;margin:0 auto;box-sizing:border-box}
.ai-composer-box{display:flex;align-items:flex-end;gap:7px;border:1px solid #cbd9d5;border-radius:14px;background:#fff;padding:8px 9px 8px 8px;box-shadow:0 5px 18px rgba(22,32,29,.06);transition:border-color .15s,box-shadow .15s}
.ai-composer-box:focus-within{border-color:#7fb7a4;box-shadow:0 7px 22px rgba(22,106,84,.1)}
.ai-attach-btn{width:31px;height:31px;flex:0 0 31px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#869599;font-size:21px;cursor:pointer}
.ai-attach-btn:hover{background:#eef5f2;color:#166a54}
.ai-chat-input-row textarea{min-height:64px}
.ai-composer-box textarea{flex:1;min-width:0;min-height:26px;max-height:180px;border:0;outline:0;resize:none;padding:5px 4px;background:transparent;color:#253236;font:13px/1.55 inherit;overflow-y:auto}
.ai-composer-box textarea::placeholder{color:#a2afb2}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex:0 0 36px;border:0;border-radius:10px;background:#30343b;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,transform .1s}
.ai-chat-send-btn:hover{background:#166a54}
.ai-chat-send-btn:active{transform:scale(.92)}
.ai-chat-send-btn:disabled{opacity:.48;cursor:not-allowed}
.ai-chat-send-btn svg{width:17px;height:17px}
.ai-chat-send-btn.is-busy svg{animation:ai-send-pulse 1s infinite}
.ai-composer-meta{display:flex;justify-content:space-between;gap:10px;padding:8px 4px 0;color:#a7b2b5;font-size:10px}
.ai-chat-img-preview{display:flex;align-items:center;gap:9px;max-width:920px;width:calc(100% - 68px);margin:0 auto;padding:8px 10px;border:1px solid #d7e3df;border-bottom:0;border-radius:10px 10px 0 0;background:#f5faf7;color:#637277;font-size:11px}
.ai-chat-img-preview[hidden]{display:none}
.ai-chat-img-preview img{width:43px;height:43px;object-fit:cover;border-radius:7px;border:1px solid #d5e3df}
.ai-chat-img-preview span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-chat-img-preview .ai-icon-btn{width:25px;height:25px;flex-basis:25px;font-size:14px}
.ai-chat-utility-view{display:flex;flex-direction:column;flex:1;min-height:0;background:#fbfcfc}
.ai-utility-head{display:flex;align-items:center;justify-content:space-between;padding:28px 38px 20px;border-bottom:1px solid var(--border-light);background:#fff}
.ai-utility-head>div{display:flex;flex-direction:column;gap:4px}
.ai-utility-head strong{font-size:18px;font-weight:600;color:#273337}
.ai-utility-head span{font-size:11px;color:#9ba8ac}
.ai-utility-add{border:1px solid #b9d7cb;border-radius:8px;background:#eef7f2;color:#166a54;padding:8px 12px;font:12px inherit;cursor:pointer}
.ai-utility-add:hover{background:#dcefe6}
.ai-utility-content{overflow:auto;padding:26px 38px}
.ai-utility-loading,.ai-utility-empty{text-align:center;color:#a1adb0;padding:80px 20px;font-size:12px}
.ai-utility-empty>div{font-size:32px;color:#9bb4aa;margin-bottom:12px}
.ai-utility-empty strong{display:block;color:#556368;font-size:14px;margin-bottom:7px}
.ai-utility-empty p{margin:0}
.ai-plugin-card,.ai-automation-card{display:flex;align-items:flex-start;gap:13px;max-width:780px;border:1px solid #e1e9e7;border-radius:11px;background:#fff;padding:15px 16px;margin-bottom:10px;box-shadow:0 2px 8px rgba(22,32,29,.03)}
.ai-plugin-icon{width:32px;height:32px;flex:0 0 32px;border-radius:9px;background:#e9f4ef;color:#166a54;display:flex;align-items:center;justify-content:center;font-size:19px}
.ai-plugin-card>div{min-width:0;flex:1}
.ai-plugin-card strong{display:block;font-size:13px;color:#354246;margin-bottom:5px}
.ai-plugin-card p{margin:0;color:#89979b;font-size:11px;line-height:1.55}
.ai-plugin-state{font-size:10px;color:#2b8a60;background:#e8f7ee;border-radius:12px;padding:4px 8px;white-space:nowrap}
.ai-automation-card{display:block}
.ai-automation-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ai-automation-head>div:first-child{display:flex;flex-direction:column;gap:5px;min-width:0}
.ai-automation-head strong{font-size:13px;color:#354246}
.ai-automation-head span{font-size:11px;color:#8d9b9e}
.ai-automation-head>div:last-child{display:flex;gap:6px}
.ai-automation-toggle,.ai-automation-remove{border:1px solid #d7e2df;border-radius:6px;background:#fff;padding:5px 8px;color:#627176;font:11px inherit;cursor:pointer}
.ai-automation-toggle:hover{border-color:#8fc1ad;color:#166a54}
.ai-automation-remove:hover{border-color:#f0b4ad;color:#b42318}
.ai-automation-card>p{margin:12px 0 0;padding-top:10px;border-top:1px solid #eef2f1;color:#829094;font-size:11px;line-height:1.6;white-space:pre-wrap}
.ai-chat-auth-view{height:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 20%,#edf7f2 0,#fff 48%,#f5f8f7 100%);padding:24px;box-sizing:border-box}
.ai-auth-card{width:min(390px,100%);padding:38px 42px 30px;border:1px solid #e0eae6;border-radius:16px;background:rgba(255,255,255,.9);box-shadow:0 18px 60px rgba(22,32,29,.08);text-align:center}
.ai-auth-mark{width:52px;height:52px;margin:0 auto 16px;border-radius:16px;background:#eef7f3;display:flex;align-items:center;justify-content:center}
.ai-auth-eyebrow{font-size:10px;letter-spacing:1.4px;color:#91a29f}
.ai-auth-card h2{margin:12px 0 8px;color:#29363a;font-size:22px;font-weight:550}
.ai-auth-card>p{margin:0 auto 24px;max-width:290px;color:#93a1a4;font-size:12px;line-height:1.6}
.ai-auth-form{text-align:left}
.ai-auth-form label{display:block;color:#657277;font-size:11px;margin:12px 0 6px}
.ai-auth-form input{box-sizing:border-box;width:100%;height:38px;border:1px solid #d6e1de;border-radius:8px;outline:0;padding:0 11px;background:#fbfdfc;color:#354246;font:12px inherit}
.ai-auth-form input:focus{border-color:#74b29b;box-shadow:0 0 0 3px rgba(22,106,84,.08)}
.ai-auth-form button[type=submit]{width:100%;height:40px;margin-top:20px;border:0;border-radius:8px;background:#166a54;color:#fff;font:600 12px inherit;cursor:pointer}
.ai-auth-form button[type=submit]:hover{background:#105a47}
.ai-auth-form button[type=submit]:disabled{opacity:.6;cursor:wait}
.ai-auth-error{min-height:18px;margin-top:9px;color:#b42318;font-size:11px;line-height:1.5;text-align:center}
.ai-auth-toggle,.ai-auth-cancel{border:0;background:transparent;color:#166a54;font:11px inherit;cursor:pointer;margin-top:9px}
.ai-auth-cancel{display:block;margin:16px auto 0;color:#a0abad}
.ai-auth-toggle:hover{text-decoration:underline}
@keyframes ai-message-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes ai-send-pulse{50%{opacity:.45;transform:scale(.88)}}
@media (max-width:900px){
  .ai-chat-panel{right:12px;bottom:12px;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-chat-sidebar{width:220px;min-width:220px}
  .ai-chat-messages{padding-left:24px;padding-right:24px}
  .ai-composer{padding-left:20px;padding-right:20px}
  .ai-chat-img-preview{width:calc(100% - 40px)}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;width:100vw;height:100dvh;border:0;border-radius:0}
  .ai-chat-sidebar{position:absolute;z-index:4;inset:0 auto 0 0;width:250px;min-width:250px;box-shadow:14px 0 40px rgba(15,23,42,.14);transform:translateX(-102%);transition:transform .2s}
  .ai-chat-sidebar:not(.is-collapsed){transform:none}
  .ai-chat-sidebar.is-collapsed{width:250px;min-width:250px;padding:14px 10px;transform:translateX(-102%)}
  .ai-chat-main{width:100%}
  .ai-main-head{padding-left:10px}
  .ai-chat-messages{padding:24px 14px 18px}
  .ai-composer{padding:0 12px 12px}
  .ai-chat-img-preview{width:calc(100% - 24px)}
  .ai-composer-meta span:last-child{display:none}
  .ai-auth-card{padding-left:24px;padding-right:24px}
}


/* AI WORKSPACE CODEX POLISH V2 */
.ai-chat-panel{width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:12px;box-shadow:0 24px 70px rgba(31,41,55,.2)}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{background:#e1e8ef;box-shadow:none}
.ai-brand-dot:after{color:#52616d}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{color:#a0a9ae}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer-box{border-color:#dfe4e8;border-radius:15px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{color:#a6afb4}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{right:12px;bottom:12px;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;width:100vw;height:100dvh;border-radius:0}
  .ai-composer{padding-left:12px;padding-right:12px}
}


/* AI WORKSPACE CODEX POLISH V3 */
.ai-chat-panel{width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:12px;box-shadow:0 24px 70px rgba(31,41,55,.2)}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{background:#e1e8ef;box-shadow:none}
.ai-brand-dot:after{color:#52616d}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{color:#a0a9ae}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer-box{border-color:#dfe4e8;border-radius:15px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{color:#a6afb4}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{right:12px;bottom:12px;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;width:100vw;height:100dvh;border-radius:0}
  .ai-composer{padding-left:12px;padding-right:12px}
}


/* AI WORKSPACE CODEX POLISH V4 */
.ai-chat-panel{width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:12px;box-shadow:0 24px 70px rgba(31,41,55,.2)}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{background:#e1e8ef;box-shadow:none}
.ai-brand-dot:after{color:#52616d}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{display:none}
.ai-main-title span{display:none}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;border-color:#dfe4e8;border-radius:15px;padding:11px 10px 8px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-composer-input-row{display:flex;min-height:30px;width:100%}
.ai-composer-box textarea{width:100%;padding:2px 3px;min-height:28px;max-height:180px}
.ai-composer-toolbar{display:flex;align-items:center;gap:4px;min-height:32px;margin-top:7px;width:100%}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-composer-select{height:28px;max-width:150px;border:0;border-radius:7px;background:transparent;color:#69757d;outline:0;padding:0 6px;font:11px inherit;cursor:pointer}
.ai-composer-select:hover,.ai-composer-select:focus{background:#f1f4f6;color:#3f4c55}
.ai-reasoning-select{max-width:72px;color:#88939a}
.ai-composer-spacer{flex:1}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{display:none}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{right:12px;bottom:12px;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;width:100vw;height:100dvh;border-radius:0}
  .ai-composer{padding-left:12px;padding-right:12px}
  .ai-composer-select{max-width:125px}
}


/* AI WORKSPACE CODEX POLISH V5 */
.ai-chat-panel{width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:12px;box-shadow:0 24px 70px rgba(31,41,55,.2)}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{background:#e1e8ef;box-shadow:none}
.ai-brand-dot:after{color:#52616d}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{display:none}
.ai-main-title span{display:none}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer{position:relative}
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;border-color:#dfe4e8;border-radius:15px;padding:11px 10px 8px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-composer-input-row{display:flex;min-height:30px;width:100%}
.ai-composer-box textarea{width:100%;padding:2px 3px;min-height:28px;max-height:180px}
.ai-composer-toolbar{display:flex;align-items:center;gap:4px;min-height:32px;margin-top:7px;width:100%}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-model-settings{position:relative}
.ai-model-settings-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#58656e;display:flex;align-items:center;gap:6px;padding:0 7px;font:11px inherit;cursor:pointer}
.ai-model-settings-trigger:hover,.ai-model-settings-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-model-settings-trigger span:nth-child(2){color:#8c969d}
.ai-model-chevron{font-size:15px;color:#8b969d;line-height:1;transform:translateY(-1px)}
.ai-model-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:224px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-model-popover[hidden]{display:none}
.ai-setting-row{height:34px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 9px;border-radius:7px;color:#3d4850;font-size:12px}
.ai-setting-row:hover{background:#f5f7f8}
.ai-setting-value{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;color:#8d979d}
.ai-setting-value>span{font-size:16px;color:#aab2b7;line-height:1}
.ai-composer-select{appearance:none;height:28px;max-width:132px;border:0;border-radius:5px;background:transparent;color:#8b959b;outline:0;padding:0;font:11px inherit;text-align:right;cursor:pointer}
.ai-composer-select:hover,.ai-composer-select:focus{color:#3f4c55}
.ai-reasoning-select{max-width:64px}
.ai-context-select{max-width:64px}
.ai-setting-divider{height:1px;margin:6px 8px;background:#edf0f2}
.ai-reset-preferences{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between;border:0;border-radius:7px;background:transparent;color:#a0a8ad;padding:0 9px;font:11px inherit;cursor:pointer}
.ai-reset-preferences:hover{background:#f5f7f8;color:#68757d}
.ai-composer-spacer{flex:1}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{display:none}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{right:12px;bottom:12px;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;width:100vw;height:100dvh;border-radius:0}
  .ai-composer{padding-left:12px;padding-right:12px}
  .ai-model-popover{right:-4px;width:216px}
}


/* AI WORKSPACE CODEX POLISH V6 */
.ai-chat-panel{width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:12px;box-shadow:0 24px 70px rgba(31,41,55,.2)}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{background:#e1e8ef;box-shadow:none}
.ai-brand-dot:after{color:#52616d}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{display:none}
.ai-main-title span{display:none}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer{position:relative}
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;border-color:#dfe4e8;border-radius:15px;padding:11px 10px 8px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-composer-input-row{display:flex;min-height:30px;width:100%}
.ai-composer-box textarea{width:100%;padding:2px 3px;min-height:28px;max-height:180px}
.ai-composer-toolbar{display:flex;align-items:center;gap:4px;min-height:32px;margin-top:7px;width:100%}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-model-settings{position:relative}
.ai-model-settings-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#58656e;display:flex;align-items:center;gap:6px;padding:0 7px;font:11px inherit;cursor:pointer}
.ai-model-settings-trigger:hover,.ai-model-settings-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-model-settings-trigger span:nth-child(2){color:#8c969d}
.ai-model-chevron{font-size:15px;color:#8b969d;line-height:1;transform:translateY(-1px)}
.ai-model-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:224px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-model-popover[hidden]{display:none}
.ai-setting-row{height:34px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 9px;border-radius:7px;color:#3d4850;font-size:12px}
.ai-setting-row:hover{background:#f5f7f8}
.ai-setting-value{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;color:#8d979d}
.ai-setting-value>span{font-size:16px;color:#aab2b7;line-height:1}
.ai-composer-select{appearance:none;height:28px;max-width:132px;border:0;border-radius:5px;background:transparent;color:#8b959b;outline:0;padding:0;font:11px inherit;text-align:right;cursor:pointer}
.ai-composer-select:hover,.ai-composer-select:focus{color:#3f4c55}
.ai-reasoning-select{max-width:64px}
.ai-context-select{max-width:64px}
.ai-setting-divider{height:1px;margin:6px 8px;background:#edf0f2}
.ai-reset-preferences{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between;border:0;border-radius:7px;background:transparent;color:#a0a8ad;padding:0 9px;font:11px inherit;cursor:pointer}
.ai-reset-preferences:hover{background:#f5f7f8;color:#68757d}
.ai-context-settings{position:relative}
.ai-context-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#68757d;display:flex;align-items:center;gap:5px;padding:0 6px;font:11px inherit;cursor:pointer}
.ai-context-trigger:hover,.ai-context-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-context-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:170px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-context-popover[hidden],.ai-context-select[hidden]{display:none}
.ai-context-usage{text-align:center;padding:2px 4px 7px;color:#a0a8ad;font-size:11px;line-height:1.45}
.ai-context-usage strong{display:block;color:#7d8990;font-weight:500}
.ai-context-usage small{display:block;margin-top:1px;color:#4d5961;font-size:11px}
.ai-context-divider{height:1px;margin:3px 5px 5px;background:#edf0f2}
.ai-context-popover button[data-ai-context]{width:100%;height:28px;border:0;border-radius:7px;background:transparent;text-align:left;padding:0 8px;color:#66737b;font:11px inherit;cursor:pointer}
.ai-context-popover button[data-ai-context]:hover{background:#f5f7f8;color:#3f4c55}
.ai-composer-spacer{flex:1}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{display:none}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{right:12px;bottom:12px;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;width:100vw;height:100dvh;border-radius:0}
  .ai-composer{padding-left:12px;padding-right:12px}
  .ai-model-popover{right:-4px;width:216px}
}


/* AI WORKSPACE CODEX POLISH V7 */
.ai-chat-fab{width:56px;height:56px;border:1px solid #d5e0e6;background:rgba(248,251,252,.96);color:#3e6674;box-shadow:0 10px 28px rgba(58,86,99,.18)}
.ai-chat-fab .ai-fab-mark{width:37px;height:37px;border:1px solid #e1e8ec;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 9px rgba(58,86,99,.08)}
.ai-chat-fab .ai-logo{width:29px;height:29px;display:block}
.ai-chat-fab:hover{background:#fff;color:#2e5665;box-shadow:0 13px 32px rgba(58,86,99,.24)}
.ai-chat-fab.is-dragging{box-shadow:0 15px 38px rgba(58,86,99,.28)}
.ai-chat-panel{left:50%;top:50%;right:auto;bottom:auto;width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:12px;box-shadow:0 24px 70px rgba(31,41,55,.2);transform:translate(-50%,-50%) scale(.14);transform-origin:var(--ai-origin-x,50%) var(--ai-origin-y,50%)}
.ai-chat-panel.is-open{transform:translate(-50%,-50%) scale(1)}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{width:26px;height:26px;flex:0 0 26px;border-radius:8px;border:1px solid #e0e7ec;background:#fff;box-shadow:none;color:#526775;display:flex;align-items:center;justify-content:center}
.ai-brand-dot:after{display:none}
.ai-brand-dot .ai-logo{width:18px;height:18px;display:block}
.ai-auth-mark{color:#526775;background:#f5f7f8;border-color:#e0e7ec;box-shadow:none;display:flex;align-items:center;justify-content:center}
.ai-auth-mark .ai-logo{width:34px;height:34px;display:block}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{display:none}
.ai-main-title span{display:none}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer{position:relative}
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;border-color:#dfe4e8;border-radius:15px;padding:11px 10px 8px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-composer-input-row{display:flex;min-height:30px;width:100%}
.ai-composer-box textarea{width:100%;padding:2px 3px;min-height:28px;max-height:180px}
.ai-composer-toolbar{display:flex;align-items:center;gap:4px;min-height:32px;margin-top:7px;width:100%}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-model-settings{position:relative}
.ai-model-settings-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#58656e;display:flex;align-items:center;gap:6px;padding:0 7px;font:11px inherit;cursor:pointer}
.ai-model-settings-trigger:hover,.ai-model-settings-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-model-settings-trigger span:nth-child(2){color:#8c969d}
.ai-model-chevron{font-size:15px;color:#8b969d;line-height:1;transform:translateY(-1px)}
.ai-model-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:224px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-model-popover[hidden]{display:none}
.ai-setting-row{height:34px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 9px;border-radius:7px;color:#3d4850;font-size:12px}
.ai-setting-row:hover{background:#f5f7f8}
.ai-setting-value{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;color:#8d979d}
.ai-setting-value>span{font-size:16px;color:#aab2b7;line-height:1}
.ai-composer-select{appearance:none;height:28px;max-width:132px;border:0;border-radius:5px;background:transparent;color:#8b959b;outline:0;padding:0;font:11px inherit;text-align:right;cursor:pointer}
.ai-composer-select:hover,.ai-composer-select:focus{color:#3f4c55}
.ai-reasoning-select{max-width:64px}
.ai-context-select{max-width:64px}
.ai-setting-divider{height:1px;margin:6px 8px;background:#edf0f2}
.ai-reset-preferences{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between;border:0;border-radius:7px;background:transparent;color:#a0a8ad;padding:0 9px;font:11px inherit;cursor:pointer}
.ai-reset-preferences:hover{background:#f5f7f8;color:#68757d}
.ai-context-settings{position:relative}
.ai-context-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#68757d;display:flex;align-items:center;gap:5px;padding:0 6px;font:11px inherit;cursor:pointer}
.ai-context-trigger:hover,.ai-context-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-context-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:170px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-context-popover[hidden],.ai-context-select[hidden]{display:none}
.ai-context-usage{text-align:center;padding:2px 4px 7px;color:#a0a8ad;font-size:11px;line-height:1.45}
.ai-context-usage strong{display:block;color:#7d8990;font-weight:500}
.ai-context-usage small{display:block;margin-top:1px;color:#4d5961;font-size:11px}
.ai-context-divider{height:1px;margin:3px 5px 5px;background:#edf0f2}
.ai-context-popover button[data-ai-context]{width:100%;height:28px;border:0;border-radius:7px;background:transparent;text-align:left;padding:0 8px;color:#66737b;font:11px inherit;cursor:pointer}
.ai-context-popover button[data-ai-context]:hover{background:#f5f7f8;color:#3f4c55}
.ai-context-popover button[data-ai-context]:disabled{opacity:.38;cursor:not-allowed;background:transparent}
.ai-composer-spacer{flex:1}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{display:none}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{left:50%;top:50%;right:auto;bottom:auto;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;left:0;top:0;right:0;bottom:0;width:100vw;height:100dvh;border-radius:0;transform:scale(.14)}
  .ai-chat-panel.is-open{transform:scale(1)}
  .ai-composer{padding-left:12px;padding-right:12px}
  .ai-model-popover{right:-4px;width:216px}
}


/* AI WORKSPACE CODEX POLISH V8 */
.ai-chat-fab{width:56px;height:56px;border:1px solid #d5e0e6;background:rgba(248,251,252,.96);color:#3e6674;box-shadow:0 10px 28px rgba(58,86,99,.18);transition:transform .28s cubic-bezier(.16,1,.3,1),opacity .18s ease,box-shadow .18s ease;will-change:transform,opacity}
.ai-chat-fab .ai-fab-mark{width:37px;height:37px;border:1px solid #e1e8ec;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 9px rgba(58,86,99,.08)}
.ai-chat-fab .ai-logo{width:29px;height:29px;display:block}
.ai-chat-fab:hover{background:#fff;color:#2e5665;box-shadow:0 13px 32px rgba(58,86,99,.24)}
.ai-chat-fab.is-dragging{box-shadow:0 15px 38px rgba(58,86,99,.28)}
.ai-chat-fab.is-open{visibility:visible;opacity:0;transform:scale(.68);pointer-events:none}
.ai-chat-badge{position:absolute;top:-5px;right:-5px;z-index:2;min-width:19px;height:19px;padding:0 5px;border:2px solid #fff;border-radius:999px;background:#d95d58;color:#fff;display:flex;align-items:center;justify-content:center;box-sizing:border-box;font:700 10px/1 Arial,sans-serif;box-shadow:0 4px 10px rgba(168,54,48,.26)}
.ai-chat-badge[hidden]{display:none}
.ai-chat-badge.is-new{animation:ai-badge-pop .38s cubic-bezier(.16,1,.3,1)}
.ai-chat-panel{left:50%;top:50%;right:auto;bottom:auto;width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:18px;box-shadow:0 24px 70px rgba(31,41,55,.2);transform:translate(-50%,-50%) scale(.12);transform-origin:var(--ai-origin-x,50%) var(--ai-origin-y,50%);transition:opacity .18s ease,transform .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1);will-change:opacity,transform;border-radius:18px;pointer-events:none}
.ai-chat-panel.is-open{transform:translate(-50%,-50%) scale(1);border-radius:12px;pointer-events:auto}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{width:26px;height:26px;flex:0 0 26px;border-radius:8px;border:1px solid #e0e7ec;background:#fff;box-shadow:none;color:#526775;display:flex;align-items:center;justify-content:center}
.ai-brand-dot:after{display:none}
.ai-brand-dot .ai-logo{width:18px;height:18px;display:block}
.ai-auth-mark{color:#526775;background:#f5f7f8;border-color:#e0e7ec;box-shadow:none;display:flex;align-items:center;justify-content:center}
.ai-auth-mark .ai-logo{width:34px;height:34px;display:block}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{display:none}
.ai-main-title span{display:none}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer{position:relative}
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;border-color:#dfe4e8;border-radius:15px;padding:11px 10px 8px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-composer-input-row{display:flex;min-height:30px;width:100%}
.ai-composer-box textarea{width:100%;padding:2px 3px;min-height:28px;max-height:180px}
.ai-composer-toolbar{display:flex;align-items:center;gap:4px;min-height:32px;margin-top:7px;width:100%}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-model-settings{position:relative}
.ai-model-settings-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#58656e;display:flex;align-items:center;gap:6px;padding:0 7px;font:11px inherit;cursor:pointer}
.ai-model-settings-trigger:hover,.ai-model-settings-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-model-settings-trigger span:nth-child(2){color:#8c969d}
.ai-model-chevron{font-size:15px;color:#8b969d;line-height:1;transform:translateY(-1px)}
.ai-model-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:224px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-model-popover[hidden]{display:none}
.ai-setting-row{height:34px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 9px;border-radius:7px;color:#3d4850;font-size:12px}
.ai-setting-row:hover{background:#f5f7f8}
.ai-setting-value{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;color:#8d979d}
.ai-setting-value>span{font-size:16px;color:#aab2b7;line-height:1}
.ai-composer-select{appearance:none;height:28px;max-width:132px;border:0;border-radius:5px;background:transparent;color:#8b959b;outline:0;padding:0;font:11px inherit;text-align:right;cursor:pointer}
.ai-composer-select:hover,.ai-composer-select:focus{color:#3f4c55}
.ai-reasoning-select{max-width:64px}
.ai-context-select{max-width:64px}
.ai-setting-divider{height:1px;margin:6px 8px;background:#edf0f2}
.ai-reset-preferences{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between;border:0;border-radius:7px;background:transparent;color:#a0a8ad;padding:0 9px;font:11px inherit;cursor:pointer}
.ai-reset-preferences:hover{background:#f5f7f8;color:#68757d}
.ai-context-settings{position:relative}
.ai-context-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#68757d;display:flex;align-items:center;gap:5px;padding:0 6px;font:11px inherit;cursor:pointer}
.ai-context-trigger:hover,.ai-context-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-context-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:170px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-context-popover[hidden],.ai-context-select[hidden]{display:none}
.ai-context-usage{text-align:center;padding:2px 4px 7px;color:#a0a8ad;font-size:11px;line-height:1.45}
.ai-context-usage strong{display:block;color:#7d8990;font-weight:500}
.ai-context-usage small{display:block;margin-top:1px;color:#4d5961;font-size:11px}
.ai-context-divider{height:1px;margin:3px 5px 5px;background:#edf0f2}
.ai-context-popover button[data-ai-context]{width:100%;height:28px;border:0;border-radius:7px;background:transparent;text-align:left;padding:0 8px;color:#66737b;font:11px inherit;cursor:pointer}
.ai-context-popover button[data-ai-context]:hover{background:#f5f7f8;color:#3f4c55}
.ai-context-popover button[data-ai-context]:disabled{opacity:.38;cursor:not-allowed;background:transparent}
.ai-composer-spacer{flex:1}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{display:none}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{left:50%;top:50%;right:auto;bottom:auto;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;left:0;top:0;right:0;bottom:0;width:100vw;height:100dvh;border-radius:0;transform:scale(.14)}
  .ai-chat-panel.is-open{transform:scale(1)}
  .ai-composer{padding-left:12px;padding-right:12px}
  .ai-model-popover{right:-4px;width:216px}
}
@keyframes ai-badge-pop{0%{opacity:0;transform:scale(.45)}65%{opacity:1;transform:scale(1.16)}100%{opacity:1;transform:scale(1)}}


/* AI WORKSPACE CODEX POLISH V8 */
.ai-chat-fab{width:56px;height:56px;border:1px solid #d5e0e6;background:rgba(248,251,252,.96);color:#3e6674;box-shadow:0 10px 28px rgba(58,86,99,.18);transition:transform .28s cubic-bezier(.16,1,.3,1),opacity .18s ease,box-shadow .18s ease;will-change:transform,opacity}
.ai-chat-fab .ai-fab-mark{width:37px;height:37px;border:1px solid #e1e8ec;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 9px rgba(58,86,99,.08)}
.ai-chat-fab .ai-logo{width:29px;height:29px;display:block}
.ai-chat-fab:hover{background:#fff;color:#2e5665;box-shadow:0 13px 32px rgba(58,86,99,.24)}
.ai-chat-fab.is-dragging{box-shadow:0 15px 38px rgba(58,86,99,.28)}
.ai-chat-fab.is-open{visibility:visible;opacity:0;transform:scale(.68);pointer-events:none}
.ai-chat-badge{position:absolute;top:-5px;right:-5px;z-index:2;min-width:19px;height:19px;padding:0 5px;border:2px solid #fff;border-radius:999px;background:#d95d58;color:#fff;display:flex;align-items:center;justify-content:center;box-sizing:border-box;font:700 10px/1 Arial,sans-serif;box-shadow:0 4px 10px rgba(168,54,48,.26)}
.ai-chat-badge[hidden]{display:none}
.ai-chat-badge.is-new{animation:ai-badge-pop .38s cubic-bezier(.16,1,.3,1)}
.ai-chat-panel{left:50%;top:50%;right:auto;bottom:auto;width:min(1120px,calc(100vw - 64px));height:min(720px,calc(100vh - 64px));border-radius:18px;box-shadow:0 24px 70px rgba(31,41,55,.2);transform:translate(-50%,-50%) scale(.12);transform-origin:var(--ai-origin-x,50%) var(--ai-origin-y,50%);transition:opacity .18s ease,transform .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1);will-change:opacity,transform;border-radius:18px;pointer-events:none}
.ai-chat-panel.is-open{transform:translate(-50%,-50%) scale(1);border-radius:12px;pointer-events:auto}
.ai-chat-main-view[hidden]{display:none}
.ai-chat-sidebar{background:#f1f4f8;border-right-color:#e1e7ee}
.ai-brand-dot{width:26px;height:26px;flex:0 0 26px;border-radius:8px;border:1px solid #e0e7ec;background:#fff;box-shadow:none;color:#526775;display:flex;align-items:center;justify-content:center}
.ai-brand-dot:after{display:none}
.ai-brand-dot .ai-logo{width:18px;height:18px;display:block}
.ai-auth-mark{color:#526775;background:#f5f7f8;border-color:#e0e7ec;box-shadow:none;display:flex;align-items:center;justify-content:center}
.ai-auth-mark .ai-logo{width:34px;height:34px;display:block}
.ai-workspace-brand b{color:#34424c}
.ai-workspace-brand small{color:#9aa5ad}
.ai-new-chat{height:36px;border:0;background:transparent;box-shadow:none;color:#4b5862;font-weight:500}
.ai-new-chat:hover{background:#e5ebf1;border-color:transparent;color:#2f3d48}
.ai-new-chat kbd,.ai-sidebar-nav kbd{display:none}
.ai-sidebar-nav{padding-top:12px}
.ai-sidebar-nav button{color:#68757e}
.ai-sidebar-nav button:hover,.ai-sidebar-nav button.active{background:#e3eaf1;color:#34434e}
.ai-sidebar-nav button:hover .ai-nav-icon,.ai-sidebar-nav button.active .ai-nav-icon{color:#526775}
.ai-conversation-item:hover,.ai-conversation-item.active{background:#e4ebf2}
.ai-conversation-item.active .ai-conversation-main{color:#34434e}
.ai-conversation-pin:hover,.ai-conversation-pin.pinned{color:#ad842f}
.ai-chat-user-bar{border-top-color:#e1e7ee}
.ai-user-avatar{background:#e1e8ef;color:#52616d}
.ai-chat-main{background:#fff}
.ai-main-head{height:54px;flex-basis:54px;padding-left:14px;padding-right:14px;border-bottom-color:#e7ebef}
.ai-main-title strong{color:#303b44;font-weight:550}
.ai-chat-messages{padding-top:30px;padding-bottom:24px}
.ai-empty-orb{background:#f5f6f7;border-color:#e1e5e8;color:#aeb7bd;border-radius:14px}
.ai-empty-workspace h2{font-size:20px;font-weight:450;color:#39434a}
.ai-empty-workspace p{display:none}
.ai-main-title span{display:none}
.ai-composer{padding-left:46px;padding-right:46px;padding-bottom:20px}
.ai-composer{position:relative}
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;border-color:#dfe4e8;border-radius:15px;padding:11px 10px 8px;box-shadow:0 4px 15px rgba(31,41,55,.055)}
.ai-composer-box:focus-within{border-color:#b8c5cf;box-shadow:0 5px 18px rgba(31,41,55,.08)}
.ai-composer-input-row{display:flex;min-height:30px;width:100%}
.ai-composer-box textarea{width:100%;padding:2px 3px;min-height:28px;max-height:180px}
.ai-composer-toolbar{display:flex;align-items:center;gap:4px;min-height:32px;margin-top:7px;width:100%}
.ai-attach-btn{color:#8c979e}
.ai-attach-btn:hover{background:#f0f3f6;color:#536470}
.ai-model-settings{position:relative}
.ai-model-settings-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#58656e;display:flex;align-items:center;gap:6px;padding:0 7px;font:11px inherit;cursor:pointer}
.ai-model-settings-trigger:hover,.ai-model-settings-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-model-settings-trigger span:nth-child(2){color:#8c969d}
.ai-model-chevron{font-size:15px;color:#8b969d;line-height:1;transform:translateY(-1px)}
.ai-model-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:224px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-model-popover[hidden]{display:none}
.ai-setting-row{height:34px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 9px;border-radius:7px;color:#3d4850;font-size:12px}
.ai-setting-row:hover{background:#f5f7f8}
.ai-setting-value{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;color:#8d979d}
.ai-setting-value>span{font-size:16px;color:#aab2b7;line-height:1}
.ai-composer-select{appearance:none;height:28px;max-width:132px;border:0;border-radius:5px;background:transparent;color:#8b959b;outline:0;padding:0;font:11px inherit;text-align:right;cursor:pointer}
.ai-composer-select:hover,.ai-composer-select:focus{color:#3f4c55}
.ai-reasoning-select{max-width:64px}
.ai-context-select{max-width:64px}
.ai-setting-divider{height:1px;margin:6px 8px;background:#edf0f2}
.ai-reset-preferences{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between;border:0;border-radius:7px;background:transparent;color:#a0a8ad;padding:0 9px;font:11px inherit;cursor:pointer}
.ai-reset-preferences:hover{background:#f5f7f8;color:#68757d}
.ai-context-settings{position:relative}
.ai-context-trigger{height:28px;border:0;border-radius:7px;background:transparent;color:#68757d;display:flex;align-items:center;gap:5px;padding:0 6px;font:11px inherit;cursor:pointer}
.ai-context-trigger:hover,.ai-context-trigger[aria-expanded="true"]{background:#f1f4f6;color:#3f4c55}
.ai-context-popover{position:absolute;z-index:10;right:-3px;bottom:calc(100% + 9px);width:170px;padding:7px;background:rgba(255,255,255,.98);border:1px solid #e0e5e9;border-radius:12px;box-shadow:0 12px 32px rgba(31,41,55,.16)}
.ai-context-popover[hidden],.ai-context-select[hidden]{display:none}
.ai-context-usage{text-align:center;padding:2px 4px 7px;color:#a0a8ad;font-size:11px;line-height:1.45}
.ai-context-usage strong{display:block;color:#7d8990;font-weight:500}
.ai-context-usage small{display:block;margin-top:1px;color:#4d5961;font-size:11px}
.ai-context-divider{height:1px;margin:3px 5px 5px;background:#edf0f2}
.ai-context-popover button[data-ai-context]{width:100%;height:28px;border:0;border-radius:7px;background:transparent;text-align:left;padding:0 8px;color:#66737b;font:11px inherit;cursor:pointer}
.ai-context-popover button[data-ai-context]:hover{background:#f5f7f8;color:#3f4c55}
.ai-context-popover button[data-ai-context]:disabled{opacity:.38;cursor:not-allowed;background:transparent}
.ai-composer-spacer{flex:1}
.ai-chat-send-btn{width:36px;height:36px;min-width:36px;flex-basis:36px;border-radius:50%;background:#34383e}
.ai-chat-send-btn:hover{background:#242a30}
.ai-composer-meta{display:none}
.ai-chat-img-preview{border-color:#dfe5e9;background:#f7f9fa}
.ai-utility-head{padding-top:25px;background:#fff}
.ai-utility-add{border-color:#c9d4dc;background:#f4f7f9;color:#4b5c67}
.ai-utility-add:hover{background:#e8eef3}
.ai-plugin-icon{background:#eaf0f4;color:#536775}
.ai-plugin-state{color:#5c7a68;background:#eef5f0}
@media (max-width:900px){
  .ai-chat-panel{left:50%;top:50%;right:auto;bottom:auto;width:calc(100vw - 24px);height:calc(100vh - 24px)}
  .ai-composer{padding-left:20px;padding-right:20px}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;left:0;top:0;right:0;bottom:0;width:100vw;height:100dvh;border-radius:0;transform:scale(.14)}
  .ai-chat-panel.is-open{transform:scale(1)}
  .ai-composer{padding-left:12px;padding-right:12px}
  .ai-model-popover{right:-4px;width:216px}
}
/* AI WORKSPACE CODEX POLISH V9 */
.ai-chat-panel{top:calc(50% - 24px);width:min(1260px,calc(100vw - 48px));height:min(780px,calc(100vh - 56px));border:1px solid #dbe2e7;box-shadow:0 24px 72px rgba(31,41,55,.18)}
.ai-chat-panel.is-open{border-radius:14px}
.ai-chat-fab:focus,.ai-chat-fab:focus-visible{outline:none;box-shadow:0 10px 28px rgba(58,86,99,.18)}
.ai-composer-box,.ai-composer-box:focus-within{border-color:#d5dde3;box-shadow:0 5px 18px rgba(31,41,55,.06)}
.ai-composer-box textarea,.ai-composer-box textarea:focus{outline:none;box-shadow:none}
.ai-model-settings-trigger:focus,.ai-model-settings-trigger:focus-visible,.ai-context-trigger:focus,.ai-context-trigger:focus-visible,.ai-choice-trigger:focus,.ai-choice-trigger:focus-visible{outline:none;box-shadow:none}
.ai-model-settings-trigger{gap:5px;color:#52626c}
.ai-model-settings-trigger span:nth-child(2){color:#a1abb1}
.ai-model-summary-dot{color:#a1abb1;font-size:13px}
.ai-chevron-icon{width:14px;height:14px;flex:0 0 14px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;color:#95a1a8}
.ai-model-popover{width:250px;padding:8px;overflow:visible}
.ai-setting-row-action{height:40px;padding:0 10px}
.ai-choice-trigger{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:0;max-width:166px;border:0;background:transparent;color:#7c8991;padding:0;font:11px inherit;cursor:pointer}
.ai-choice-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-choice-trigger:hover{color:#3c4c56}
.ai-native-settings-select{display:none!important}
.ai-choice-menu{position:absolute;z-index:12;left:calc(100% + 8px);top:8px;width:224px;padding:6px;border:1px solid #dfe5e9;border-radius:12px;background:#fff;box-shadow:0 14px 32px rgba(31,41,55,.15)}
.ai-choice-menu-reasoning{top:48px}
.ai-choice-menu[hidden]{display:none}
.ai-choice-menu button{width:100%;min-height:39px;display:flex;align-items:center;gap:8px;border:0;border-radius:8px;background:transparent;color:#596871;padding:6px 8px;font:11px inherit;text-align:left;cursor:pointer}
.ai-choice-menu button:hover,.ai-choice-menu button.is-selected{background:#f1f4f6;color:#33444e}
.ai-choice-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.ai-choice-copy strong{font-size:11px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-choice-copy small{font-size:10px;color:#9aa6ac;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-choice-check{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:#5d7480;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.ai-choice-menu button.is-selected .ai-choice-check{opacity:1}
.ai-context-settings{display:flex;align-items:center}
.ai-context-trigger{width:34px;height:34px;padding:0;border-radius:50%;background:transparent;color:#627680;justify-content:center;box-shadow:none!important}
.ai-context-trigger:hover,.ai-context-trigger[aria-expanded="true"]{background:#f3f5f6;color:#465c67;box-shadow:none!important}
.ai-context-ring{position:relative;width:27px;height:27px;display:inline-flex;align-items:center;justify-content:center}
.ai-context-ring-svg{position:absolute;inset:0;width:27px;height:27px;transform:rotate(-90deg);overflow:visible}
.ai-context-ring-track,.ai-context-ring-progress{fill:none;stroke-width:2.2}
.ai-context-ring-track{stroke:#e3e8eb}
.ai-context-ring-progress{stroke:#718794;stroke-linecap:round;stroke-dasharray:75.4;stroke-dashoffset:75.4;transition:stroke-dashoffset .25s ease}
.ai-context-ring>span{position:relative;font:700 7px/1 Arial,sans-serif;color:#6a7c85;letter-spacing:-.2px}
.ai-context-popover{width:254px;padding:10px;border-color:#dfe5e9;box-shadow:0 14px 34px rgba(31,41,55,.15)}
.ai-context-usage{padding:2px 5px 9px}
.ai-context-divider{margin:3px 5px 9px}
.ai-context-compression{display:flex;align-items:center;gap:9px;padding:8px 7px;border:1px solid #e4e9ec;border-radius:9px;background:#fafbfb;text-align:left}
.ai-context-compression-icon{width:27px;height:27px;flex:0 0 27px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#eef2f4;color:#607782}
.ai-context-compression-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.ai-context-compression>span:nth-child(2){display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.ai-context-compression strong{font-size:11px;color:#43545d;font-weight:600}
.ai-context-compression small{font-size:10px;color:#9aa5aa;line-height:1.35}
.ai-context-compression em{font-style:normal;font-size:10px;color:#6b7c84;white-space:nowrap}
.ai-context-compression-note{margin:8px 7px 1px;color:#99a5aa;font-size:10px;line-height:1.5;text-align:left}
.ai-side-section[hidden]{display:none!important}
@media (max-width:900px){
  .ai-chat-panel{top:calc(50% - 16px);width:calc(100vw - 32px);height:calc(100vh - 40px)}
  .ai-choice-menu{left:auto;right:calc(100% + 8px)}
}
@media (max-width:640px){
  .ai-chat-panel{inset:0;top:0;left:0;width:100vw;height:100dvh;transform:scale(.12)}
  .ai-chat-panel.is-open{transform:scale(1)}
  .ai-choice-menu{left:auto;right:calc(100% + 8px);width:220px}
}
@keyframes ai-badge-pop{0%{opacity:0;transform:scale(.45)}65%{opacity:1;transform:scale(1.16)}100%{opacity:1;transform:scale(1)}}


/* AI WORKSPACE CODEX POLISH V10 */
.ai-choice-menu{top:auto;bottom:8px;max-height:min(280px,calc(100vh - 160px));overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d5dde2 transparent}
.ai-choice-menu-reasoning{top:auto;bottom:48px}


/* AI WORKSPACE CODEX POLISH V11 */
.ai-user-settings svg{width:15px;height:15px;display:block;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.ai-msg-meta{display:block;margin-top:8px;padding-top:7px;border-top:1px solid rgba(110,125,132,.16);color:#98a4a8;font-size:10px;line-height:1.4}
.ai-settings-view{display:flex;flex:1;min-height:0;background:#fff;color:#35434b}
.ai-settings-view[hidden]{display:none!important}
.ai-settings-sidebar{width:194px;min-width:194px;overflow:auto;padding:22px 12px 24px;background:#f3f6f9;border-right:1px solid #e1e7ed}
.ai-settings-sidebar-title{padding:0 12px 20px;color:#26353e;font-size:18px;font-weight:600}
.ai-settings-group-label{padding:14px 12px 7px;color:#a0abb2;font-size:10px;letter-spacing:.04em}
.ai-settings-sidebar button{width:100%;height:36px;display:flex;align-items:center;gap:9px;border:0;border-radius:8px;background:transparent;color:#687681;padding:0 11px;font:12px inherit;text-align:left;cursor:pointer}
.ai-settings-sidebar button:hover{background:#e7edf3;color:#3d4d58}
.ai-settings-sidebar button.is-active{background:#dfe8f1;color:#344754;font-weight:550}
.ai-settings-sidebar button svg{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round}
.ai-settings-content{flex:1;min-width:0;overflow:auto;background:#fff}
.ai-settings-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:12px;min-height:66px;padding:0 34px;border-bottom:1px solid #edf0f2;background:rgba(255,255,255,.94);backdrop-filter:blur(14px)}
.ai-settings-head>.ai-icon-btn{font-size:25px;color:#89979e}
.ai-settings-head>div:nth-child(2){display:flex;flex-direction:column;gap:3px;min-width:0}
.ai-settings-head strong{color:#35444d;font-size:14px;font-weight:600}
.ai-settings-head small{color:#a1adb2;font-size:10px}
.ai-settings-head-actions{display:flex!important;align-items:center;gap:10px;margin-left:auto!important;flex-direction:row!important}
.ai-settings-head-actions span{color:#6f9a85;font-size:10px;min-width:42px;text-align:right}
.ai-settings-head-actions button{height:30px;border:1px solid #d5e0e7;border-radius:7px;background:#fff;color:#50636e;padding:0 12px;font:11px inherit;cursor:pointer}
.ai-settings-head-actions button:hover{border-color:#9eb2bf;background:#f5f8fa}
.ai-settings-head-actions button:disabled{opacity:.55;cursor:wait}
.ai-settings-panels{max-width:920px;padding:38px 52px 72px}
.ai-settings-panel[hidden]{display:none!important}
.ai-settings-panel h2{margin:0 0 8px;color:#2f3c44;font-size:23px;font-weight:500}
.ai-settings-intro{margin:0 0 27px;color:#98a5aa;font-size:12px;line-height:1.6}
.ai-settings-card{margin-bottom:18px;border:1px solid #e1e7eb;border-radius:13px;background:#fff;box-shadow:0 3px 12px rgba(31,41,55,.025);overflow:hidden}
.ai-settings-card-title{padding:15px 18px 11px;color:#52616a;font-size:11px;font-weight:600;border-bottom:1px solid #edf1f3}
.ai-settings-row,.ai-settings-select-row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:64px;padding:11px 18px;border-bottom:1px solid #edf1f3;cursor:pointer}
.ai-settings-row:last-child,.ai-settings-select-row:last-child{border-bottom:0}
.ai-settings-row:hover,.ai-settings-select-row:hover{background:#fbfcfd}
.ai-settings-row>span,.ai-settings-select-row>span{display:flex;flex-direction:column;gap:4px;min-width:0}
.ai-settings-row b,.ai-settings-select-row b{color:#42525b;font-size:12px;font-weight:550}
.ai-settings-row small,.ai-settings-select-row small{color:#9aa6ab;font-size:10px;line-height:1.45}
.ai-settings-row input{position:absolute;opacity:0;pointer-events:none}
.ai-toggle{position:relative;width:36px;height:20px;flex:0 0 36px;border-radius:999px;background:#d8e0e5;transition:background .18s}
.ai-toggle:after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(31,41,55,.18);transition:transform .18s}
.ai-settings-row input:checked+.ai-toggle{background:#6b9bbd}
.ai-settings-row input:checked+.ai-toggle:after{transform:translateX(16px)}
.ai-settings-select-row select{min-width:152px;height:32px;border:1px solid #dbe3e8;border-radius:7px;background:#fff;color:#596b75;padding:0 9px;font:11px inherit;outline:none;cursor:pointer}
.ai-settings-select-row select:focus{border-color:#9eb4c1}
.ai-settings-info-row{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;padding:0 18px;border-bottom:1px solid #edf1f3;color:#74838a;font-size:11px}
.ai-settings-info-row:last-child{border-bottom:0}
.ai-settings-info-row b{color:#52636c;font-weight:500}
.ai-settings-info-row kbd{border:1px solid #dbe3e8;border-bottom-width:2px;border-radius:5px;background:#f8fafb;color:#65757d;padding:4px 7px;font:10px inherit}
.ai-settings-note{margin:10px 4px 0;color:#a1adb2;font-size:10px;line-height:1.55}
.ai-settings-plugin-row{display:flex;align-items:center;gap:11px;min-height:60px;padding:10px 18px;border-bottom:1px solid #edf1f3}
.ai-settings-plugin-row:last-child{border-bottom:0}
.ai-settings-plugin-row>span:nth-child(2){display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.ai-settings-plugin-row b{color:#4a5b64;font-size:12px;font-weight:550}
.ai-settings-plugin-row small{color:#9ba7ac;font-size:10px}
.ai-settings-plugin-row em{font-style:normal;color:#5f8e78;background:#edf7f1;border-radius:10px;padding:4px 8px;font-size:10px;white-space:nowrap}
.ai-settings-plugin-icon{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#f0f4f6;color:#6d8491;font-size:17px}
.ai-theme-dark .ai-settings-view,.ai-theme-dark .ai-settings-content{background:#1b2226;color:#dce5e9}
.ai-theme-dark .ai-settings-sidebar{background:#151b1f;border-right-color:#2d383e}
.ai-theme-dark .ai-settings-sidebar-title,.ai-theme-dark .ai-settings-panel h2{color:#e8eef1}
.ai-theme-dark .ai-settings-sidebar button{color:#9eabb2}
.ai-theme-dark .ai-settings-sidebar button:hover{background:#263138;color:#e2eaed}
.ai-theme-dark .ai-settings-sidebar button.is-active{background:#2a3a45;color:#e9f1f4}
.ai-theme-dark .ai-settings-head{border-bottom-color:#2b363c;background:rgba(27,34,38,.94)}
.ai-theme-dark .ai-settings-head strong,.ai-theme-dark .ai-settings-row b,.ai-theme-dark .ai-settings-select-row b,.ai-theme-dark .ai-settings-info-row b{color:#d9e3e7}
.ai-theme-dark .ai-settings-card{border-color:#2d383e;background:#20292e}
.ai-theme-dark .ai-settings-card-title,.ai-theme-dark .ai-settings-info-row,.ai-theme-dark .ai-settings-row,.ai-theme-dark .ai-settings-select-row,.ai-theme-dark .ai-settings-plugin-row{border-color:#2d383e}
.ai-theme-dark .ai-settings-row:hover,.ai-theme-dark .ai-settings-select-row:hover{background:#253035}
.ai-theme-dark .ai-settings-select-row select,.ai-theme-dark .ai-settings-head-actions button{border-color:#3a474e;background:#20292e;color:#d4e0e4}
@media (max-width:900px){.ai-settings-sidebar{width:170px;min-width:170px}.ai-settings-panels{padding-left:30px;padding-right:30px}.ai-settings-head{padding-left:24px;padding-right:24px}}
@media (max-width:640px){.ai-settings-view{flex-direction:column}.ai-settings-sidebar{width:auto;min-width:0;max-height:122px;padding:10px 10px 8px;display:flex;flex-wrap:wrap;align-content:flex-start;gap:2px;overflow:auto}.ai-settings-sidebar-title,.ai-settings-group-label{display:none}.ai-settings-sidebar button{width:auto;height:31px;padding:0 9px}.ai-settings-sidebar button svg{display:none}.ai-settings-content{min-height:0}.ai-settings-head{min-height:56px;padding:0 14px}.ai-settings-panels{padding:24px 14px 48px}.ai-settings-panel h2{font-size:21px}.ai-settings-row,.ai-settings-select-row{gap:12px;padding-left:13px;padding-right:13px}.ai-settings-row small,.ai-settings-select-row small{max-width:230px}.ai-settings-select-row select{min-width:120px}}


/* AI WORKSPACE CODEX POLISH V12 */
.ai-new-chat-plus{width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;font-size:0}
.ai-new-chat-plus svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round}
.ai-nav-icon{width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;font-size:0}
.ai-nav-icon svg{width:15px;height:15px;display:block;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.ai-nav-icon svg path:first-child{fill:none}
.ai-user-action svg{width:15px;height:15px;display:block;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
.ai-user-logout svg{width:16px;height:16px}


/* AI WORKSPACE CODEX POLISH V13 */
.ai-composer-box{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:9px 10px 8px}
.ai-chat-img-preview{position:relative;display:flex;align-items:flex-start;gap:8px;width:auto;max-width:none;align-self:flex-start;margin:0 0 6px;padding:0;border:0;background:transparent;color:transparent;font-size:0}
.ai-chat-img-preview[hidden]{display:none}
.ai-chat-img-preview img{display:block;width:80px;height:80px;object-fit:cover;border:1px solid #dfe5e9;border-radius:10px;background:#f6f8f9;box-shadow:0 2px 6px rgba(31,41,55,.08)}
.ai-chat-img-preview span{display:none}
.ai-chat-img-preview .ai-icon-btn{position:absolute;top:-6px;right:-6px;width:20px;height:20px;min-width:20px;flex-basis:20px;padding:0;border:2px solid #fff;border-radius:50%;background:#262d33;color:#fff;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(31,41,55,.22);z-index:2}
.ai-chat-img-preview .ai-icon-btn:hover{background:#11181c}
.ai-composer-input-row{width:100%;display:flex;align-items:flex-start;min-width:0}
.ai-composer-input-row textarea{width:100%;flex:1;min-height:30px;height:auto;padding:4px 4px 7px}
.ai-composer-toolbar{width:100%;display:flex;align-items:center;gap:7px;min-height:36px}
.ai-composer-toolbar .ai-composer-spacer{flex:1}
@media(max-width:900px){.ai-chat-img-preview{width:auto;margin-left:0}}
@media(max-width:640px){.ai-chat-img-preview{width:auto;margin-left:0}.ai-chat-img-preview img{width:72px;height:72px}}


/* AI WORKSPACE CODEX POLISH V14 */
.ai-user-settings{display:inline-flex;align-items:center;justify-content:center}
.ai-user-settings svg{width:15px;height:15px;stroke-width:1.55}
.ai-user-settings:hover{background:#e8eef2;color:#53646d}
.ai-user-settings:focus-visible{outline:2px solid #bbccd6;outline-offset:1px}


/* ERP COLLECTION STATUS POLISH V1 */
.collection-status-cell{vertical-align:middle!important;white-space:nowrap}
.collection-status-line{display:flex;align-items:center;gap:6px;min-height:22px;white-space:nowrap}
.collection-status-line>.pill{display:inline-flex;align-items:center;justify-content:center;min-height:20px;margin:0;padding:2px 8px;line-height:16px;white-space:nowrap}
.ai-badge{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:20px;box-sizing:border-box;margin:0;padding:2px 7px;border:1px solid transparent;border-radius:999px;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap}
.ai-badge-ok{background:#e5f6e9;color:#36835c;border-color:#ccebd4}
.ai-badge-run{background:#fff5d9;color:#9a6a16;border-color:#f5e5ae}
.ai-badge-warn{background:#fff0e5;color:#b85c1d;border-color:#f6d5bb}
.ai-auto-icon{width:13px;height:13px;flex:0 0 13px;display:block;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
.ai-badge>span{line-height:16px}
/* AI 待补 → 重试按钮 */
.ai-retry-btn{display:inline-flex;align-items:center;justify-content:center;height:20px;padding:0 8px;margin:0;border:1px solid #f6d5bb;border-radius:999px;background:#fff0e5;color:#b85c1d;font-size:11px;font-weight:600;line-height:16px;cursor:pointer;white-space:nowrap;transition:background .15s ease,transform .15s ease}
.ai-retry-btn:hover{background:#ffe0c2;transform:translateY(-1px)}
.ai-retry-btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
@media(max-width:900px){.collection-status-line{gap:4px}.ai-badge{padding-left:5px;padding-right:5px}.ai-retry-btn{padding:0 6px}}


/* AI WORKSPACE CODEX POLISH V15 */
.ai-user-settings img.ai-settings-svg{display:block;width:15px;height:15px;object-fit:contain}

/* ================= AI COLLECTION ATTRIBUTE FILL STYLE V1 ================= */
.collection-attribute-toolbar{gap:12px}.collection-attribute-toolbar>strong{display:inline-flex;align-items:center}
.c2-ai-fill-btn{display:inline-flex;align-items:center;gap:6px;color:#146d56;border-color:#b9d9cc;background:#f5fbf8}
.c2-ai-fill-btn:hover:not(:disabled){border-color:#167c60;background:#eaf7f1;color:#0d624c}
.c2-ai-fill-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.c2-ai-fill-btn.is-loading{cursor:wait;opacity:.78}.ai-fill-spinner{width:13px;height:13px;border:1.8px solid currentColor;border-right-color:transparent;border-radius:50%;animation:collection-ai-spin .72s linear infinite}
@keyframes collection-ai-spin{to{transform:rotate(360deg)}}

/* ================= AI COLLECTION ATTRIBUTE BACKGROUND V1 ================= */
.collection-ai-progress{display:flex;align-items:center;gap:8px;min-width:250px;height:32px;padding:0 10px;border:1px solid #efd8d8;border-radius:8px;background:#fff9f9;color:#a65d5d;font-size:11px;white-space:nowrap}
.collection-ai-progress[hidden]{display:none}
.collection-ai-progress-dot{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#d96c6c}
.collection-ai-progress-track{width:74px;height:4px;overflow:hidden;border-radius:99px;background:#f1dddd}
.collection-ai-progress-track i{display:block;height:100%;border-radius:inherit;background:#d96c6c;transition:width .25s ease}
.c2-autosave-state{margin-left:8px;color:#6f9a85;font-size:10px;white-space:nowrap}


/* COLLECTION CATALOG FEATURES V1 */
.c2-site-publish-panel{grid-column:1/-1;padding:14px 16px;border:1px solid #e1e8e8;border-radius:14px;background:#fbfdfc;margin-bottom:2px}
.c2-site-publish-panel[hidden]{display:none}
.c2-site-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px}
.c2-site-heading>div{display:flex;align-items:baseline;gap:10px}.c2-site-heading strong{font-size:14px;color:#243034}.c2-site-heading small{color:#8a999c;font-size:12px}.c2-site-currency-note{color:#167b68;font-size:12px}
.c2-site-choice-row{display:flex;flex-wrap:wrap;gap:8px}.c2-site-chip{display:inline-flex!important;align-items:center!important;gap:6px!important;width:auto!important;padding:7px 10px;border:1px solid #e0e8e7;border-radius:9px;background:#fff;cursor:pointer}.c2-site-chip:has(input:checked){border-color:#1d9b82;background:#effaf6}.c2-site-chip input{accent-color:#147d68}.c2-site-chip span{font-size:12px;color:#46555a}.c2-site-chip small{font-size:11px;color:#94a1a4}
.c2-title-field{display:flex!important;flex-direction:column!important}.c2-title-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:25px}.c2-title-label-row>span:first-child{font-size:13px;color:#3e4a4e}.c2-ai-toolbar{display:inline-flex;align-items:center;gap:6px;margin-left:auto}.c2-ai-translate-btn{height:28px!important;padding:0 10px!important}.c2-ai-lang-btn{height:28px;min-width:28px;border:1px solid #dfe6e7;border-radius:7px;background:#fff;color:#738085;cursor:pointer}.c2-title-field>input{margin-top:6px}
.collection-site-modal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 18px}.collection-site-check{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e1e8e7;border-radius:10px;background:#fff;cursor:pointer}.collection-site-check:has(input:checked){border-color:#18a488;background:#f0fbf7}.collection-site-check input{accent-color:#148b75}.collection-site-check span{display:flex;flex-direction:column;gap:2px}.collection-site-check b{font-size:13px;color:#334145}.collection-site-check small{font-size:11px;color:#8a999c}.collection-site-base-currency{display:flex!important;align-items:center!important;gap:12px!important;max-width:240px!important}.collection-site-base-currency select{flex:1}
.collection-multilang-toolbar{display:flex;align-items:center;justify-content:space-between;margin:14px 0 8px}.collection-multilang-source,.collection-multilang-fields label{position:relative;display:flex!important;flex-direction:column!important;gap:5px!important}.collection-multilang-source span,.collection-multilang-fields label>span{font-size:12px;color:#68777b}.collection-multilang-source small,.collection-multilang-fields small{color:#9aa5a7;font-size:11px}.collection-multilang-fields{display:grid;gap:10px;max-height:48vh;overflow:auto;padding-right:4px}.collection-multilang-fields input{padding-right:70px}.collection-multilang-fields small{position:absolute;right:10px;bottom:9px}
.collection-sku-table th .required-label{display:inline-flex;align-items:center;gap:2px}.collection-sku-table input[data-s2="sale_price"]{min-width:92px}.collection-sku-table input[data-s2="sale_price"]:invalid{border-color:#d95c5c}
@media(max-width:720px){.collection-site-modal-grid{grid-template-columns:1fr}.c2-site-heading{align-items:flex-start;flex-direction:column;gap:5px}}

/* COLLECTION PETITE PPP LOCK V1 */
.collection-sku-table tr.collection-sku-petite > td { background:#f4f6f7; color:#9aa4ab; }
.collection-sku-table tr.collection-sku-petite input:disabled,
.collection-sku-table tr.collection-sku-petite select:disabled,
.collection-sku-table tr.collection-sku-petite button:disabled { color:#9aa4ab; background:#eef1f3; border-color:#dce2e6; cursor:not-allowed; opacity:1; }
.collection-sku-table tr.collection-sku-petite .collection-sku-thumb-wrap { opacity:.58; filter:grayscale(.35); }
.collection-size-chart-table tr.collection-size-chart-petite > td { background:#f4f6f7; color:#9aa4ab; }
.collection-size-chart-table tr.collection-size-chart-petite input:disabled { color:#9aa4ab; background:#eef1f3; border-color:#dce2e6; cursor:not-allowed; opacity:1; }

/* COLLECTION TRANSLATION UI V2 */
.c2-site-publish-panel { padding: 11px 14px; }
.c2-site-heading { margin-bottom: 7px; }
.c2-site-heading > strong { font-size: 13px; color: #344348; }
.c2-site-choice-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.c2-site-chip,
.c2-site-chip:has(input:checked) { display: inline-flex !important; align-items: center !important; flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; height: 26px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.c2-site-chip input[type="checkbox"] { appearance: auto !important; -webkit-appearance: auto !important; flex: 0 0 14px !important; width: 14px !important; min-width: 14px !important; max-width: 14px !important; height: 14px !important; min-height: 14px !important; margin: 0 7px 0 0 !important; padding: 0 !important; accent-color: #147d68; }
.c2-site-chip span { display: inline !important; font-size: 12px !important; line-height: 26px !important; font-weight: 400 !important; color: #46555a !important; white-space: nowrap !important; }
.c2-site-chip small, .c2-site-currency-note { display: none !important; }
.collection-site-check,
.collection-site-check:has(input:checked) { display: flex !important; align-items: center !important; gap: 7px !important; min-height: 28px !important; padding: 4px 6px !important; border: 0 !important; border-radius: 6px !important; background: transparent !important; }
.collection-site-check input[type="checkbox"] { appearance: auto !important; -webkit-appearance: auto !important; flex: 0 0 14px !important; width: 14px !important; min-width: 14px !important; max-width: 14px !important; height: 14px !important; min-height: 14px !important; margin: 0 !important; padding: 0 !important; accent-color: #147d68; }
.collection-site-check span { display: block !important; }
.collection-site-check b { font-size: 12px !important; font-weight: 400 !important; color: #46555a !important; }
.collection-site-check small { display: none !important; }
.c2-ai-lang-select { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; height: 28px !important; min-width: 92px !important; padding: 0 9px !important; border: 1px solid #dfe6e7 !important; border-radius: 7px !important; background: #fff !important; color: #59686d !important; font-size: 12px !important; cursor: pointer; }
.c2-ai-lang-select:hover { border-color: #a9c9c1 !important; background: #f7fbfa !important; }
.c2-ai-lang-chevron { color: #8b999d; font-size: 12px; line-height: 1; }
.c2-ai-translate-btn { min-width: 72px !important; }

/* COLLECTION SKU PRICING UI V1 */
.collection-sku-source-price,
.collection-sku-price-cell { min-width: 138px; vertical-align: top; }
.collection-price-input { display: flex; align-items: center; gap: 5px; min-width: 118px; }
.collection-price-input > span { flex: 0 0 auto; color: #7e8d92; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.collection-price-input input { min-width: 78px !important; width: 82px !important; }
.collection-sku-source-price .collection-price-input input:disabled { color: #8b999d; background: #f3f6f6; border-color: #dfe6e5; cursor: not-allowed; }
.collection-site-price-trigger { display: block; margin-top: 5px; padding: 3px 6px; border: 0; border-radius: 5px; background: #edf7f4; color: #147d68; font-size: 10px; line-height: 1.35; cursor: pointer; white-space: nowrap; }
.collection-site-price-trigger:hover { background: #dff1eb; }
.collection-site-price-trigger:disabled { color: #9aa4ab; background: #eef1f3; cursor: not-allowed; }
.collection-site-price-modal { width: 760px; max-width: 94vw; }
.collection-site-price-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.collection-site-price-head h3 { margin: 0 0 5px; }
.collection-site-price-head p { margin: 0; }
.collection-site-price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; padding: 2px; }
.collection-site-price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 10px; border: 1px solid #e2e9e8; border-radius: 8px; background: #fbfdfc; }
.collection-site-price-row > span:first-child { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.collection-site-price-row b { overflow: hidden; color: #344348; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.collection-site-price-row small { color: #8a999d; font-size: 10px; }
.collection-site-price-control { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.collection-site-price-control input { width: 92px; min-width: 92px; padding: 6px 7px; }
.collection-site-price-control button { padding: 4px 3px; border: 0; background: transparent; color: #147d68; font-size: 11px; cursor: pointer; }
.collection-site-price-control button:hover { text-decoration: underline; }
@media(max-width:720px){.collection-site-price-grid{grid-template-columns:1fr}.collection-site-price-control input{width:82px;min-width:82px}}


/* AI AGENT WORKFLOW V1 */
.ai-chat-run-control,.ai-chat-run-cancel{width:30px;height:30px;min-width:30px;flex:0 0 30px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dbe4e6;border-radius:9px;background:#fff;color:#6d7c81;cursor:pointer;padding:0;transition:background .15s,border-color .15s,color .15s,transform .1s}
.ai-chat-run-control:hover{border-color:#a7c4d0;background:#f3f8fa;color:#3b7081}.ai-chat-run-control.is-paused{color:#176d59;border-color:#b9dbce;background:#f1faf5}
.ai-chat-run-cancel{color:#a06a6a}.ai-chat-run-cancel:hover{border-color:#e7bcbc;background:#fff6f6;color:#b64141}.ai-chat-run-control svg,.ai-chat-run-cancel svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ai-chat-run-control[hidden],.ai-chat-run-cancel[hidden]{display:none}.ai-chat-send-btn.is-guide{background:#166a54}.ai-composer-box.is-running{border-color:#b8cbd1;box-shadow:0 7px 22px rgba(44,94,109,.09)}
.ai-msg-ai{align-items:flex-start;gap:9px}.ai-msg-avatar{width:29px;height:29px;min-width:29px;display:flex;align-items:center;justify-content:center;border:1px solid #dce8e4;border-radius:10px;background:#f4f8f7;color:#14705a;margin-top:2px}.ai-msg-avatar .ai-fab-mark{display:flex;align-items:center;justify-content:center;width:24px;height:24px}.ai-msg-avatar .ai-logo{width:23px;height:23px}.ai-msg-ai .ai-msg-bubble{max-width:min(760px,calc(86% - 40px))}
.ai-work-panel{min-width:260px;margin:-2px 0 9px;border:1px solid #dde7e8;border-radius:9px;background:rgba(255,255,255,.72);overflow:hidden;color:#68777c}.ai-work-panel summary{display:flex;align-items:center;gap:7px;min-height:31px;padding:0 9px;list-style:none;cursor:pointer;user-select:none}.ai-work-panel summary::-webkit-details-marker{display:none}.ai-work-dot{width:6px;height:6px;border-radius:50%;background:#84a6ae;flex:0 0 6px}.ai-work-label{font-size:11px;color:#53666d;font-weight:600}.ai-work-status{font-size:10px;color:#97a5a9;margin-left:auto}.ai-work-chevron{font-size:14px;color:#9ba9ad;line-height:1;transition:transform .15s}.ai-work-panel[open] .ai-work-chevron{transform:rotate(180deg)}.ai-work-list{border-top:1px solid #edf1f2;padding:5px 9px 7px;max-height:180px;overflow:auto}.ai-work-item{display:flex;align-items:flex-start;gap:6px;font-size:10px;line-height:1.5;color:#78878b;padding:3px 0}.ai-work-item-icon{width:12px;flex:0 0 12px;color:#94a7ab;text-align:center;font-weight:700}.ai-work-item.is-error{color:#a55d5d}.ai-work-item.is-error .ai-work-item-icon{color:#c75f5f}.ai-msg-meta{display:block;margin-top:8px;color:#9ba7aa;font-size:10px}.ai-agent-enabled{font-style:normal;font-size:10px;color:#23735e;background:#edf8f2;border:1px solid #d1ecdf;border-radius:999px;padding:4px 8px;white-space:nowrap}

/* AI WORKSPACE STREAM STABILITY V1: activity updates do not replay message entrance animations. */
.ai-chat-panel .ai-msg { animation: none !important; }
.ai-chat-panel .ai-work-panel { contain: layout paint; }


/* AI WORKSPACE NATIVE CONTEXT UI V1 */
.ai-context-ring > span {
  min-width: 14px;
  font-size: 7px;
  letter-spacing: -0.15px;
}


/* AI WORKSPACE CONVERSATION CONTEXT MENU V1 */
.ai-context-menu{position:fixed;z-index:1600;min-width:168px;padding:5px;background:#fff;border:1px solid #dfe5e9;border-radius:10px;box-shadow:0 14px 34px rgba(31,41,55,.16);font-family:inherit}
.ai-theme-dark .ai-context-menu{background:#1d262d;border-color:#2d3942;box-shadow:0 14px 34px rgba(0,0,0,.4)}
.ai-context-menu button{display:flex;align-items:center;gap:9px;width:100%;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#35434b;font-size:12.5px;text-align:left;cursor:pointer}
.ai-context-menu button:hover{background:#eef3f6}
.ai-context-menu button.danger{color:#c0392b}
.ai-context-menu button.danger:hover{background:#fdf1ef}
.ai-context-menu .ai-context-menu-icon{width:15px;height:15px;flex:0 0 15px;display:flex;align-items:center;justify-content:center;color:#7b8b93}
.ai-context-menu button:hover .ai-context-menu-icon{color:#4d626d}
.ai-context-menu button.danger .ai-context-menu-icon{color:#d98a7e}
.ai-context-menu hr{border:0;border-top:1px solid #e8edf0;margin:5px 8px}
.ai-theme-dark .ai-context-menu button{color:#d3dde3}
.ai-theme-dark .ai-context-menu button:hover{background:#27333c}
.ai-theme-dark .ai-context-menu hr{border-top-color:#2d3942}
.ai-theme-dark .ai-context-menu button.danger{color:#e98a7a}


/* AI WORKSPACE ARCHIVED CONVERSATION LIST V1 */
.ai-archived-list{display:flex;flex-direction:column;gap:8px}
.ai-archived-item{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #e4e9ec;border-radius:10px;background:#fafbfb}
.ai-archived-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ai-archived-main strong{font-size:13px;font-weight:600;color:#35434b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-archived-main small{font-size:11px;color:#98a5aa}
.ai-archived-restore,.ai-archived-remove{padding:6px 11px;border-radius:8px;border:1px solid #dbe2e7;background:#fff;font-size:12px;cursor:pointer;color:#4d626d}
.ai-archived-restore:hover{background:#eef8f4;border-color:#c2e0d5;color:#146b54}
.ai-archived-remove:hover{background:#fdf1ef;border-color:#f0c9c2;color:#c0392b}
.ai-theme-dark .ai-archived-item{background:#1d262d;border-color:#2d3942}
.ai-theme-dark .ai-archived-main strong{color:#d3dde3}
.ai-theme-dark .ai-archived-restore,.ai-theme-dark .ai-archived-remove{background:#1d262d;border-color:#35434e;color:#b7c3c9}
.ai-theme-dark .ai-archived-restore:hover{background:#1a2f29;border-color:#2e5c4c;color:#6cd3ad}
.ai-theme-dark .ai-archived-remove:hover{background:#33211f;border-color:#6e3530;color:#f0a89b}


/* AI AGENT SINGLE PROCESS / LOCAL FEEDBACK / INLINE RENAME V1 */
.ai-chat-toast{position:absolute;left:50%;bottom:78px;z-index:20;max-width:min(520px,calc(100% - 32px));padding:9px 14px;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:#17211e;color:#fff;font-size:12px;line-height:1.45;white-space:nowrap;box-shadow:0 12px 30px rgba(15,23,42,.2);opacity:0;pointer-events:none;transform:translate(-50%,8px);transition:opacity .18s ease,transform .18s ease}
.ai-chat-toast.show{opacity:1;transform:translate(-50%,0)}
.ai-chat-toast[hidden]{display:none}
.ai-main-title strong.is-renaming{display:block;min-width:min(420px,45vw);max-width:min(720px,60vw);padding:5px 9px;border:1px solid #b8cbd1;border-radius:8px;background:#fff;box-shadow:0 2px 8px rgba(31,41,55,.08);outline:none;cursor:text;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-main-title strong.is-renaming:focus{border-color:#79a99b;box-shadow:0 0 0 3px rgba(22,106,84,.1)}
@media (max-width:720px){.ai-main-title strong.is-renaming{min-width:140px;max-width:48vw}.ai-chat-toast{white-space:normal;text-align:center}}

/* AI PIN ICON SVG V1 */
.ai-conversation-pin{display:inline-flex;align-items:center;justify-content:center;padding:4px}
.ai-pin-svg{width:15px;height:15px;display:block;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;transform-origin:50% 50%;transition:transform .16s ease,color .16s ease}
.ai-pin-svg.is-unpinned{transform:rotate(45deg)}
.ai-pin-svg.is-pinned{transform:rotate(0deg)}
.ai-context-menu-icon .ai-pin-svg{width:14px;height:14px}

/* COLLECTION BATCH IMAGE UPLOAD V1 */
.collection-image-upload-hint{align-self:center;color:var(--muted,#8a9797);font-size:12px;white-space:nowrap}

/* COLLECTION SKU IMAGE BULK EDIT V1 */
.collection-sku-table tr.collection-sku-petite .collection-sku-thumb-wrap{opacity:1;filter:none}
.collection-sku-table tr.collection-sku-petite select[data-s2="image_url"]:not(:disabled){color:var(--text,#344348);background:#fff;border-color:var(--border,#dce2e6);cursor:pointer}

/* COLLECTION SKC IMAGE DELETE V1 */
.collection-editor-v2 .collection-skc-image-option{position:relative;display:block;flex:0 0 58px;width:58px;height:58px;padding:0;border:1px solid var(--border);border-radius:8px;background:#f3f6f4;overflow:visible}
.collection-editor-v2 .collection-skc-image-option.is-selected{border-color:var(--primary);box-shadow:0 0 0 2px rgba(18,119,87,.12)}
.collection-editor-v2 .collection-skc-image-select{display:block;width:100%;height:100%;padding:2px;border:0;border-radius:8px;background:transparent;cursor:pointer;overflow:hidden}
.collection-editor-v2 .collection-skc-image-select:disabled{cursor:not-allowed}
.collection-editor-v2 .collection-skc-image-select img{display:block;width:100%;height:100%;object-fit:contain;border-radius:5px;background:#fff}
.collection-editor-v2 .collection-skc-image-delete{position:absolute;top:-7px;right:-7px;width:18px;height:18px;padding:0;border:1px solid #fff;border-radius:50%;background:#3b4248;color:#fff;font:700 13px/16px sans-serif;text-align:center;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.18);z-index:2}
.collection-editor-v2 .collection-skc-image-delete:hover{background:#c94b4b}
.collection-editor-v2 .collection-skc-image-upload{flex:0 0 58px;width:58px;height:58px;display:grid;place-items:center;align-content:center;gap:1px;padding:0;border:1px dashed #a9bdb5;border-radius:8px;background:#fbfdfc;color:var(--primary);cursor:pointer;transition:border-color .15s ease,background .15s ease}
.collection-editor-v2 .collection-skc-image-upload:hover{border-color:var(--primary);background:#eef8f4}
.collection-editor-v2 .collection-skc-image-upload span{font-size:21px;line-height:19px;font-weight:400}
.collection-editor-v2 .collection-skc-image-upload small{font-size:10px;line-height:12px;color:var(--text-muted)}
.collection-editor-v2 .collection-skc-image-option img,.collection-editor-v2 .collection-skc-image-upload,.collection-editor-v2 .collection-sku-thumb-wrap img{cursor:zoom-in}

/* COLLECTION SKC IMAGE DELETE FIX V1 */
.collection-editor-v2 .collection-skc-row{min-height:104px;padding-top:14px;padding-bottom:14px}
.collection-editor-v2 .collection-skc-media{min-height:76px;overflow:visible}
.collection-editor-v2 .collection-skc-image-strip{padding-top:9px;padding-bottom:5px}
.collection-editor-v2 .collection-skc-image-delete{top:-5px;right:-5px;width:20px;height:20px;font-size:14px;line-height:18px}


/* COLLECTION PAGE SCROLL V1 */
/* 商品采集箱在较矮屏幕上允许整页自然增长；表格只负责横向溢出，避免内容被 frozen-table-page 裁掉。 */

/* 订单采购状态列（采购管理模块 2026-08-13） */
.order-pp-cell { min-width: 96px; }
.order-pp-cell .pill { display: inline-block; }
.order-pp-linked { background: #e3f6ec; color: #14703d; }
.order-pp-auto { background: #e8f4f0; color: #147765; }
.order-pp-none { background: #f3f4f6; color: #8a9490; }
.order-pp-nos { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.m-procurement { margin-bottom: 12px; }
.m-procurement-status { margin-bottom: 6px; font-size: 13px; }
.pp-search-list { margin-top: 8px; max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.pp-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e2e8e6; border-radius: 8px; background: #fff; }
.pp-search-item .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: 0 0 44px; }
.pp-item-info { flex: 1; min-width: 0; }
.pp-item-info .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-item-act { display: flex; align-items: center; gap: 6px; }
.collection-page {
  height: auto;
  min-height: calc(100vh - 82px);
  overflow: visible;
}
.collection-page .frozen-table-body {
  min-height: 0;
  overflow: visible;
}
.collection-page #collection-table {
  min-width: 0;
}
.collection-page #collection-table > .table-scroll {
  height: auto;
  max-height: none;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-gutter: stable both-edges;
}
@media (max-width: 760px) {
  .collection-page {
    min-height: 0;
  }
  .collection-page #collection-table > .table-scroll {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }
}


/* 2026-08-07 产品管理审核状态徽章 */
.pm-status-on-sale{background:rgba(16,185,129,.15);color:#047857}
.pm-status-pending-audit{background:rgba(245,158,11,.18);color:#b45309}
.pm-status-pending-publish{background:rgba(148,163,184,.2);color:#475569}
.pm-status-off-shelf{background:rgba(220,38,38,.12);color:#b91c1c}
.pm-status-default{background:rgba(148,163,184,.18);color:#475569}
.pm-audit-reason{font-size:11px;margin-top:2px;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b91c1c}

/* COLLECTION SKC SOURCE IMAGE PICKER V1 */
.collection-editor-v2 .collection-skc-image-upload{cursor:pointer}
.collection-skc-image-action-menu{position:fixed;z-index:360;width:214px;padding:6px;border:1px solid rgba(28,69,57,.12);border-radius:12px;background:#fff;box-shadow:0 14px 36px rgba(21,49,41,.16),0 3px 10px rgba(21,49,41,.08);animation:collectionSkcMenuIn .14s ease-out;transform-origin:top left}
.collection-skc-image-action-menu button{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px;width:100%;min-height:54px;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:var(--text,#263b35);text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease}
.collection-skc-image-action-menu button:hover,.collection-skc-image-action-menu button:focus-visible{background:#edf7f3;color:var(--primary,#127757);outline:0}
.collection-skc-image-action-menu svg{width:20px;height:20px;margin:auto;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.collection-skc-image-action-menu button span{display:grid;gap:2px;min-width:0}
.collection-skc-image-action-menu strong{font-size:13px;font-weight:600;line-height:18px}
.collection-skc-image-action-menu small{color:var(--text-muted,#7f8f89);font-size:11px;line-height:16px}
@keyframes collectionSkcMenuIn{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

.collection-skc-source-modal-mask{position:fixed;inset:0;z-index:370;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(9,25,21,.5);backdrop-filter:blur(5px)}
.collection-skc-source-modal{display:flex;flex-direction:column;width:min(1060px,calc(100vw - 48px));max-height:min(820px,calc(100vh - 48px));overflow:hidden;border:1px solid rgba(31,66,56,.12);border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(14,40,32,.24);animation:collectionSkcModalIn .18s ease-out}
.collection-skc-source-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 22px 18px;border-bottom:1px solid var(--border,#e1e8e5);background:#fff}
.collection-skc-source-head h3{margin:0;color:var(--text,#263b35);font-size:18px;font-weight:650;line-height:25px}
.collection-skc-source-head p{margin:4px 0 0;color:var(--text-muted,#7f8f89);font-size:12px;line-height:18px}
.collection-skc-source-close{flex:0 0 34px;width:34px;height:34px;padding:0;border:0;border-radius:9px;background:transparent;color:#6f7e79;font:400 24px/32px sans-serif;cursor:pointer;transition:background .14s ease,color .14s ease}
.collection-skc-source-close:hover,.collection-skc-source-close:focus-visible{background:#f0f5f3;color:var(--text,#263b35);outline:0}
.collection-skc-source-body{flex:1;min-height:260px;overflow:auto;padding:4px 22px 22px;background:#fbfcfc;scrollbar-gutter:stable}
.collection-skc-source-section{padding-top:18px}
.collection-skc-source-section+.collection-skc-source-section{margin-top:4px;padding-top:22px;border-top:1px solid #e8eeeb}
.collection-skc-source-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.collection-skc-source-section-head label,.collection-skc-source-select-all{display:inline-flex;align-items:center;gap:9px;color:var(--text,#263b35);font-size:13px;cursor:pointer;user-select:none}
.collection-skc-source-section-head input,.collection-skc-source-select-all input{width:15px;height:15px;margin:0;accent-color:var(--primary,#127757)}
.collection-skc-source-section-head strong{font-size:14px;font-weight:650}
.collection-skc-source-section-head>span{color:var(--text-muted,#7f8f89);font-size:12px}
.collection-skc-source-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(138px,1fr));gap:12px}
.collection-skc-source-card{position:relative;display:block;min-width:0;aspect-ratio:1/1;overflow:hidden;border:1px solid #dce5e1;border-radius:10px;background:#fff;cursor:pointer;box-shadow:0 1px 2px rgba(30,54,47,.03);transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}
.collection-skc-source-card:hover:not(.is-existing){border-color:#8eb9aa;box-shadow:0 5px 14px rgba(22,94,72,.1);transform:translateY(-1px)}
.collection-skc-source-card>input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.collection-skc-source-image{display:grid;width:100%;height:100%;place-items:center;padding:8px;background:linear-gradient(145deg,#fff,#f7faf8)}
.collection-skc-source-image img{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.collection-skc-source-check{position:absolute;top:8px;left:8px;z-index:2;display:grid;width:21px;height:21px;place-items:center;border:1px solid #cbd8d3;border-radius:6px;background:rgba(255,255,255,.94);color:transparent;font-size:13px;font-weight:700;box-shadow:0 1px 3px rgba(25,57,47,.09);transition:background .14s ease,border-color .14s ease,color .14s ease}
.collection-skc-source-card.is-selected{border-color:var(--primary,#127757);box-shadow:0 0 0 2px rgba(18,119,87,.14),0 5px 14px rgba(22,94,72,.09)}
.collection-skc-source-card>input:checked+.collection-skc-source-check{border-color:var(--primary,#127757);background:var(--primary,#127757);color:#fff}
.collection-skc-source-card.is-existing{cursor:not-allowed;opacity:.64;background:#f2f5f4}
.collection-skc-source-card.is-existing .collection-skc-source-check{border-color:#9eada8;background:#9eada8;color:#fff}
.collection-skc-source-badge{position:absolute;right:7px;bottom:7px;z-index:2;padding:3px 7px;border-radius:999px;background:rgba(46,61,56,.82);color:#fff;font-size:10px;line-height:15px;backdrop-filter:blur(3px)}
.collection-skc-source-card.is-broken .collection-skc-source-image::after{content:'图片加载失败';color:#9aa7a2;font-size:11px}
.collection-skc-source-empty{display:grid;min-height:108px;place-items:center;border:1px dashed #d8e1de;border-radius:10px;background:#fff;color:var(--text-muted,#7f8f89);font-size:12px}
.collection-skc-source-foot{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 22px;border-top:1px solid var(--border,#e1e8e5);background:#fff}
.collection-skc-source-foot-actions{display:flex;align-items:center;gap:10px}
.collection-skc-source-foot-actions>span{min-width:72px;color:var(--text-muted,#7f8f89);font-size:12px;text-align:right}
.collection-skc-source-foot .btn{min-width:74px}
@keyframes collectionSkcModalIn{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
@media (max-width:720px){
  .collection-skc-source-modal-mask{align-items:stretch;padding:10px}
  .collection-skc-source-modal{width:100%;max-height:calc(100vh - 20px);border-radius:13px}
  .collection-skc-source-head{padding:16px}
  .collection-skc-source-body{padding:2px 14px 18px}
  .collection-skc-source-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .collection-skc-source-foot{padding:12px 14px}
  .collection-skc-source-foot-actions>span{display:none}
}
@media (max-width:430px){.collection-skc-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-skc-source-head p{display:none}}
@media (prefers-reduced-motion:reduce){.collection-skc-image-action-menu,.collection-skc-source-modal{animation:none}}
