本地长期开发成果的整体入库快照,包含后端鉴权/权限、AI 接入、合同解析、 SKU 目录等模块,以及前端相应页面与样式改版。 后端 - 新增鉴权与会话:scrypt 密码哈希、HttpOnly cookie(happy_sid)、登录失败锁定 - 新增「角色 → 权限组 → 权限点」三级权限模型与审计日志 - 新增 AI 提供商接入与预设(兼容 OpenAI 协议,内置 DeepSeek / 通义千问等) - 新增合同解析、合同文件保留策略、客户归属与访问控制 - 新增 SKU 目录、组织品牌、新客开发、系统日志等路由 前端 - 新增登录页与用户 / 权限组 / 系统日志管理页 - 新增客户详情、客户公海、询盘详情、报价编辑器、合同清洗中心 - 新增 AI 配置、组织品牌、包装参数、SKU 选择器等组件 - 新增英文大写金额、未保存改动拦截、抽屉与骨架屏 - 新增 stage1 样式层;产品、供应商、订单等页面改版 - EmbeddedSku 页面并入现有产品体系后删除 开源准备 - 新增 AGPL-3.0 LICENSE - README:移除未启用的 SQLCipher 加密声明(改为如实的「已知限制」)、 补充环境变量说明、许可证由「私有项目」改为 AGPL-3.0 - 移除历史遗留的空文件 _index_backup.txt - 文档中的项目路径更新为 happy-export
339 lines
29 KiB
CSS
339 lines
29 KiB
CSS
/* ============================================================
|
|
应用布局与页面组件
|
|
============================================================ */
|
|
|
|
.app-container { min-height: 100vh; background: var(--bg-primary); }
|
|
/* 顶栏横跨整宽、压在侧边栏之上;它下方才是「侧边栏 + 主内容」两栏 */
|
|
.app-shell { display: flex; flex-direction: column; min-height: 100vh; }
|
|
.app-body { display: flex; flex: 1 1 auto; min-height: 0; }
|
|
|
|
/* 侧边栏:仪表板式工业控制台
|
|
对比度策略参考 GoodJob 的 Command Deck —— 底色固定深色、不随日夜主题反转,
|
|
文字亮度拉高,hover 近白、选中近白 + 品牌色强调条,两种主题下都清晰。 */
|
|
.sidebar {
|
|
/* 侧栏专属色板:不引用随主题翻转的变量,日夜两套主题共用同一份深色底。
|
|
⚠️ 这套变量定义在 .sidebar 上,不是 :root —— 要覆盖必须写在同级或更具体的选择器。
|
|
2026-09-15:原本是青色系(强调 #7ed7f5、文字 #c3d7e3),跟主区的钢蓝不是同一套色相,
|
|
同屏看像两个界面;这里统一到钢蓝,并把文字灰提亮一档。 */
|
|
--sb-bg-top: #0a1826;
|
|
--sb-bg-bottom: #050c14;
|
|
--sb-border: rgba(160, 180, 215, 0.16);
|
|
--sb-text: #d5dfec;
|
|
--sb-text-dim: #a8b6c9;
|
|
--sb-text-strong: #ffffff;
|
|
--sb-icon: #a3b2c7;
|
|
--sb-hover-bg: #1b2b40;
|
|
--sb-active-bg: rgba(132, 181, 255, 0.15);
|
|
--sb-active-ring: rgba(132, 181, 255, 0.40);
|
|
--sb-accent: #9ec5ff;
|
|
position: sticky;
|
|
top: var(--header-height);
|
|
width: var(--sidebar-width);
|
|
height: calc(100vh - var(--header-height));
|
|
flex: 0 0 var(--sidebar-width);
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: linear-gradient(180deg, var(--sb-bg-top) 0%, var(--sb-bg-bottom) 100%);
|
|
border-right: 1px solid var(--sb-border);
|
|
box-shadow: 10px 0 28px rgba(0, 0, 0, 0.28);
|
|
transition: width var(--transition-base), flex-basis var(--transition-base);
|
|
z-index: 10;
|
|
}
|
|
.sidebar::before { content: ""; height: 3px; flex: 0 0 3px; background: linear-gradient(90deg, var(--primary-dark), var(--primary-light)); }
|
|
.sidebar.collapsed { width: var(--sidebar-collapsed-width); flex-basis: var(--sidebar-collapsed-width); }
|
|
/* 首行:工作台(左)+ 展开/收起导航按钮(右) */
|
|
.sidebar-top { display: flex; align-items: center; gap: 8px; min-height: 62px; padding: 8px 12px; border-bottom: 1px solid var(--sb-border); }
|
|
.sidebar-top .nav-item-home { flex: 1 1 auto; min-width: 0; margin: 0; }
|
|
.sidebar-top .collapse-btn { flex: 0 0 auto; }
|
|
.sidebar-top .collapse-btn svg { transition: transform var(--transition-base); }
|
|
.sidebar.collapsed .sidebar-top { flex-direction: column; gap: 8px; padding: 8px; }
|
|
.sidebar.collapsed .sidebar-top .nav-item-home { width: 100%; flex: 0 0 auto; }
|
|
.sidebar.collapsed .collapse-btn svg { transform: rotate(180deg); }
|
|
.collapse-btn { flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid var(--sb-border); border-radius: var(--radius-sm); background: transparent; color: var(--sb-text); cursor: pointer; font-size: 16px; transition: all var(--transition-fast); }
|
|
.collapse-btn:hover { background: var(--sb-accent); color: #04131c; border-color: var(--sb-accent); }
|
|
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 10px 14px; }
|
|
/* 侧栏菜单滚动条:默认系统白条在深色侧栏上很突兀,改成平时隐身、悬停才露出的细条。
|
|
侧栏两主题都固定深色,拇指色用白色半透明即可通吃。 */
|
|
.sidebar-nav { scrollbar-width: thin; scrollbar-color: transparent transparent; }
|
|
.sidebar-nav::-webkit-scrollbar { width: 6px; }
|
|
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
|
|
.sidebar-nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
|
|
.sidebar-nav:hover { scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
|
|
.sidebar-nav:hover::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.18); }
|
|
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.32); }
|
|
/* 分组标题行:标题 + 右侧折叠按钮 */
|
|
.nav-group { display: block; }
|
|
.nav-group:first-of-type .nav-group-header { margin-top: 6px; padding-top: 0; }
|
|
.nav-group-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 16px 4px 6px; padding: 0 6px; }
|
|
.nav-group-title { flex: 1; margin: 0; color: var(--sb-text-dim); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
|
|
.nav-group-toggle { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--sb-text-dim); cursor: pointer; transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast); }
|
|
.nav-group-toggle:hover { color: var(--sb-text-strong); background: var(--sb-hover-bg); border-color: var(--sb-border); }
|
|
.nav-group-toggle svg { transition: transform var(--transition-base); }
|
|
.nav-group-toggle:not(.open) svg { transform: rotate(-90deg); }
|
|
.sidebar.collapsed .nav-group-header { display: none; }
|
|
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; margin: 3px 0; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-md); color: var(--sb-text); text-decoration: none; font-size: 14px; font-weight: 600; transition: all var(--transition-fast); }
|
|
.nav-item:hover { background: var(--sb-hover-bg); border-color: transparent; color: var(--sb-text-strong); }
|
|
.nav-item.active { background: var(--sb-active-bg); border-color: transparent; color: var(--sb-text-strong); box-shadow: inset 0 0 0 1px var(--sb-active-ring); }
|
|
.nav-item.active::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--sb-accent); box-shadow: 0 0 10px rgba(158, 197, 255, 0.5); }
|
|
.nav-item .icon { display: flex; align-items: center; justify-content: center; min-width: 20px; color: var(--sb-icon); transition: color var(--transition-fast); }
|
|
.nav-item:hover .icon, .nav-item.active .icon { color: var(--sb-accent); }
|
|
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
|
|
.sidebar.collapsed .nav-item span:not(.icon) { display: none; }
|
|
/* 用户信息只在右上角 header 显示;此处只放日夜切换与设置,右对齐以保持原有位置 */
|
|
.sidebar-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 15px 16px; border-top: 1px solid var(--sb-border); }
|
|
.settings-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--sb-border); border-radius: var(--radius-sm); background: transparent; color: var(--sb-text); cursor: pointer; transition: all var(--transition-fast); }
|
|
.settings-btn:hover { color: var(--sb-accent); border-color: var(--sb-active-ring); background: var(--sb-hover-bg); }
|
|
.sidebar.collapsed .sidebar-footer { justify-content: center; padding: 15px 10px; }
|
|
/* 收起后侧栏只有 76px 宽,两个 40px 圆形按钮并排会互相挤压变形 —— 只留日夜切换 */
|
|
.sidebar.collapsed .settings-btn { display: none; }
|
|
|
|
/* 主内容 */
|
|
.main-content { min-width: 0; flex: 1; overflow-y: auto; padding: 34px clamp(20px, 4vw, 52px) 52px; background-color: var(--bg-primary); background-image: linear-gradient(rgba(126, 190, 221, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 190, 221, 0.035) 1px, transparent 1px); background-size: 28px 28px; }
|
|
.page-container, .dashboard-container, .prospect-container { width: min(1440px, 100%); margin: 0 auto; }
|
|
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
|
|
.page-title { margin: 0 0 24px; color: var(--text-primary); font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; }
|
|
.page-header .page-title { margin-bottom: 0; }
|
|
.page-title::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 10px; background: var(--primary); }
|
|
|
|
/* 卡片与统计 */
|
|
.card, .dashboard-card, .panel { margin-bottom: 20px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-raise); }
|
|
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; padding-bottom: 13px; border-bottom: 1px solid var(--border-light); }
|
|
.card-header h2, .panel-title { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--text-primary); font-family: var(--font-display); font-size: 15px; font-weight: 700; }
|
|
.card-header h2 svg { color: var(--primary-light); }
|
|
.card-content { color: var(--text-secondary); }
|
|
.panel-title { margin-bottom: 14px; }
|
|
.panel-title::after { content: ""; flex: 1; height: 1px; background: var(--border-light); }
|
|
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
|
|
.stat-card { display: flex; align-items: center; min-height: 106px; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--surface-raised), var(--surface)); box-shadow: var(--shadow-raise); transition: transform var(--transition-fast), border-color var(--transition-fast); }
|
|
.stat-card:hover { transform: translateY(-2px); border-color: var(--primary-border); }
|
|
.stat-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 38px; color: var(--primary-light); }
|
|
.stat-label { margin-bottom: 5px; color: var(--text-tertiary); font-size: 13px; font-weight: 600; }
|
|
.stat-value { color: var(--text-primary); font-family: var(--font-mono); font-size: 27px; font-weight: 700; line-height: 1; }
|
|
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr); gap: 20px; margin-bottom: 20px; }
|
|
|
|
/* 工具栏、表单、搜索 */
|
|
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
|
|
.toolbar-search { flex: 1; min-width: 230px; max-width: 450px; }
|
|
.toolbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
|
|
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
|
|
.form-group { margin-bottom: 16px; }
|
|
.form-group label { display: block; margin-bottom: 7px; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
|
|
.search-input { width: 100%; }
|
|
.mono { font-family: var(--font-mono); }
|
|
.number, .price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
|
|
.bold { font-weight: 700; color: var(--text-primary); }
|
|
.secondary { color: var(--text-tertiary); }
|
|
|
|
/* 空状态、待办、活动、日程 */
|
|
.empty-state { padding: 48px 20px; color: var(--text-tertiary); text-align: center; }
|
|
.empty-state-icon { margin-bottom: 14px; color: var(--text-disabled); font-size: 40px; }
|
|
.empty-state-title { margin-bottom: 6px; color: var(--text-secondary); font-weight: 700; }
|
|
.empty-state-hint { color: var(--text-tertiary); font-size: 14px; }
|
|
.todo-list, .activity-list, .holiday-list { margin: 0; padding: 0; list-style: none; }
|
|
.todo-item, .activity-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
|
|
.todo-item:last-child, .activity-item:last-child { border-bottom: 0; }
|
|
.todo-item input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; accent-color: var(--primary); }
|
|
.todo-content { min-width: 0; flex: 1; }
|
|
.todo-title { color: var(--text-primary); font-size: 14px; font-weight: 600; }
|
|
.todo-meta, .activity-time { margin-top: 3px; color: var(--text-tertiary); font-size: 12.5px; }
|
|
.activity-content { color: var(--text-secondary); font-size: 14px; }
|
|
.calendar-widget { padding: 3px 0; }
|
|
.current-date { margin-bottom: 14px; padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--surface-deep); color: var(--primary-light); font-family: var(--font-mono); font-size: 14px; font-weight: 700; text-align: center; }
|
|
.holiday-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-light); }
|
|
.holiday-item:last-child { border-bottom: 0; }
|
|
.holiday-flag { display: flex; align-items: center; color: var(--primary-light); }
|
|
.holiday-name { flex: 1; color: var(--text-secondary); font-size: 14px; }
|
|
.holiday-date { color: var(--text-tertiary); font-family: var(--font-mono); font-size: 13px; }
|
|
.info-box { margin-top: 18px; padding: 15px 17px; border: 1px solid var(--info-border); border-left: 3px solid var(--info); border-radius: var(--radius-md); background: var(--info-bg); color: var(--text-secondary); }
|
|
.info-box h3 { margin: 0 0 9px; color: var(--info); font-size: 14px; }
|
|
.info-box ul { margin: 8px 0 0 18px; padding: 0; }
|
|
.info-box li { margin-bottom: 5px; }
|
|
|
|
/* 设置页 */
|
|
.settings-modal { display: flex; width: min(1000px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); overflow: hidden; border-radius: var(--radius-lg); }
|
|
.settings-sidebar { display: flex; flex-direction: column; width: 230px; flex: 0 0 230px; background: var(--surface-deep); border-right: 1px solid var(--border); }
|
|
.settings-header h2 { margin: 0; font-family: var(--font-display); font-size: 17px; }
|
|
.settings-nav { flex: 1; padding: 12px; overflow-y: auto; }
|
|
.settings-nav-item { width: 100%; margin-bottom: 4px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--text-secondary); cursor: pointer; text-align: left; font-size: 14px; font-weight: 600; transition: all var(--transition-fast); }
|
|
.settings-nav-item:hover { background: var(--surface-hover); color: var(--text-primary); }
|
|
.settings-nav-item.active { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary-light); }
|
|
.settings-content { flex: 1; overflow-y: auto; padding: 26px; }
|
|
.settings-section h3 { margin: 0 0 7px; color: var(--text-primary); font-family: var(--font-display); font-size: 22px; }
|
|
.settings-description { margin: 0 0 26px; color: var(--text-tertiary); font-size: 14px; }
|
|
.settings-group { margin-bottom: 26px; padding-bottom: 23px; border-bottom: 1px solid var(--border-light); }
|
|
.settings-group:last-child { border-bottom: 0; }
|
|
.settings-group h4 { margin: 0 0 13px; color: var(--text-secondary); font-size: 14px; }
|
|
.settings-actions { display: flex; flex-wrap: wrap; gap: 9px; }
|
|
.file-label { cursor: pointer; }
|
|
.help-text { margin: 9px 0 0; color: var(--text-tertiary); font-size: 13px; }
|
|
.checkbox-group label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
|
|
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
|
|
.checkbox-group span { color: var(--text-secondary); font-size: 14px; }
|
|
|
|
.loading { display: flex; align-items: center; justify-content: center; min-height: 220px; color: var(--text-tertiary); font-size: 14px; }
|
|
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 700ms linear infinite; }
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
@media (max-width: 1180px) { .stats-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); } }
|
|
@media (max-width: 900px) { .sidebar { width: var(--sidebar-collapsed-width); flex-basis: var(--sidebar-collapsed-width); } .sidebar-top { flex-direction: column; gap: 8px; padding: 8px; } .sidebar-top .nav-item-home { width: 100%; flex: 0 0 auto; } .sidebar-top .collapse-btn svg { transform: rotate(180deg); } .sidebar-nav { padding-inline: 9px; } .nav-group-header, .nav-item span:not(.icon), .settings-btn { display: none; } .nav-item { justify-content: center; padding-inline: 10px; } .sidebar-footer { justify-content: center; padding-inline: 10px; } .dashboard-grid { grid-template-columns: 1fr; } }
|
|
@media (max-width: 620px) { .main-content { padding: 24px 14px 36px; } .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat-card { min-height: 88px; padding: 13px; } .stat-icon { flex-basis: 30px; } .stat-value { font-size: 22px; } .dashboard-grid { display: block; } .form-row { grid-template-columns: 1fr; } .settings-modal { height: calc(100vh - 20px); width: calc(100vw - 20px); flex-direction: column; } .settings-sidebar { width: auto; flex-basis: auto; } .settings-header { padding: 14px 18px; } .settings-nav { display: flex; gap: 8px; overflow-x: auto; } .settings-nav-item { width: auto; white-space: nowrap; margin: 0; } .settings-content { padding: 20px 18px; } }
|
|
|
|
/* 产品页使用的原生 table 同样复用工业表格视觉 */
|
|
.table-wrap table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
|
|
.table-wrap thead th { position: sticky; top: 0; z-index: 1; padding: 11px 14px; background: var(--surface-raised); color: var(--text-secondary); border-bottom: 1px solid var(--border-strong); text-align: left; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; }
|
|
.table-wrap tbody td { padding: 12px 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); vertical-align: middle; }
|
|
.table-wrap tbody tr { cursor: pointer; transition: background var(--transition-fast); }
|
|
.table-wrap tbody tr:hover td { background: var(--primary-bg); color: var(--text-primary); }
|
|
.table-wrap tbody tr:last-child td { border-bottom: 0; }
|
|
|
|
/* ============================================================
|
|
供应商管理(由 SKU 迁移为原生 React 页面)
|
|
============================================================ */
|
|
|
|
.page-sub { margin: 6px 0 0; color: var(--text-secondary); font-size: 14px; }
|
|
.header-actions { display: flex; align-items: center; gap: 8px; }
|
|
.notice-inline { margin-bottom: 16px; padding: 10px 14px; border: 1px solid var(--danger-border); border-left: 3px solid var(--danger); border-radius: var(--radius-md); background: var(--danger-bg); color: var(--danger); font-size: 14px; }
|
|
|
|
.supplier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
|
|
.supplier-card { display: flex; flex-direction: column; gap: 7px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast); }
|
|
.supplier-card:hover { transform: translateY(-2px); border-color: var(--primary-border); background: var(--surface-raised); }
|
|
.supplier-card.is-unassigned { border-style: dashed; }
|
|
.sc-name { color: var(--text-primary); font-size: 15px; font-weight: 600; }
|
|
.sc-contact, .sc-loc { overflow: hidden; color: var(--text-secondary); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--border-light); color: var(--text-tertiary); font-size: 13px; }
|
|
.sc-count b { color: var(--text-primary); font-size: 14px; }
|
|
.muted-note { color: var(--text-tertiary); font-size: 13px; }
|
|
|
|
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
.chip { padding: 2px 9px; border: 1px solid var(--border-light); border-radius: var(--radius-pill); background: var(--surface-deep); color: var(--text-secondary); font-size: 13px; white-space: nowrap; }
|
|
|
|
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 24px; }
|
|
.kv { display: flex; flex-direction: column; gap: 3px; padding-bottom: 9px; border-bottom: 1px solid var(--border-light); }
|
|
.kv-label { color: var(--text-tertiary); font-size: 13px; }
|
|
.kv-value { color: var(--text-primary); font-size: 14px; word-break: break-word; }
|
|
.kv-value.is-empty { color: var(--text-disabled); }
|
|
|
|
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; }
|
|
.pill-ok { border: 1px solid var(--success-border); background: var(--success-bg); color: var(--success); }
|
|
.pill-warn { border: 1px solid var(--warning-border); background: var(--warning-bg); color: var(--warning); }
|
|
.pill-mute { border: 1px solid var(--border-light); background: var(--surface-deep); color: var(--text-tertiary); }
|
|
|
|
.thumb { display: block; width: 38px; height: 38px; object-fit: cover; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
|
|
.thumb-empty { background: var(--surface-deep); }
|
|
|
|
.form-actions { display: flex; align-items: center; gap: 9px; margin-top: 6px; }
|
|
.form-actions .btn-danger { margin-left: auto; }
|
|
|
|
/* ============================================================
|
|
产品管理(由 SKU 迁移为原生 React 页面)
|
|
============================================================ */
|
|
|
|
/* 表头改成中文友好:原来 11px + 0.08em 字距是给全大写英文设计的,中文会被拉散 */
|
|
.data-table thead th { font-size: 13px; letter-spacing: 0.02em; text-transform: none; }
|
|
|
|
/* 排列方式分段控件 */
|
|
.view-toggle { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-deep); }
|
|
.view-toggle button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px; border: 0; border-radius: calc(var(--radius-md) - 2px); background: transparent; color: var(--text-tertiary); cursor: pointer; transition: all var(--transition-fast); }
|
|
.view-toggle button:hover { background: var(--surface-hover); color: var(--text-primary); }
|
|
.view-toggle button.active { background: var(--primary-bg); color: var(--primary-light); }
|
|
|
|
/* 可点击表格行 */
|
|
.supplier-table tbody tr, .product-table tbody tr { cursor: pointer; }
|
|
.supplier-table tbody tr.row-unassigned { border-left: 3px dashed var(--border-strong); }
|
|
.product-table tbody tr.row-picked td { background: var(--primary-bg); }
|
|
.product-table tbody tr.row-hit td { background: var(--warning-bg); }
|
|
|
|
.check-inline { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 14px; white-space: nowrap; cursor: pointer; }
|
|
.check-inline input { width: 15px; height: 15px; accent-color: var(--primary); }
|
|
|
|
/* 批量操作条 */
|
|
.batch-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--primary-border); border-radius: var(--radius-md); background: var(--primary-bg); color: var(--text-secondary); font-size: 14px; }
|
|
.batch-bar b { color: var(--text-primary); }
|
|
|
|
.hit-line { margin-top: 3px; color: var(--text-tertiary); font-size: 13px; }
|
|
|
|
.thumb-wrap { position: relative; display: inline-block; }
|
|
.thumb-badge { position: absolute; right: -5px; bottom: -5px; min-width: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--primary); color: #04141d; font-size: 12px; font-weight: 700; line-height: 16px; text-align: center; }
|
|
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--text-disabled); border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-deep); }
|
|
.unit { margin-right: 1px; color: var(--text-tertiary); font-size: 0.85em; }
|
|
|
|
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--text-tertiary); cursor: pointer; transition: all var(--transition-fast); }
|
|
.icon-btn:hover { border-color: var(--border); background: var(--surface-hover); color: var(--text-primary); }
|
|
|
|
/* 抽屉补充 */
|
|
.drawer-wide { width: min(940px, 96vw); }
|
|
.drawer-head-main { min-width: 0; }
|
|
.drawer-sub { margin: 5px 0 0; color: var(--text-tertiary); font-size: 14px; }
|
|
|
|
/* 参数编辑器(参数名 / 值 / 删除) */
|
|
.attr-editor { display: flex; flex-direction: column; gap: 8px; }
|
|
.attr-rows { display: flex; flex-direction: column; gap: 7px; }
|
|
.attr-row { display: grid; grid-template-columns: 1fr 1fr 30px; align-items: center; gap: 8px; }
|
|
.attr-row input { width: 100%; }
|
|
.attr-editor > .btn { align-self: flex-start; }
|
|
|
|
/* 图片画廊 */
|
|
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
|
|
.gallery-item { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-deep); }
|
|
.gallery-item img { display: block; width: 100%; height: 108px; object-fit: cover; cursor: zoom-in; }
|
|
.gallery-flag { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--primary); color: #04141d; font-size: 12.5px; font-weight: 700; }
|
|
.gallery-actions { display: flex; gap: 6px; padding: 7px; border-top: 1px solid var(--border-light); }
|
|
.gallery-actions .btn { flex: 1; }
|
|
.add-image { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 142px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--text-tertiary); font-size: 13px; cursor: pointer; transition: all var(--transition-fast); }
|
|
.add-image:hover { border-color: var(--primary-border); background: var(--primary-bg); color: var(--primary-light); }
|
|
.add-image input { display: none; }
|
|
|
|
.lightbox { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 40px; background: rgba(2, 11, 18, 0.86); cursor: zoom-out; }
|
|
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
|
|
|
|
/* 说明块 */
|
|
.notice-inline.notice-ok { border-color: var(--success-border); border-left-color: var(--success); background: var(--success-bg); color: var(--success); }
|
|
.note { display: flex; gap: 9px; margin-bottom: 14px; padding: 11px 14px; border-radius: var(--radius-md); border-left: 3px solid var(--border-strong); background: var(--surface-deep); color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
|
|
.note-info { border-left-color: var(--primary); }
|
|
.note-warn { border-left-color: var(--warning); background: var(--warning-bg); }
|
|
.spec-text { white-space: pre-wrap; color: var(--text-secondary); font-size: 14px; line-height: 1.75; }
|
|
.terms summary { color: var(--text-secondary); font-size: 14px; cursor: pointer; }
|
|
.terms .spec-text { margin-top: 9px; }
|
|
|
|
/* 调价时间线 */
|
|
.timeline { display: flex; flex-direction: column; gap: 14px; }
|
|
.timeline-item { display: flex; gap: 12px; }
|
|
.timeline-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--primary); }
|
|
.timeline-title { color: var(--text-primary); font-size: 14px; }
|
|
.timeline-meta { margin-top: 2px; color: var(--text-tertiary); font-size: 13px; }
|
|
|
|
/* 小推车 */
|
|
.cart-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--primary); color: #04141d; font-size: 12.5px; font-weight: 700; }
|
|
.cart-list { display: flex; flex-direction: column; gap: 10px; }
|
|
.cart-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
|
|
.cart-thumb { flex: 0 0 auto; }
|
|
.cart-main { flex: 1; min-width: 0; }
|
|
.cart-name { overflow: hidden; color: var(--text-primary); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
|
|
.cart-meta { overflow: hidden; margin-top: 2px; color: var(--text-tertiary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
|
|
.cart-meta code { font-family: var(--font-mono); }
|
|
.cart-price { flex: 0 0 auto; min-width: 96px; text-align: right; color: var(--text-primary); font-size: 14px; }
|
|
.cart-qty { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
|
|
.cart-qty span { color: var(--text-tertiary); font-size: 12.5px; }
|
|
.cart-qty input { width: 84px; }
|
|
.cart-total { align-self: center; color: var(--text-secondary); font-size: 14px; }
|
|
.cart-total b { color: var(--text-primary); font-size: 16px; }
|
|
|
|
/* 设置页:系统与更新 */
|
|
.update-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 13px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--surface-deep); color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
|
|
.update-status b { color: var(--text-primary); font-family: var(--font-mono); }
|
|
.update-status .spinner { width: 14px; height: 14px; border-width: 2px; }
|
|
.update-status.is-checking { color: var(--text-tertiary); }
|
|
.update-status.is-ok { border-color: var(--success-border); background: var(--success-bg); color: var(--success); }
|
|
.update-status.is-new { border-color: var(--primary-border); background: var(--primary-bg); color: var(--primary-light); }
|
|
.update-status.is-error { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }
|
|
.update-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; }
|
|
.update-links .btn-link { text-decoration: none; font-size: 14px; }
|
|
.update-notes { margin: 10px 0 0; max-height: 230px; overflow: auto; padding: 12px 14px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--surface-deep); color: var(--text-secondary); font-family: var(--font-body); font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
|
|
|
|
/* 窄屏:批量条与抽屉内表单换行 */
|
|
@media (max-width: 720px) {
|
|
.batch-bar { flex-wrap: wrap; }
|
|
.attr-row { grid-template-columns: 1fr 1fr 28px; }
|
|
.cart-row { flex-wrap: wrap; }
|
|
}
|