:root {
  --bg: #ffffff;           /* 白色底 */
  --panel: #ffffff;         /* 面板 */
  --panel2: #f4f6fb;        /* 次级面板（浅灰蓝） */
  --line: #e5e9f2;          /* 边框 */
  --ink: #1e293b;           /* 主文字 */
  --dim: #64748b;           /* 次要文字 */
  --accent: #06b6d4;        /* 主色：活力青 */
  --accent2: #6366f1;       /* 辅色：靛紫 */
  --amber: #f59e0b;
  --green: #10b981; --red: #ef4444; --blue: #3b82f6;
  --violet: #8b5cf6; --pink: #ec4899;
  --radius: 14px;
  --grad: linear-gradient(135deg, #06b6d4, #6366f1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  background: #ffffff; color: var(--ink); line-height: 1.6;
}
.hidden { display: none !important; }
/* 页面切换加载态 */
.page-loading { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 90px 20px; color: var(--dim); font-size: 13.5px; }
.pl-ring { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(6,182,212,.2); border-top-color: var(--accent); animation: plSpin .7s linear infinite; }
@keyframes plSpin { to { transform: rotate(360deg); } }
/* 现代线性图标（SVG sprite，颜色随文字） */
.ic { width: 15px; height: 15px; vertical-align: -2.5px; flex-shrink: 0; display: inline-block; }
.ic use { stroke: currentColor; }
.btn-primary .ic, .btn-mini .ic, .btn-danger .ic, .btn-green .ic, .btn-amber .ic { vertical-align: -2.5px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 灵动入场动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes hueFlow { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes popIn { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.card, .stat, .ov-card, .rich-card, .kanban-col { animation: fadeUp .32s ease both; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1000px 620px at 20% -10%, rgba(6,182,212,.16), transparent 60%),
              radial-gradient(900px 600px at 85% 110%, rgba(99,102,241,.16), transparent 60%), #f6f8fc; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 40px 34px; width: 400px; box-shadow: 0 24px 70px rgba(30,41,59,.16); animation: fadeUp .4s ease both; }
.login-brand { font-size: 19px; font-weight: 800; text-align: center; letter-spacing: .3px;
  background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: hueFlow 6s linear infinite; }
.login-brand b { -webkit-text-fill-color: transparent; }
.login-sub { font-size: 12px; color: var(--dim); text-align: center; margin: 8px 0 26px; }
.login-card input { width: 100%; padding: 13px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; font-size: 14px; outline: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(6,182,212,.12); }
.login-foot { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 16px; }
.err { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 8px; text-align: center; }
/* 授权激活面板（登录页） */
.lic-panel { margin-top: 12px; padding: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.lic-info { font-size: 12.5px; line-height: 1.8; margin-bottom: 10px; }
.lic-info.lic-ok { color: #059669; }
.lic-info.lic-bad { color: #dc2626; }
.lic-row { display: flex; gap: 8px; margin-bottom: 8px; }
.lic-row input { flex: 1; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); outline: none; }
.lic-row .btn-primary { flex-shrink: 0; }
.lic-row2 textarea { width: 100%; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; color: var(--ink); outline: none; resize: vertical; }
.login-opt { display: flex; justify-content: space-between; align-items: center; margin: -2px 2px 14px; font-size: 12.5px; }
.login-remember { display: flex; align-items: center; gap: 6px; color: var(--dim); cursor: pointer; user-select: none; }
.login-remember input { width: auto !important; margin: 0 !important; }
.login-forgot { color: var(--accent); cursor: pointer; text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
/* 加工单 · 快捷日期查询卡片 */
.qr-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.qr-card { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 18px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.qr-card:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.qr-card.on { background: linear-gradient(135deg, rgba(6,182,212,.16), rgba(99,102,241,.16)); border-color: var(--accent); color: #0891b2; font-weight: 700; box-shadow: 0 6px 18px rgba(6,182,212,.18); }

/* 布局 */
.app { display: flex; flex-direction: column; height: 100vh; }
.topbar { height: 60px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 22px; padding: 0 22px; flex-shrink: 0; position: relative; z-index: 100; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); opacity: .5; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; color: var(--ink); white-space: nowrap;
  background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: hueFlow 8s linear infinite; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 14px rgba(6,182,212,.7); animation: popIn 1.6s ease infinite; }
.brand-sub { color: var(--accent2); font-size: 12px; font-weight: 700; letter-spacing: 1px; margin-left: 2px; }
.topnav { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; }
.tnav-group { position: relative; }
.tnav-btn { background: transparent; color: #475569; font-size: 13.5px; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; font-weight: 600; transition: all .15s; }
.tnav-btn:hover { background: var(--panel2); color: var(--accent); }
.tnav-drop { display: none; position: absolute; top: 100%; left: 0; min-width: 172px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; z-index: 60; box-shadow: 0 14px 34px rgba(30,41,59,.18); }
.tnav-group.open .tnav-drop { display: block; }
.tnav-item { padding: 9px 13px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #475569; white-space: nowrap; }
.tnav-item:hover { background: var(--panel2); color: var(--accent); }
.tnav-item.active { background: linear-gradient(135deg, rgba(6,182,212,.14), rgba(99,102,241,.14)); color: var(--accent); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--dim); white-space: nowrap; }
.user-chip { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.user-chip b { color: var(--ink); font-size: 13px; }
.user-chip i { color: var(--dim); font-style: normal; font-size: 11px; }
.clock { color: var(--dim); font-size: 12px; }
.page-head { padding: 18px 24px 0; display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.content { flex: 1; overflow-y: auto; padding: 14px 24px 24px; }

/* 卡片与表格 */
.card { background: linear-gradient(180deg, #ffffff, #fdfdff); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: 0 6px 22px rgba(30,41,59,.06); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 30px rgba(30,41,59,.10); }
.card h3 { font-size: 15.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .bar { width: 4px; height: 16px; background: var(--grad); border-radius: 4px; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(6,182,212,.12), transparent 70%); }
.stat b { font-size: 26px; font-weight: 800; }
.stat span { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); outline: none; height: 36px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 9px; border-bottom: 1px solid #eef1f7; }
th { color: var(--dim); font-weight: 600; font-size: 12px; background: #f8fafc; white-space: nowrap; }
th:first-child { border-top-left-radius: 8px; } th:last-child { border-top-right-radius: 8px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(6,182,212,.05); }

/* 按钮 */
button { border: none; border-radius: 9px; padding: 8px 15px; font-size: 13px; cursor: pointer; font-family: inherit; transition: all .15s; }
button:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(6,182,212,.35); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(6,182,212,.45); }
.btn-mini { background: rgba(6,182,212,.10); color: #0891b2; padding: 5px 12px; font-size: 12px; border: 1px solid rgba(6,182,212,.25); }
.btn-mini:hover { background: rgba(6,182,212,.18); }
.btn-danger { background: rgba(239,68,68,.10); color: #dc2626; border: 1px solid rgba(239,68,68,.28); }
.btn-danger:hover { background: rgba(239,68,68,.18); }
.btn-green { background: rgba(16,185,129,.10); color: #059669; border: 1px solid rgba(16,185,129,.28); }
.btn-amber { background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3); }

/* 徽章 */
.badge { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 10px; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-green { background: #d1fae5; color: #047857; }
.badge-gray { background: #e2e8f0; color: #475569; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(3px); }
.modal-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; width: min(760px, 94vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(15,23,42,.25); animation: fadeUp .25s ease both; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; flex: none; background: #fff; z-index: 2; }
.modal-close { background: transparent; font-size: 16px; color: var(--dim); }
/* 弹窗内容区独立滚动：长表单（如人员档案 2400px 高）可滚动到底部权限区；Win 隐藏滚动条时仍常显 */
.modal-body { padding: 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 #f1f5f9; }
.modal-body::-webkit-scrollbar { width: 10px; }
.modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; border: 2px solid #f1f5f9; }
.modal-body::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 6px; }
.modal-body label { font-size: 12px; color: var(--dim); display: block; margin: 12px 0 5px; }
.modal-body input, .modal-body select, .modal-body textarea { width: 100%; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; outline: none; font-family: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
/* 表单弹窗：两列网格排版，标签右侧对齐、输入框按实际大小（不再通栏大框） */
.mod-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; align-items: start; }
.mod-form .mod-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mod-form .mod-cell > label { width: 84px; flex: none; margin: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-form .mod-cell > input, .mod-form .mod-cell > select { width: auto; flex: 1 1 auto; min-width: 0; max-width: 170px; padding: 8px 10px; }
.mod-form .mod-cell input[type="date"], .mod-form .mod-cell input[type="number"] { max-width: 170px; }
.mod-form .mod-full .mod-cell > input, .mod-form .mod-full .mod-cell > select { max-width: 480px; }
.mod-form .mod-full { grid-column: 1 / -1; }
.mod-form .mod-full > label { display: block; }
/* 人员弹窗分组排版：照片右上角 + 分组小标题 + 基本信息子网格（思维连贯性排列） */
.pd-photo-row { display: flex; align-items: flex-start; gap: 14px; }
.pd-subgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; align-items: center; }
.pd-subgrid .mod-cell > input, .pd-subgrid .mod-cell > select { max-width: 170px; }
.mod-form .pd-subgrid .mod-cell > input, .mod-form .pd-subgrid .mod-cell > select { max-width: 170px; }
.pd-photo { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 112px; padding-top: 2px; }
.pd-group-head { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }

/* toast */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #0f172a; border: 1px solid rgba(6,182,212,.6); color: #e0f2fe; padding: 12px 22px; border-radius: 12px; font-size: 14px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.3); }

/* 聊天 */
.chat-box { border: 1px solid var(--line); border-radius: 12px; height: 420px; overflow-y: auto; padding: 14px; background: var(--panel2); }
.chat-msg { margin-bottom: 12px; max-width: 78%; }
.chat-msg.mine { margin-left: auto; }
.chat-msg .bubble { padding: 9px 13px; border-radius: 14px; font-size: 13.5px; background: #fff; border: 1px solid var(--line); }
.chat-msg.mine .bubble { background: linear-gradient(135deg, #e0f7ff, #eef0ff); color: #0e7490; border-color: rgba(6,182,212,.35); }
.chat-msg .meta { font-size: 11px; color: #94a3b8; margin: 3px 2px 0; }

/* 空态 */
.empty { text-align: center; color: #94a3b8; padding: 40px 20px; font-size: 13.5px; }
.empty::before { content: ''; display: block; height: 6px; margin-bottom: 10px; }

/* 牙位图（上颌/下颌两排各 16 格；整颌勾选在图表上方） */
.tooth-chart { display: flex; flex-direction: column; gap: 14px; }
.tooth-arch { display: flex; justify-content: center; gap: 16px; }
.tooth-quad { display: flex; gap: 5px; }
.tooth-cell { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: #9ca3af; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; transition: all .12s; }
.tooth-cell:hover { border-color: var(--accent); transform: translateY(-2px); }
/* 选中：白底黑色字 */
.tooth-cell.sel { background: #fff; color: #0f172a; border-color: #94a3b8; box-shadow: none; }
.tooth-cell.miss { background: #fff; border-color: var(--amber); color: #b45309; }
.tooth-arch-label { text-align: center; font-size: 11px; color: #94a3b8; letter-spacing: 3px; margin-bottom: 6px; }

/* 查询/统计用迷你牙位十字（FDI 四象限，纯数字，只显示实际牙位） */
.tmini {
  display: grid; grid-template-columns: auto auto; gap: 2px 7px; justify-content: center;
  padding: 3px 6px; border-radius: 5px; line-height: 1;
  background:
    linear-gradient(var(--line), var(--line)) center/1.5px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) center/100% 1.5px no-repeat;
}
.tmini-q { font-size: 11px; color: #0891b2; font-weight: 700; min-width: 20px; min-height: 13px; text-align: center; }

/* 打印 */
.print-view { background: #fff; color: #0f172a; border-radius: 10px; padding: 24px; min-height: 400px; border: 1px solid var(--line); }
.print-view * { color: #0f172a !important; }

/* 标签 */
.tooth-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tooth-tag { background: rgba(6,182,212,.08); border: 1px solid rgba(6,182,212,.25); border-radius: 6px; padding: 3px 9px; font-size: 12px; color: #0e7490; }

/* ===== 生产看板（Kanban：两行网格布局，不做左右滑动）===== */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-bottom: 12px; align-items: start; }
@media (max-width: 1080px) { .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kanban-col { background: #f1f5f9; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 260px); min-width: 0; }
.kanban-col-head { padding: 12px 14px; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #f1f5f9; border-radius: 14px 14px 0 0; z-index: 1; }
.kanban-col-head .n { min-width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: #fff; color: var(--accent); font-weight: 700; }
.kanban-col-body { padding: 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.kanban-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; }
.kanban-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 22px rgba(30,41,59,.14); }
.kanban-card .kc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.kanban-card .kc-patient { font-size: 14px; font-weight: 700; color: var(--ink); }
.kanban-card .kc-clinic { font-size: 11px; color: var(--dim); margin-top: 1px; }
.kanban-card .kc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.kanban-card .kc-meta .chip { font-size: 11px; background: rgba(6,182,212,.08); color: #0e7490; border-radius: 6px; padding: 2px 7px; }
.kanban-card .kc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.kanban-card .kc-amount { font-size: 15px; font-weight: 800; color: #b45309; }
.kanban-card .kc-due { font-size: 11px; color: var(--dim); }
.kanban-card .kc-actions { margin-top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.kanban-empty { text-align: center; color: #94a3b8; font-size: 12px; padding: 18px 6px; }

/* ===== 流程步骤条 ===== */
.stepper { display: flex; align-items: flex-start; margin: 8px 0 4px; overflow-x: auto; }
.stepper .step { flex: 1; min-width: 78px; text-align: center; position: relative; }
.stepper .step .dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--line); margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--dim); position: relative; z-index: 2; }
.stepper .step.done .dot { background: var(--grad); border-color: transparent; color: #fff; }
.stepper .step.current .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px rgba(6,182,212,.15); }
.stepper .step .lb { font-size: 11px; color: var(--dim); }
.stepper .step.done .lb, .stepper .step.current .lb { color: var(--ink); font-weight: 600; }
.stepper .step::before { content: ''; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 1; }
.stepper .step:first-child::before { display: none; }
.stepper .step.done::before { background: var(--grad); }

/* ===== 统计概览卡（色彩丰富：每张卡不同渐变）===== */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 14px; margin-bottom: 18px; }
.ov-card { border: 1px solid transparent; border-radius: 14px; padding: 16px 18px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.ov-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(30,41,59,.14); }
.ov-card.ov-click { cursor: pointer; }
.ov-card .ov-label { font-size: 12px; color: #475569; }
.ov-card .ov-value { font-size: 30px; font-weight: 800; margin: 4px 0 2px; color: #0f172a; }
.ov-card .ov-sub { font-size: 11px; color: #64748b; }
.ov-card .ov-icon { position: absolute; right: 14px; top: 14px; font-size: 22px; opacity: .55; }
.ov-card.dc-card .ov-value { font-size: 24px; }
.overview-grid .ov-card:nth-child(1) { background: linear-gradient(135deg,#e0f2fe,#ffffff); border-color:#bae6fd; }
.overview-grid .ov-card:nth-child(2) { background: linear-gradient(135deg,#e0e7ff,#ffffff); border-color:#c7d2fe; }
.overview-grid .ov-card:nth-child(3) { background: linear-gradient(135deg,#d1fae5,#ffffff); border-color:#a7f3d0; }
.overview-grid .ov-card:nth-child(4) { background: linear-gradient(135deg,#fef3c7,#ffffff); border-color:#fde68a; }
.overview-grid .ov-card:nth-child(5) { background: linear-gradient(135deg,#fce7f3,#ffffff); border-color:#fbcfe8; }
.overview-grid .ov-card:nth-child(6) { background: linear-gradient(135deg,#cffafe,#ffffff); border-color:#a5f3fc; }
.overview-grid .ov-card:nth-child(7) { background: linear-gradient(135deg,#ede9fe,#ffffff); border-color:#ddd6fe; }
.overview-grid .ov-card:nth-child(8) { background: linear-gradient(135deg,#f1f5f9,#ffffff); border-color:#e2e8f0; }
.dc-card { background: linear-gradient(135deg,#f0fdfa,#ffffff) !important; border-color:#99f6e4 !important; }
.dc-card:nth-child(2) { background: linear-gradient(135deg,#fef2f2,#ffffff) !important; border-color:#fecaca !important; }
.dc-card:nth-child(3) { background: linear-gradient(135deg,#f0f9ff,#ffffff) !important; border-color:#bae6fd !important; }

/* ===== 富卡片列表（通用）===== */
.rich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
.rich-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.rich-card .rc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rich-card .rc-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.rich-card .rc-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed #eef1f7; }
.rich-card .rc-row:last-child { border-bottom: none; }
.rich-card .rc-k { color: var(--dim); }
.rich-card .rc-v { color: var(--ink); text-align: right; }

/* 视图切换 */
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg .seg-btn { padding: 6px 14px; border-radius: 8px; font-size: 12.5px; color: var(--dim); cursor: pointer; }
.seg .seg-btn.on { background: var(--grad); color: #fff; font-weight: 700; }

/* ===== V2 侧边栏布局 ===== */
.app-body { display: flex; flex: 1; min-height: 0; }
.sidebar { width: 218px; flex-shrink: 0; overflow-y: auto; background: #fbfcfe; border-right: 1px solid var(--line); padding: 10px 8px 30px; }
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.side-grp { margin-bottom: 4px; }
.side-grp-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; font-size: 13px; font-weight: 700; color: #334155; cursor: pointer; border-radius: 8px; user-select: none; transition: background .12s; }
.side-grp-head::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); flex-shrink: 0; }
.side-grp:nth-child(2) .side-grp-head::before { background: linear-gradient(135deg,#f59e0b,#ef4444); }
.side-grp:nth-child(3) .side-grp-head::before { background: linear-gradient(135deg,#10b981,#06b6d4); }
.side-grp:nth-child(4) .side-grp-head::before { background: linear-gradient(135deg,#8b5cf6,#6366f1); }
.side-grp:nth-child(5) .side-grp-head::before { background: linear-gradient(135deg,#ec4899,#f59e0b); }
.side-grp:nth-child(6) .side-grp-head::before { background: linear-gradient(135deg,#3b82f6,#06b6d4); }
.side-grp:nth-child(7) .side-grp-head::before { background: linear-gradient(135deg,#f43f5e,#ec4899); }
.side-grp:nth-child(8) .side-grp-head::before { background: linear-gradient(135deg,#14b8a6,#84cc16); }
.side-grp:nth-child(9) .side-grp-head::before { background: linear-gradient(135deg,#0ea5e9,#8b5cf6); }
.side-grp-head span { flex: 1; margin-left: 8px; }
.side-grp-head:hover { background: var(--panel2); }
.side-grp-head i { font-style: normal; font-size: 10px; color: var(--dim); transition: transform .15s; }
.side-grp.open .side-grp-head i { transform: rotate(180deg); }
.side-grp-body { display: none; padding: 2px 0 6px; }
.side-grp.open .side-grp-body { display: block; }
.side-item { padding: 7px 12px 7px 30px; font-size: 12.5px; color: #64748b; cursor: pointer; border-radius: 8px; transition: all .12s; }
.side-item:hover { background: var(--panel2); color: var(--ink); transform: translateX(2px); }
.side-item.active { background: linear-gradient(135deg, rgba(6,182,212,.14), rgba(99,102,241,.14)); color: #0891b2; font-weight: 700; }
.bell-btn { position: relative; background: transparent; font-size: 17px; cursor: pointer; padding: 4px 8px; }
.bell-badge { position: absolute; top: -2px; right: -2px; background: var(--red); color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 5px; font-weight: 700; animation: popIn 1.2s ease infinite; }

/* ===== V2 通用组件 ===== */
.modal-wide { width: min(1060px, 96vw); }
.oe-wrap { max-width: 1240px; }
/* 设置页等网格：标签列 + 控件列两列对齐，任意数量的标签/控件对都不会交叉错行 */
.oe-grid { display: grid; grid-template-columns: minmax(130px, 0.34fr) 1fr; gap: 6px 14px; align-items: center; }
.oe-grid label { font-size: 12px; color: var(--dim); display: block; margin: 0; }
.oe-grid input, .oe-grid select, .oe-grid textarea { width: 100%; padding: 9px 11px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; outline: none; color: var(--ink); font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.oe-grid input, .oe-grid select { height: 36px; box-sizing: border-box; }
.oe-grid textarea { min-height: 64px; }
.oe-grid input:focus, .oe-grid select:focus, .oe-grid textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
.oe-grid .span2, .oe-grid .span3 { grid-column: 1 / -1; }
.oe-grid .span2 input, .oe-grid .span2 select, .oe-grid .span3 input, .oe-grid .span3 select, .oe-grid .span3 textarea { width: 100%; }
.oe-grid .inline-pair { display: flex; gap: 8px; }
.oe-grid .inline-pair input, .oe-grid .inline-pair select { width: auto; }
.oe-grid .cell { display: flex; flex-direction: column; min-width: 0; }
.oe-grid .cell .inline-row { display: flex; gap: 8px; align-items: center; height: 36px; }
.oe-grid .cell .inline-row input, .oe-grid .cell .inline-row select { height: 36px; }
@media (max-width: 860px) { .oe-grid { grid-template-columns: minmax(110px, 0.34fr) 1fr; } }
.oe-total { margin-top: 14px; font-size: 15px; text-align: right; }
.oe-total b { color: #b45309; font-size: 22px; }
.oe-total .dim { color: var(--dim); font-size: 12px; margin-left: 8px; }
.chk-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.chk-chip input { width: auto !important; height: auto !important; margin: 0 !important; }
/* 加急卡片：与订单类型卡片同尺寸 */
.chk-chip.urgent-card { padding: 6px 13px; border-radius: 9px; border-width: 1.5px; font-size: 12.5px; font-weight: 700; height: 36px; box-sizing: border-box; }
.chk-chip.urgent-card b { font-size: 12.5px; font-weight: 700; }
.chk-chip.urgent-card:hover { transform: translateY(-2px); }
.r3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
/* 设置行式表单：标签左、控件右，逐行水平对齐不交叉 */
.set-row { display: flex; align-items: center; gap: 14px; padding: 7px 0; border-bottom: 1px dashed #eef1f7; }
.set-row:last-child { border-bottom: none; }
.set-row > label { width: 160px; flex-shrink: 0; font-size: 12.5px; color: var(--dim); font-weight: 600; }
.set-row .set-ctrl { flex: 1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.set-row input, .set-row select { height: 36px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); outline: none; box-sizing: border-box; }
.set-row input:focus, .set-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
/* 订单号规则样式选择卡 */
/* AI 助手可拖动浮标 */
.ai-fab { position: fixed; right: 26px; bottom: 30px; width: 54px; height: 54px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; cursor: grab; z-index: 300; box-shadow: 0 10px 28px rgba(6,182,212,.45); animation: aiBreath 2.4s ease-in-out infinite; user-select: none; touch-action: none; }
.ai-fab:active { cursor: grabbing; animation: none; }
@keyframes aiBreath { 0%,100% { box-shadow: 0 10px 28px rgba(6,182,212,.45), 0 0 0 0 rgba(6,182,212,.35); } 50% { box-shadow: 0 10px 28px rgba(6,182,212,.45), 0 0 0 14px rgba(6,182,212,0); } }
.ai-fab-win { position: fixed; right: 26px; bottom: 96px; width: 356px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,.25); z-index: 299; display: flex; flex-direction: column; overflow: hidden; animation: fadeUp .22s ease both; }
.ai-fab-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--grad); color: #fff; font-size: 13.5px; }
.ai-fab-head b { flex: 1; }
.ai-fab-drag { font-size: 11px; opacity: .8; }
.ai-fab-close { background: transparent; color: #fff; padding: 2px; }
.ai-fab-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.ai-fab-msgs { height: 300px; overflow-y: auto; padding: 12px; background: #fbfcfe; }
.ai-fab-msg { margin-bottom: 10px; display: flex; }
.ai-fab-msg.me { justify-content: flex-end; }
.ai-fab-msg .b { max-width: 84%; padding: 8px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; }
.ai-fab-msg.bot .b { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.ai-fab-msg.me .b { background: var(--grad); color: #fff; }
.ai-fab-link { margin: 2px 0 10px 2px; }
.ai-fab-sugg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 2px 10px; }
.ai-fab-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.ai-fab-foot input { flex: 1; height: 36px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; outline: none; background: #fff; color: var(--ink); }
.ai-fab-foot input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
.on-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.on-opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; transition: all .15s; }
.on-opt b { display: block; font-size: 13px; }
.on-opt span { font-size: 11.5px; color: var(--dim); }
.on-opt:hover { transform: translateY(-2px); border-color: rgba(6,182,212,.5); }
.on-opt.on { border-color: var(--accent); background: linear-gradient(135deg, rgba(6,182,212,.10), rgba(99,102,241,.10)); box-shadow: 0 4px 14px rgba(6,182,212,.2); }
.on-opt.on b { color: #0891b2; }
.r3 select { width: 100%; padding: 9px 8px; background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); outline: none; }
.os-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.chart-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.chart-box canvas { width: 100%; display: block; }

/* ===== V2 加工项目绑定三栏 ===== */
.bind3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.bind-col { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.bind-head { background: var(--panel2); padding: 10px 14px; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); }
.bind-body { max-height: 420px; overflow-y: auto; padding: 8px; }
.bind-row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.bind-row:hover { background: var(--panel2); }

@media (max-width: 900px) {
  .sidebar { width: 54px; padding: 10px 4px; }
  .side-grp-head span, .side-grp-head i { display: none; }
  .side-grp-body { display: none !important; }
}

/* ===== V2.1 日期选择（自研日历，浅色弹层）===== */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  color-scheme: light;
  min-height: 38px;
  cursor: pointer;
  position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  display: none;
}
.dp-pop { position: fixed; z-index: 400; width: 288px; background: #fff; border: 1px solid rgba(6,182,212,.4); border-radius: 14px; padding: 12px; box-shadow: 0 18px 50px rgba(15,23,42,.22); }
.dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.dp-title { flex: 1; text-align: center; font-size: 14px; font-weight: 800; color: var(--ink); }
.dp-nav { width: 30px; height: 30px; border-radius: 8px; background: rgba(6,182,212,.10); color: #0891b2; font-size: 14px; cursor: pointer; border: 1px solid rgba(6,182,212,.25); }
.dp-nav:hover { background: rgba(6,182,212,.22); }
.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.dp-week span { text-align: center; font-size: 11px; color: #94a3b8; padding: 4px 0; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day { height: 32px; display: flex; align-items: center; justify-content: center; font-size: 13px; border-radius: 8px; cursor: pointer; color: #475569; }
.dp-day:hover { background: rgba(6,182,212,.14); color: #0e7490; }
.dp-day.off { color: #cbd5e1; }
.dp-day.today { border: 1px solid rgba(245,158,11,.6); color: #b45309; }
.dp-day.sel { background: var(--grad); color: #fff; font-weight: 800; }
.dp-foot { display: flex; gap: 8px; margin-top: 10px; }
.dp-today, .dp-clear { flex: 1; padding: 7px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.dp-today { background: #dbeafe; color: #1d4ed8; border: 1px solid rgba(59,130,246,.35); }
.dp-clear { background: #fee2e2; color: #b91c1c; border: 1px solid rgba(239,68,68,.3); }
/* 紧凑表单行（不换行，标签行内） */
.form-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.fl-item { display: inline-flex; align-items: center; gap: 6px; }
.fl-item b { font-size: 12px; color: var(--dim); font-weight: 600; white-space: nowrap; }
.fl-item input:not([type="checkbox"]), .fl-item select { padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink); outline: none; box-sizing: border-box; height: 36px; transition: border-color .15s, box-shadow .15s; }
.fl-item input:focus, .fl-item select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
.form-line .inline-pair { display: inline-flex; gap: 6px; align-items: center; }
.form-line .inline-pair input, .form-line .inline-pair select { height: 36px; }
.chk-chip input { width: auto !important; height: auto !important; margin: 0 !important; }
.fl-w2 { flex: 2; min-width: 220px; }
.fl-w2 input, .fl-w2 select { flex: 1; }
.fl-grow { flex: 2; min-width: 240px; }
.fl-grow input { flex: 1; }
.fl-item input[type="date"] { min-width: 132px; height: 36px; min-height: 36px; -webkit-appearance: none; appearance: none; }
/* 返回上一步 */
.page-desc { font-size: 12px; color: var(--dim); }
.back-btn { background: rgba(6,182,212,.10); color: #0891b2; border: 1px solid rgba(6,182,212,.28); border-radius: 9px; padding: 6px 13px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.back-btn:hover { background: rgba(6,182,212,.2); transform: translateX(-2px); }
/* 空态 */
select { cursor: pointer; }
/* 订单类型卡片选择（紧凑，可内联到表单行） */
.type-cards { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.type-card { padding: 6px 13px; border-radius: 9px; background: #fff; border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s; user-select: none; display: inline-flex; align-items: center; height: 36px; box-sizing: border-box; }
.type-card:hover { transform: translateY(-2px); }
.type-card.tc-blue.on { border-color: #3b82f6; background: #dbeafe; color: #1d4ed8; box-shadow: 0 4px 12px rgba(59,130,246,.25); }
.type-card.tc-amber.on { border-color: #f59e0b; background: #fef3c7; color: #b45309; box-shadow: 0 4px 12px rgba(245,158,11,.25); }
.type-card.tc-red.on { border-color: #ef4444; background: #fee2e2; color: #b91c1c; box-shadow: 0 4px 12px rgba(239,68,68,.25); }
.type-card.tc-green.on { border-color: #10b981; background: #d1fae5; color: #047857; box-shadow: 0 4px 12px rgba(16,185,129,.25); }
/* 订单录入明细表内小输入框 */
#oeiItems input[list] { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 7px; }
#oeiItems input[list]:focus { border-color: var(--accent); }
.oe-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; align-items: start; }
.oe-step-card { position: relative; }
.oe-step-num { position: absolute; left: 0; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(6,182,212,.4); z-index: 2; }
.oe-step-card .card { margin-left: 42px; }
.oe-step-card.with-num .card { margin-left: 42px; }
.oe-summary { position: sticky; top: 10px; }
.oe-summary .sum-title { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.oe-summary .sum-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed #eef1f7; }
.oe-summary .sum-total { margin-top: 12px; text-align: right; }
.oe-summary .sum-total b { color: #b45309; font-size: 26px; }
@media (max-width: 1080px) { .oe-layout { grid-template-columns: 1fr; } .oe-summary { position: static; } }
/* AI 助手对话 */
.ai-chat { display: flex; flex-direction: column; height: calc(100vh - 240px); min-height: 420px; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 14px; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; }
.ai-msg { max-width: 82%; margin-bottom: 12px; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; }
.ai-msg.user { margin-left: auto; background: linear-gradient(135deg, #e0f7ff, #eef0ff); border: 1px solid rgba(6,182,212,.3); color: #0e7490; }
.ai-msg.bot { background: #fff; border: 1px solid var(--line); }
.ai-msg .ai-link { margin-top: 8px; }
.ai-quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 2px; }
.ai-quick .chk-chip { cursor: pointer; }
.ai-input { display: flex; gap: 8px; padding-top: 10px; }
.ai-input input { flex: 1; padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: 11px; font-size: 13.5px; color: var(--ink); outline: none; }
.ai-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.12); }
/* 权限矩阵 */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel2); }
.perm-g-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.perm-g-body { display: flex; flex-wrap: wrap; gap: 2px; }
/* 打印预览 */
.preview-box { background: #fff; color: #0f172a; border-radius: 12px; padding: 18px; max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); }
.preview-box * { color: #0f172a !important; }
/* 徽章增强 */
.badge { box-shadow: 0 1px 4px rgba(30,41,59,.08); }
/* 统计卡增强 */
.ov-card { transition: transform .15s, box-shadow .15s; }
/* 数据收集卡片 */
.ov-card.dc-card .ov-value { font-size: 24px; }
/* 加工单列表筛选行（页签样式保留给其他组件使用） */
.flow-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.flow-tab { padding: 8px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--dim); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all .15s; }
.flow-tab:hover { border-color: var(--accent); color: var(--ink); }
.flow-tab.on { background: linear-gradient(135deg, rgba(6,182,212,.16), rgba(99,102,241,.16)); border-color: var(--accent); color: #0891b2; font-weight: 700; }
.flow-n { min-width: 20px; height: 20px; border-radius: 10px; background: #e2e8f0; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; color: #475569; }
.flow-tab.on .flow-n { background: var(--grad); color: #fff; font-weight: 800; }
/* 客户表单弹窗：两列紧凑网格（标签右侧对齐，输入框不再通栏超长），分组标题 */
.cl-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; align-items: center; }
.cl-form .cl-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cl-form .cl-cell > label { width: 150px; flex: none; margin: 0; text-align: right; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-form .cl-cell > input, .cl-form .cl-cell > select, .cl-form .cl-cell > textarea { width: auto; flex: 1 1 auto; min-width: 0; max-width: 240px; padding: 8px 10px; }
.cl-form .cl-cell input[type="date"] { max-width: 165px; }
.cl-form .cl-group-head { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cl-form .cl-full { grid-column: 1 / -1; }
@media (max-width: 760px) { .cl-form { grid-template-columns: 1fr; } .cl-form .cl-cell > label { text-align: left; width: 120px; } }
