:root {
    --bg: #f5f7fa;
    --panel: #ffffff;
    --border: #e3e8ef;
    --text: #24344a;
    --muted: #7b8ba1;
    --primary: #3268c8;
    --primary-weak: #edf3fc;
    --sidebar: #14253d;
    --sidebar-text: #cfdaea;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.7 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

a { color: var(--primary); text-decoration: none; }
code { font-family: Consolas, Monaco, monospace; font-size: 12px; color: #4a5b72; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 216px;
    flex: 0 0 216px;
    background: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 18px; }
.brand-mark {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.brand-name { font-size: 15px; font-weight: 600; color: #fff; letter-spacing: .5px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    padding: 9px 12px; border-radius: 6px;
    color: var(--sidebar-text); font-size: 13px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.nav-item:hover { background: #1d3552; color: #fff; }
.nav-item.is-active { background: var(--primary); color: #fff; }

.nav-badge {
    min-width: 18px; height: 18px; padding: 0 6px;
    border-radius: 9px; background: #e5484d; color: #fff;
    font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
    flex: none;
}

.sidebar-foot { margin-top: auto; font-size: 11px; color: #6b7f9b; padding: 16px 6px 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 56px; background: var(--panel);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
}
.crumb { font-weight: 600; }
.user { color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #c6d0de; margin-left: 6px; }

.content { padding: 24px 28px 48px; max-width: 1180px; }
.content-wide { max-width: 1600px; }

/* 通讯录：列多时横向滚动，避免挤压 */
.table-wrap { overflow-x: auto; }
.table-directory { min-width: 1120px; }
.table-directory th, .table-directory td { white-space: nowrap; }

/* 工作小结：窄列不换行，整表横向滚动，避免姓名/部门/时间被挤扁 */
.table-report { min-width: 1360px; }
.table-report th:nth-child(-n+5),
.table-report th:nth-child(8),
.table-report th:nth-child(9),
.table-report th:nth-child(10),
.table-report th:nth-child(11),
.table-report td:nth-child(-n+5),
.table-report td:nth-child(8),
.table-report td:nth-child(9),
.table-report td:nth-child(10),
.table-report td:nth-child(11) { white-space: nowrap; }

/* 工作小结·全公司台账：同上，窄列固定宽度 */
.table-ledger { min-width: 1320px; }
.table-ledger th:nth-child(-n+6),
.table-ledger th:nth-child(10),
.table-ledger td:nth-child(-n+6),
.table-ledger td:nth-child(10) { white-space: nowrap; }

/* 任务列表：列多，整表横向滚动；窄列不换行，标题与最后跟进占剩余宽度 */
.table-task { min-width: 1480px; }
.table-task th:nth-child(1),
.table-task th:nth-child(3),
.table-task th:nth-child(4),
.table-task th:nth-child(5),
.table-task th:nth-child(6),
.table-task th:nth-child(7),
.table-task th:nth-child(8),
.table-task th:nth-child(9),
.table-task th:nth-child(11),
.table-task th:nth-child(12),
.table-task td:nth-child(1),
.table-task td:nth-child(3),
.table-task td:nth-child(4),
.table-task td:nth-child(5),
.table-task td:nth-child(6),
.table-task td:nth-child(7),
.table-task td:nth-child(8),
.table-task td:nth-child(9),
.table-task td:nth-child(11),
.table-task td:nth-child(12) { white-space: nowrap; }
.table-task .col-follow { min-width: 240px; max-width: 340px; }
.table-task th:nth-child(2) { min-width: 240px; }

.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; }
.task-notice { margin: 0 0 14px; color: #d4380d; font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; margin: 0; }

.grid { display: grid; gap: 14px; margin-bottom: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.card-head h2 { font-size: 15px; margin: 0; }

.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.4; }
.stat-value-sm { font-size: 18px; padding-top: 6px; }
.stat-foot { color: var(--muted); font-size: 12px; }

.quote-card { border-left: 4px solid var(--primary); }
.quote-text {
    margin: 6px 0 4px; font-size: 20px; line-height: 1.8;
    letter-spacing: .5px; color: #1f2d3d;
}

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 500; background: #fafbfd; }
.table tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: 12px; background: #eef1f5; color: #6b7a8f;
}
.badge-on { background: #e8f5ec; color: #2b8a4b; }
.badge-warn { background: #fff4e5; color: #b26a00; }
.badge-info { background: #e8f0fe; color: #1a56c4; }
.badge-doing { background: #0d9488; color: #fff; font-weight: 600; }

.follow-item { padding: 10px 0; border-bottom: 1px solid #eef1f5; }
.follow-item:last-child { border-bottom: none; }
.follow-item p { margin: 4px 0; }

.steps { margin: 0; padding-left: 18px; color: #3c4d64; }
.steps li { margin: 6px 0; }
.link { font-size: 13px; }

@media (max-width: 860px) {
    .layout { flex-direction: column; }
    .sidebar { width: auto; flex: none; }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .content { padding: 18px; }
}

/* ---------- 阶段 2：登录、表单、管理页 ---------- */

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 860px) {
    .grid-2 { grid-template-columns: 1fr; }
}

.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; margin: 0 0 4px; }
.page-actions { display: flex; gap: 8px; }

.user { display: flex; align-items: center; gap: 12px; }
.user-name { color: var(--text); font-weight: 600; }
.topbar-link { font-size: 13px; }

.inline-form { display: inline; margin: 0; padding: 0; }
.link-btn {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--primary); font: inherit; font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }
.ops { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; padding: 0 16px; border-radius: 6px; cursor: pointer;
    border: 1px solid transparent; font-size: 13px; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #2b58ab; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: #c3cfe0; }
.btn-block { width: 100%; }
.btn-sm { height: 44px; padding: 0 22px; font-size: 15px; border-radius: 22px; }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-act-main { background: var(--primary); color: #fff; }
.btn-act-main:hover { background: #2b58ab; }
.btn-act-ok { background: #e8f7ee; color: #1a7f45; border-color: #b7e3c8; }
.btn-act-ok:hover { background: #d8f0e2; }
.btn-act-warn { background: #fff6e8; color: #b06a00; border-color: #f5d9ad; }
.btn-act-warn:hover { background: #fcedd8; }
.btn-act-danger { background: #fdeeee; color: #c0392b; border-color: #f3c3bf; }
.btn-act-danger:hover { background: #fbe0de; }
.btn-act-ghost { background: #fff; color: #45566e; border-color: var(--border); }
.btn-act-ghost:hover { border-color: #c3cfe0; }

.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 13px; color: #45566e; }
.field > span em { color: #d4380d; font-style: normal; }
.field input, .field select, .filter-bar input, .filter-bar select {
    height: 34px; padding: 0 10px; border: 1px solid var(--border);
    border-radius: 6px; font: inherit; font-size: 13px; background: #fff; color: var(--text);
}
.field input:focus, .field select:focus, .filter-bar input:focus, .filter-bar select:focus {
    outline: none; border-color: var(--primary);
}
.field textarea {
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
    font: inherit; font-size: 13px; background: #fff; color: var(--text); resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--primary); }
.field-sm { max-width: 110px; }
.field-full { grid-column: 1 / -1; }
/* hidden 属性优先：.field 自带 display:flex，会盖掉浏览器默认的 [hidden] */
.field[hidden] { display: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }

.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

/* 模板使用人 / 绑定店铺：可搜索的多选 */
#user-filter, #shop-filter { max-width: 280px; margin-bottom: 8px; }
.user-checks, .shop-checks {
    display: flex; flex-wrap: wrap; gap: 8px;
    max-height: 240px; overflow-y: auto;
    padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfd;
}
.user-checks .check, .shop-checks .check {
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; cursor: pointer;
}
.user-checks .check:has(input:checked),
.shop-checks .check:has(input:checked) { border-color: var(--primary); background: var(--primary-weak); }

/* 负责人选择：部门 → 岗位 → 人员 */
.owner-picker { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fafbfd; }
.owner-picker-filter { display: flex; gap: 12px; flex-wrap: wrap; }
.owner-picker-filter .field { min-width: 160px; }
.owner-picker-all {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; font-size: 13px; color: #45566e; cursor: pointer;
}
.owner-picker-all input { margin: 0; }
.owner-picker-list {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
    max-height: 210px; overflow-y: auto;
}
.owner-pill {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; font-size: 13px;
}
.owner-pill input { margin: 0; }
.owner-pill.is-hide { display: none; }
.owner-pill i { margin-left: 4px; color: var(--muted); font-style: normal; font-size: 12px; }
.owner-pill:has(input:checked) { border-color: var(--primary); background: var(--primary-weak); }
.owner-selected { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* 邀请参与人：多部门、多人勾选 */
.invite-picker {
    display: flex; flex-wrap: wrap; gap: 8px;
    max-height: 180px; overflow-y: auto;
    padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfd;
}
.invite-picker .check {
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; cursor: pointer;
}
.invite-picker .check:has(input:checked) { border-color: var(--primary); background: var(--primary-weak); }
.owner-chip {
    display: inline-flex; align-items: center; gap: 4px; margin: 0 6px 6px 0;
    padding: 3px 8px; border-radius: 999px;
    background: var(--primary-weak); border: 1px solid #d8e4f7; color: var(--primary);
}
.owner-chip button {
    border: 0; background: none; color: var(--primary); cursor: pointer;
    font-size: 14px; line-height: 1; padding: 0;
}

.filter-bar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
}
.filter-bar input[type="text"] { width: 180px; }
.filter-bar input[type="date"] { width: 140px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
    padding: 7px 14px; border-radius: 8px; font-size: 13px;
    background: var(--panel); border: 1px solid var(--border); color: #45566e;
}
.tab:hover { border-color: #c3cfe0; }
.tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab-badge {
    display: inline-block; min-width: 18px; margin-left: 5px; padding: 0 5px;
    border-radius: 9px; background: #e5484d; color: #fff;
    font-size: 11px; line-height: 18px; text-align: center; vertical-align: 1px;
}

.due-overdue { color: #b3261e; font-weight: 600; }

.alert { padding: 9px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.alert-ok { background: #e8f5ec; color: #2b8a4b; border: 1px solid #cce8d6; }
.alert-err { background: #fdecea; color: #b3261e; border: 1px solid #f7cfcb; }

.badge-off { background: #f2f3f5; color: #8a94a6; }
.empty { text-align: center; color: var(--muted); padding: 26px 0; }

.pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding-top: 14px; flex-wrap: wrap;
}
.pager-links { display: flex; gap: 8px; }

.card-narrow { max-width: 420px; }
.card-narrow-lg { max-width: 760px; }

.perm-group { border-top: 1px solid var(--border); padding-top: 12px; }
.perm-group:first-of-type { border-top: 0; padding-top: 0; }
.perm-group h3 { font-size: 14px; margin: 0 0 4px; }

.notice {
    background: var(--primary-weak); border: 1px solid #d8e4f7;
    border-radius: 8px; padding: 12px 14px; margin-bottom: 14px;
    font-size: 13px; color: #33507a; line-height: 1.9;
}

/* ---------- 任务模板：环节编辑 ---------- */
.step-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.step-item {
    border: 1px solid var(--border); border-radius: 8px;
    background: #fbfcfe; overflow: hidden;
}
.step-item.is-editing { border-color: var(--primary); background: #fff; }
.step-item-main { display: flex; align-items: center; gap: 10px; padding: 9px 12px; flex-wrap: wrap; }
.step-item-info { flex: 1; min-width: 180px; }
.step-item-title { font-weight: 600; font-size: 14px; }
.step-item-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.step-item-ops { display: flex; gap: 6px; }
.step-item-ops .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.step-item-edit {
    display: flex; flex-direction: column; gap: 10px;
    padding: 12px 14px; border-top: 1px dashed var(--border); background: #fff;
}
.step-item-edit[hidden] { display: none; }
.step-no { font-size: 12px; color: var(--muted); white-space: nowrap; }
.field select[multiple] { height: auto; min-height: 104px; padding: 6px; }

/* 任务环节时间线 */
.step-line { display: flex; flex-direction: column; gap: 0; }
.step-line-item {
    display: flex; gap: 12px; padding: 10px 0;
    border-left: 3px solid var(--border); padding-left: 14px; margin-left: 6px;
}
.step-line-item.is-running { border-left-color: var(--primary); background: var(--primary-weak); }
.step-line-item.is-done { border-left-color: #2b8a4b; }
.step-line-main { flex: 1; min-width: 0; }
.step-line-title { font-weight: 600; }
.step-line-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 登录页 */
.auth-body {
    background: linear-gradient(160deg, #14253d 0%, #1d3552 55%, #3268c8 100%);
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-box {
    width: 100%; max-width: 360px; background: #fff; border-radius: 12px;
    padding: 30px 28px 22px; box-shadow: 0 18px 40px rgba(9, 22, 40, .28);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .brand-name { color: var(--text); font-size: 16px; }
.auth-title { font-size: 20px; margin: 0 0 4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.auth-foot { text-align: center; color: #a7b2c2; font-size: 12px; margin: 18px 0 0; }
.auth-hint { color: var(--muted); font-size: 12px; text-align: center; margin: 14px 0 0; }

.hidden { display: none !important; }

/* 弹窗 */
.modal-mask {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(15, 23, 42, .45);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.modal-mask[hidden] { display: none !important; }
.modal {
    width: 420px; max-width: calc(100vw - 32px);
    background: #fff; border-radius: 10px;
    padding: 20px 22px; box-shadow: 0 18px 44px rgba(9, 22, 40, .28);
}
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal .form { gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.qr-wrap { text-align: center; margin: 6px 0 4px; }
.qr-imgbox {
    width: 216px; height: 216px; margin: 0 auto 10px; display: flex;
    align-items: center; justify-content: center; border: 1px solid var(--border);
    border-radius: 10px; background: #fff;
}
.qr-imgbox img { display: block; }
.qr-tip { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.qr-wrap .form { text-align: left; margin-top: 6px; }

@media (max-width: 860px) {
    .grid-3 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .field-sm { max-width: none; }
}

/* ---------- AI 助手 ---------- */
.ai-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

/* 页面占满浏览器可视高度：内容区上下内边距 24 + 48，顶栏 56 */
.ai-page {
    display: flex; flex-direction: column;
    height: calc(100vh - 128px); min-height: 520px;
}
.ai-page .card {
    flex: 1; min-height: 0; margin-bottom: 0;
    display: flex; flex-direction: column;
}

.ai-chat {
    min-height: 280px; max-height: 480px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px; padding: 4px 2px;
}
.ai-page .ai-chat { flex: 1; min-height: 0; max-height: none; }
.ai-msg {
    max-width: 82%; padding: 10px 12px; border-radius: 10px;
    font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-word;
}
.ai-msg-user { align-self: flex-end; background: var(--primary); color: #fff; }
.ai-msg-bot { align-self: flex-start; background: #f4f6fa; border: 1px solid var(--border); }
.ai-msg-err { background: #fdecea; border-color: #f7cfcb; color: #b3261e; }
.ai-msg-pending { color: var(--muted); }
.ai-msg-time {
    align-self: center; font-size: 12px; color: var(--muted); margin: 2px 0 -2px;
}
.ai-history { min-width: 220px; max-width: 320px; }
.ai-chat-hint { margin: -2px 0 10px; font-size: 12px; color: var(--muted); }

.ai-sources { display: block; font-size: 12px; color: var(--muted); }
.ai-sources a { margin-right: 12px; }

.ai-chat-input { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; }
.ai-chat-input textarea {
    flex: 1; min-height: 46px; padding: 8px 10px; border: 1px solid var(--border);
    border-radius: 8px; font: inherit; font-size: 13px; resize: vertical; background: #fff; color: var(--text);
}
.ai-chat-input textarea:focus { outline: none; border-color: var(--primary); }

@media (max-width: 860px) {
    /* 窄屏侧栏改为上下排列，固定视口高度不再适用 */
    .ai-page { height: auto; min-height: 0; }
    .ai-page .ai-chat { flex: none; height: 60vh; min-height: 280px; }
}

/* ---------- 数据报表 ---------- */
.table-data { min-width: 1100px; }
.table-data th, .table-data td { white-space: nowrap; }
.table-data tfoot .total-row td {
    background: #f5f7fb; font-weight: 600;
    border-top: 2px solid var(--border); border-bottom: 0;
}
.table-templates { min-width: 980px; }

.form-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 4px 0 8px;
}

/* 模板字段卡片：每个字段一张卡片，常用项直接填，高级项折叠 */
.field-cards { display: grid; gap: 12px; }
.field-card {
    border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 14px; background: #fcfdff;
}
.field-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
}
.field-card-title { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-card-grid {
    display: grid; grid-template-columns: 1.6fr 130px 110px 90px; gap: 10px 14px;
}
.field-card-grid-adv {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 10px;
}
.field-card .check { padding-top: 30px; }
.field-more { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.field-more summary {
    cursor: pointer; font-size: 12px; color: var(--muted);
    user-select: none;
}
.field-more summary:hover { color: var(--primary); }
.cell-center { display: flex; align-items: center; justify-content: center; }

/* 数据报表填写表格：行=店铺，列=字段，单元格即输入，自动保存 */
.sheet-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.sheet-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.sheet-table th,
.sheet-table td { border: 1px solid var(--border); padding: 0; vertical-align: middle; }
.sheet-table thead th {
    background: #f5f7fb; padding: 8px 10px;
    font-size: 12px; font-weight: 600; color: #45566e;
    text-align: left; white-space: nowrap;
}
.sheet-table .sheet-corner { min-width: 130px; }
.sheet-label em { color: var(--danger, #c0392b); font-style: normal; margin-left: 2px; }
.sheet-unit { color: var(--muted); font-weight: 400; }
.sheet-table .sheet-rowhead {
    background: #fafbfd; padding: 8px 10px;
    min-width: 130px; max-width: 180px;
    font-size: 13px; font-weight: 500; text-align: left;
    white-space: nowrap;
}
.sheet-input {
    display: block; width: 100%; min-width: 110px;
    border: 0; padding: 9px 10px;
    font: inherit; font-size: 13px;
    background: transparent; color: var(--text);
    outline: none;
}
.sheet-input:focus { background: #eef5ff; box-shadow: inset 0 0 0 2px var(--primary); }
.sheet-table tbody tr:hover td { background: #fbfcfe; }
.sheet-table select.sheet-input { cursor: pointer; }
.cell-status { margin-top: 3px; min-height: 14px; font-size: 11px; font-weight: 400; color: var(--muted); }
.cell-status.is-saving { color: #b26a00; }
.cell-status.is-ok { color: #0d9488; }
.cell-status.is-err { color: #c0392b; }

@media (max-width: 900px) {
    .field-card-grid, .field-card-grid-adv { grid-template-columns: 1fr 1fr; }
}

