/* =============================================================
 * 乾道 致新客户运营管理平台（智新 CRM）—— 样式表（浅色主题）
 *
 * 软件名称：乾道 致新客户运营管理平台（简称：智新 CRM）
 * 开发者  ：覃钰恒
 * 版本号  ：zx20260922e      完成日期：2026-09-22
 * 运行环境：浏览器 + 云函数服务端（腾讯云开发 CloudBase）
 * ============================================================= */
/* ===========================================================
 * 乾道 致新客户运营管理平台 —— 样式表（浅色主题）
 * =========================================================== */

:root {
  --primary: #1668dc;
  --primary-dark: #0b4a9e;
  --primary-light: #e8f1fe;
  --primary-soft: #f2f7ff;
  --teal: #0d9c9c;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e3e7ef;
  --border-strong: #cdd5e2;
  --text: #1a2233;
  --text-2: #4b5768;
  --muted: #8a94a6;
  --success: #16a34a;
  --warning: #e08b00;
  --danger: #dc2626;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 30, 54, .05);
  --shadow: 0 4px 16px rgba(16, 30, 54, .07);
  --shadow-lg: 0 18px 48px rgba(16, 30, 54, .16);
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }
a { color: var(--primary); text-decoration: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d1de; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #aeb9ca; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 登录页 ============================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 520px at 8% -10%, #dbe9ff 0%, rgba(219, 233, 255, 0) 62%),
    radial-gradient(900px 480px at 105% 110%, #d8f2f0 0%, rgba(216, 242, 240, 0) 60%),
    #f4f6fa;
}

.login-card {
  width: 1000px;
  max-width: 100%;
  min-height: 590px;
  display: grid;
  grid-template-columns: 400px 1fr;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.login-brand {
  position: relative;
  padding: 42px 38px;
  color: #fff;
  background: linear-gradient(158deg, #0d4b96 0%, #1668dc 52%, #1b8ac9 100%);
  display: flex;
  flex-direction: column;
}
.login-brand::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  pointer-events: none;
}
.login-brand > * { position: relative; z-index: 1; }
.brand-logo {
  display: flex; align-items: center; gap: 11px;
  font-size: 19px; font-weight: 700; letter-spacing: .5px;
}
.brand-logo .mark {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; letter-spacing: 1px; font-weight: 800;
}
.login-brand h1 {
  margin: 40px 0 12px;
  font-size: 26px; line-height: 1.42; font-weight: 700; letter-spacing: .3px;
}
.login-brand .sub { font-size: 13px; line-height: 1.85; color: rgba(255,255,255,.85); margin: 0; }
.brand-features { margin-top: auto; padding-top: 30px; display: flex; flex-direction: column; gap: 13px; }
.brand-features .feat { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: rgba(255,255,255,.92); }
.brand-features .feat i {
  flex: none; width: 19px; height: 19px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-style: normal; margin-top: 1px;
}

.login-form-side { padding: 40px 46px; display: flex; flex-direction: column; }
.login-form-side h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; }
.login-form-side .hint { color: var(--muted); font-size: 13px; margin: 0 0 22px; }

.role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.role-tab {
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 11px 6px 9px;
  text-align: center;
  transition: all .16s;
}
.role-tab .rt-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); display: block; }
.role-tab .rt-sub { font-size: 11px; color: var(--muted); margin-top: 3px; display: block; }
.role-tab:hover { border-color: var(--primary); background: #fff; }
.role-tab.active {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(22, 104, 220, .09);
}
.role-tab.active .rt-label { color: var(--primary-dark); }
.role-tab.active .rt-sub { color: #4c7fc4; }

/* ============================ 表单控件 ============================ */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field > label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:hover, .select:hover, .textarea:hover { border-color: #a9b8cd; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 104, 220, .12);
}
.textarea { resize: vertical; line-height: 1.6; min-height: 54px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238a94a6' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.input:disabled, .select:disabled, .textarea:disabled { background: #f3f5f9; color: var(--text-2); cursor: not-allowed; }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; margin-bottom: 0; }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border-strong);
  background: #fff; color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 8px 15px;
  font-size: 13.5px; font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(22,104,220,.25); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #128a3e; border-color: #128a3e; color: #fff; }
.btn-danger { color: var(--danger); border-color: #f0c2c2; background: #fff; }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); color: var(--danger); }
.btn-block { width: 100%; padding: 11px; font-size: 14.5px; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-link { border: none; background: none; color: var(--primary); padding: 2px 4px; font-size: 13px; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================ 应用外壳 ============================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none;
  background: #0f2544;
  color: #c9d6ea;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .sb-logo {
  padding: 20px 18px 17px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.sidebar .sb-logo .mark {
  min-width: 34px; height: 34px; padding: 0 7px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, #2b7ef0, #14b8b8);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 13px; letter-spacing: 1px;
}
.sidebar .sb-logo .txt { line-height: 1.28; }
.sidebar .sb-logo .txt b { display: block; color: #fff; font-size: 14.5px; letter-spacing: .3px; }
.sidebar .sb-logo .txt span { font-size: 10.5px; color: #7f93b3; letter-spacing: .8px; }

.sb-unit {
  margin: 14px 12px 6px; padding: 10px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
}
.sb-unit .lbl { font-size: 10.5px; color: #7f93b3; letter-spacing: .6px; margin-bottom: 4px; }
.sb-unit .val { font-size: 12.5px; color: #e6eefb; font-weight: 600; line-height: 1.45; word-break: break-all; }

.sb-nav { padding: 10px 12px; overflow-y: auto; flex: 1; }
.sb-group-title { font-size: 10.5px; color: #6d81a0; letter-spacing: 1px; padding: 14px 10px 6px; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 11px; border-radius: 8px;
  font-size: 13.5px; color: #c2d1e6; cursor: pointer;
  transition: all .14s; margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left;
}
.sb-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-item.active { background: linear-gradient(96deg, #1a63c9, #1d7fd4); color: #fff; box-shadow: 0 3px 10px rgba(11,52,110,.4); }
.sb-item .ic { width: 16px; text-align: center; opacity: .9; font-size: 14px; }
.sb-item .cnt {
  margin-left: auto; background: rgba(255,255,255,.16); color: #dfe9f7;
  border-radius: 9px; padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.sb-item.active .cnt { background: rgba(255,255,255,.28); color: #fff; }
.sb-item .cnt.alert { background: #dc2626; color: #fff; }

.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.09); }
.sb-user { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.05); }
.sb-user .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #2b7ef0, #14b8b8);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.sb-user .info { min-width: 0; }
.sb-user .info b { display: block; font-size: 13px; color: #fff; font-weight: 600; }
.sb-user .info span { font-size: 11px; color: #8ea4c4; }

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

.topbar {
  height: 60px; flex: none;
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h2 { margin: 0; font-size: 17px; font-weight: 700; }
.topbar .tb-desc { font-size: 12.5px; color: var(--muted); }
.topbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.save-state {
  font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border);
}
.save-state.saving { color: var(--warning); border-color: #f5dfb3; background: #fffbf0; }
.save-state.saved { color: var(--success); border-color: #c6e9d2; background: #f2fbf5; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* 顶栏 · 云端同步状态徽标 */
.cloud-pill {
  font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 20px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  font-family: inherit; transition: background .15s, border-color .15s;
}
.cloud-pill:hover { background: #eef3fb; }
.cloud-pill .dot { width: 7px; height: 7px; }
.cloud-pill.gray { color: var(--muted); }
.cloud-pill.ok { color: var(--success); border-color: #c6e9d2; background: #f2fbf5; }
.cloud-pill.busy { color: var(--primary); border-color: #c3d9f7; background: #f2f7fe; }
.cloud-pill.busy .dot { animation: cpulse 1s ease-in-out infinite; }
.cloud-pill.warn, .cloud-pill.has-pending { color: #a96a00; border-color: #f0dcae; background: #fffbf0; }
.cloud-pill.err { color: var(--danger); border-color: #f3c9c9; background: #fdf4f4; }
@keyframes cpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (max-width: 860px) { .cloud-pill .lbl { display: none; } }

.content { padding: 22px 24px 60px; flex: 1; }
.content.narrow { max-width: 1240px; }

/* ============================ 卡片 / 面板 ============================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.card-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .ch-desc { font-size: 12.5px; color: var(--muted); }
.card-head .ch-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
.card-head .ch-right .select { flex: 0 0 auto; width: 138px; }
.card-head .ch-right .btn { flex: 0 0 auto; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.stat.s-green::before { background: var(--success); }
.stat.s-blue::before { background: var(--primary); }
.stat.s-orange::before { background: var(--warning); }
.stat.s-red::before { background: var(--danger); }
.stat.s-teal::before { background: var(--teal); }
.stat .k { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.stat .u { font-size: 12px; color: var(--muted); margin-top: 7px; }

/* ============================ 表格 ============================ */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  background: #f7f9fc; color: var(--text-2); font-weight: 600; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
table.tbl tbody tr:hover { background: #f9fbfe; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td.actions { white-space: nowrap; text-align: right; }

/* 可编辑表格 */
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
table.grid th {
  background: #f7f9fc; color: var(--text-2); font-weight: 600;
  padding: 8px 8px; border: 1px solid var(--border); text-align: left; font-size: 12.5px;
}
table.grid td { border: 1px solid var(--border); padding: 0; vertical-align: middle; }
table.grid td.idx-cell { text-align: center; color: var(--muted); font-size: 12.5px; background: #fafbfd; padding: 8px 4px; }
table.grid td.auto-cell { padding: 8px; text-align: center; }
table.grid input, table.grid select {
  width: 100%; border: none; background: transparent; padding: 8px 9px; outline: none; font-size: 13px;
  border-radius: 0;
}
table.grid input:focus, table.grid select:focus { background: #eef5ff; box-shadow: inset 0 0 0 2px rgba(22,104,220,.35); }
table.grid input:disabled, table.grid select:disabled { background: transparent; color: var(--text-2); }
table.grid tr:hover td { background: #fcfdff; }
table.grid td.rowdel { width: 42px; text-align: center; padding: 0; }
table.grid td.rowdel button {
  border: none; background: none; color: var(--muted); font-size: 15px; padding: 4px 8px; border-radius: 5px;
}
table.grid td.rowdel button:hover { color: var(--danger); background: #fef2f2; }

/* ============================ 徽标 ============================ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.gray { background: #f1f3f7; color: #6b7688; border-color: #e3e7ef; }
.badge.blue { background: #eaf2fe; color: #1e63c8; border-color: #cfe0fa; }
.badge.green { background: #ecf9f0; color: #15803d; border-color: #c8ecd5; }
.badge.red { background: #fdeeee; color: #c2272b; border-color: #f6cece; }
.badge.orange { background: #fff7e8; color: #b06a00; border-color: #f8e0b4; }
.badge.plain::before { display: none; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 5px; background: #eef2f8; color: #4b5768; font-size: 11.5px; margin-right: 4px; }

/* 审核「有变更」红色小角标：挂在变更页签右上角 / 变更字段与明细行旁 */
.chg-tag {
  display: inline-block; padding: 0.5px 6px;
  font-size: 11px; line-height: 17px; font-weight: 600;
  color: #c2272b; background: #fdeeee; border: 1px solid #f0b9b9;
  border-radius: 4px; white-space: nowrap; vertical-align: middle;
  margin-left: 4px;
}
.tab .chg-tag { margin-left: 7px; }
.idx-cell .chg-tag { margin-left: 2px; }

/* 进度条 */
.progress { height: 6px; border-radius: 4px; background: #edf0f6; overflow: hidden; min-width: 60px; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2b7ef0, #14b8b8); transition: width .3s; }
.progress.p-ok i { background: linear-gradient(90deg, #16a34a, #4ade80); }
.progress.p-warn i { background: linear-gradient(90deg, #e08b00, #fbbf24); }

/* ============================ 页签 / 分段 ============================ */
.tabs {
  display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border);
  padding: 0 18px; background: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.tab {
  border: none; background: none; padding: 12px 14px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; transition: all .15s;
  display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .tab-dot { width: 6px; height: 6px; border-radius: 50%; background: #d3dae5; }
.tab.has-data .tab-dot { background: var(--success); }
.tab-meta { font-size: 11px; color: var(--muted); font-weight: 500; }

.seg { display: inline-flex; background: #eef1f6; border-radius: 8px; padding: 3px; gap: 2px; }
.seg button {
  border: none; background: none; padding: 6px 14px; border-radius: 6px; font-size: 13px;
  color: var(--text-2); font-weight: 500; transition: all .15s;
}
.seg button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ============================ 表单区 ============================ */
.form-block { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; background: #fff; overflow: hidden; }
.form-block-head {
  padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.form-block-head h4 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--text); }
.form-block-head .fb-desc { font-size: 12px; color: var(--muted); }
.form-block-head .fb-right { margin-left: auto; }
.form-block-body { padding: 16px; }

.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.fgrid .fitem.span2 { grid-column: 1 / -1; }
.fgrid .fitem > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.fgrid .fitem .ro-val {
  min-height: 36px; padding: 8px 0; font-size: 13.5px; color: var(--text);
  border-bottom: 1px dashed #e7ebf2; word-break: break-word; white-space: pre-wrap;
}
.fgrid .fitem .ro-val.empty { color: #b3bccb; }

/* ============================ 弹窗 ============================ */
.mask {
  position: fixed; inset: 0; background: rgba(15, 30, 55, .48);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px;
  backdrop-filter: blur(2px);
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column;
  animation: pop .2s ease;
}
.modal.wide { width: 780px; }
.modal-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-head .mh-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-head .close { margin-left: auto; border: none; background: none; font-size: 20px; color: var(--muted); line-height: 1; padding: 2px 6px; border-radius: 6px; }
.modal-head .close:hover { background: #f2f4f8; color: var(--text); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); border-radius: 0 0 14px 14px; }

/* ============================ 提示条 ============================ */
.alert {
  display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.65; margin-bottom: 16px; border: 1px solid;
}
.alert .ai { flex: none; font-size: 14px; }
.alert.info { background: #f1f7ff; border-color: #d3e3fa; color: #21528f; }
.alert.warn { background: #fffbf0; border-color: #f6e3bd; color: #8a5b00; }
.alert.ok { background: #f2fbf5; border-color: #c9ecd6; color: #12683a; }
.alert.err { background: #fef4f4; border-color: #f6d5d5; color: #a91f22; }

.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast {
  background: #16283f; color: #fff; padding: 10px 20px; border-radius: 9px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: pop .2s ease;
  display: flex; align-items: center; gap: 8px; max-width: 520px;
}
.toast.ok { background: #10813c; }
.toast.err { background: #bb2024; }
.toast.warn { background: #9c6200; }

/* ============================ 空状态 ============================ */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty .eic { font-size: 36px; opacity: .35; margin-bottom: 12px; }
.empty h4 { margin: 0 0 6px; font-size: 15px; color: var(--text-2); font-weight: 600; }
.empty p { margin: 0 0 16px; font-size: 13px; }

/* ============================ 杂项 ============================ */
.muted { color: var(--muted); }
.mono { font-family: "SF Mono", Consolas, "Courier New", monospace; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.mt10 { margin-top: 10px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0 !important; }
.fs12 { font-size: 12px; } .fs13 { font-size: 13px; }
.tr { text-align: right; } .tc { text-align: center; }
.nowrap { white-space: nowrap; }
.search-input { width: 240px; max-width: 260px; flex: 0 1 240px; min-width: 150px; }
.kv { display: flex; gap: 8px; font-size: 13px; margin-bottom: 7px; }
.kv .k { color: var(--muted); min-width: 92px; flex: none; }
.kv .v { color: var(--text); word-break: break-word; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.pwd-cell { display: flex; align-items: center; gap: 8px; }
/* 表格里的医院名称可点击进详情 */
.link-name {
  border: none; background: none; padding: 0; cursor: pointer; text-align: left;
  font: inherit; font-weight: 600; color: var(--primary);
}
.link-name:hover { text-decoration: underline; }
.pwd-cell .pw { font-family: "SF Mono", Consolas, monospace; font-size: 13px; letter-spacing: .5px; }
.eye { border: none; background: none; color: var(--muted); padding: 2px 5px; border-radius: 5px; font-size: 13px; }
.eye:hover { background: #f1f4f9; color: var(--text); }

/* 跨窗口数据同步提示条 */
.sync-bar {
  position: fixed; right: 20px; bottom: 20px; z-index: 180;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #f0d9a8; border-left: 3px solid var(--warning);
  border-radius: 10px; padding: 11px 14px; font-size: 13px; color: #8a5b00;
  box-shadow: var(--shadow-lg);
  animation: pop .2s ease;
}

/* 登录页 · 医院可搜索选择器 */
.hs-search { position: relative; }
.hs-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 264px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
  z-index: 40; animation: pop .14s ease;
}
.hs-item {
  padding: 8px 12px; font-size: 13.5px; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.hs-item + .hs-item { border-top: 1px solid #f1f5f9; }
.hs-item:hover, .hs-item.active { background: #eef4ff; }
.hs-item:hover .hs-name, .hs-item.active .hs-name { color: var(--primary); font-weight: 600; }
.hs-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-hit { color: var(--primary); font-weight: 700; }
.hs-meta { font-size: 12px; color: #94a3b8; white-space: nowrap; flex: none; }
.hs-note { padding: 10px 12px; font-size: 12.5px; color: #94a3b8; }

@media (max-width: 1080px) {
  .login-card { grid-template-columns: 1fr; min-height: auto; }
  .login-brand { padding: 30px 28px; }
  .login-brand h1 { margin: 22px 0 10px; font-size: 21px; }
  .brand-features { display: none; }
  .login-form-side { padding: 28px; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: none; }
  .fgrid { grid-template-columns: 1fr; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; }
}

/* 表格单元格：自适应多行输入（文字多自动加高） */
.cellta {
  width: 100%; min-height: 30px; border: none; background: transparent; resize: none;
  font: inherit; color: inherit; padding: 4px 2px; line-height: 1.5; overflow: hidden;
  box-sizing: border-box; outline: none;
}
.cellta:focus { background: #f4f8ff; border-radius: 4px; }
td .cellta { display: block; }

/* 表头列宽拖动手柄 */
th { position: relative; }
th .col-resize {
  position: absolute; right: 0; top: 0; bottom: 0; width: 7px;
  cursor: col-resize; z-index: 2;
}
th .col-resize:hover { background: rgba(22, 104, 220, 0.25); }

/* ============ 网站备案信息条（2026-09-22 加，配合 ICP 备案上线） ============ */
.site-foot {
  flex: none; padding: 10px 24px; border-top: 1px solid var(--border);
  background: #f7f9fc; color: #8b95a8; font-size: 12px; line-height: 1.8;
  text-align: center; user-select: none;
}
.site-foot .ft-item { margin: 0 2px; }
.site-foot .ft-dot { margin: 0 6px; color: #c3cad8; }
@media (max-width: 820px) { .site-foot { padding: 8px 12px; font-size: 11px; } }
