/* ============ 酒店内部信息查询平台 ============ */
:root {
  --navy: #14263c;
  --navy-2: #1b3450;
  --navy-3: #24456a;
  --gold: #b98a2f;
  --gold-light: #d4a94e;
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #22303f;
  --muted: #7a8794;
  --line: #e6eaf0;
  --danger: #c0392b;
  --ok: #1d8a4e;
  --warn: #c2671c;
  --info: #2f5fd0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20,38,60,.08), 0 4px 16px rgba(20,38,60,.06);
  --sidebar-w: 224px;
  --topbar-h: 58px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; }

/* ---------- 布局（软件化应用壳） ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #cfd9e6;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-size: 15.5px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.brand-sub { font-size: 10.5px; color: #8fa2b8; letter-spacing: 1.5px; }

.nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10.5px 14px; border-radius: 8px;
  color: #b9c6d6; font-size: 14px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--gold); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(185,138,47,.35); }
.sidebar-foot { padding: 14px 18px; font-size: 11px; color: #6d8299; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-mask { display: none; }

/* ---------- 页面横幅（深蓝→青绿渐变 hero） ---------- */
.hero { position: relative; overflow: hidden; border-radius: 16px; padding: 26px 28px; margin-bottom: 18px;
  background: linear-gradient(120deg, #123b66 0%, #1d6a9c 55%, #2f8f7f 100%); color: #fff;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; box-shadow: 0 8px 24px rgba(20,50,90,.18); }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-icon { font-size: 38px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.hero h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.hero p { margin: 0; font-size: 13.5px; opacity: .92; line-height: 1.6; max-width: 760px; }
.hero .hero-count { margin-left: auto; text-align: right; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 8px 16px; }
.hero .hero-count b { display: block; font-size: 22px; line-height: 1.1; }
.hero .hero-count span { font-size: 12px; opacity: .9; }
@media (max-width: 720px) { .hero { padding: 20px 18px; } .hero .hero-count { margin-left: 0; } }

/* ---------- 提示条 ---------- */
.kb-tip {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f3f8fc; border: 1px solid #d7e6f5; border-left: 4px solid #1d6a9c;
  border-radius: 10px; padding: 11px 14px; margin-bottom: 14px;
  color: #33506e; font-size: 13px; line-height: 1.7;
}
.kb-tip::before { content: '💡'; flex-shrink: 0; font-size: 15px; line-height: 1.5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.page-title { font-size: 17px; font-weight: 700; white-space: nowrap; }
.hamburger {
  display: none; width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  cursor: pointer; align-items: center; justify-content: center; color: var(--navy-2);
}
.hamburger svg { width: 20px; height: 20px; }

/* ---------- 全局搜索 ---------- */
.global-search {
  position: relative; flex: 1; max-width: 460px; margin: 0 auto;
  display: flex; align-items: center;
}
.global-search > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.global-search input {
  width: 100%; padding: 8px 14px 8px 36px;
  border: 1px solid var(--line); border-radius: 20px;
  font-size: 13.5px; font-family: inherit; outline: none; background: #f5f7fa;
  color: var(--text); transition: all .15s;
}
.global-search input:focus { background: #fff; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,138,47,.15); }
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 44px rgba(14,26,41,.18); overflow: hidden; z-index: 60;
  max-height: 480px; overflow-y: auto;
}
.sd-group { padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.sd-group:last-child { border-bottom: none; }
.sd-label { font-size: 12px; color: var(--muted); padding: 0 14px 6px; font-weight: 600; letter-spacing: .5px; }
.sd-item { display: block; padding: 8px 14px; color: var(--text); transition: background .1s; }
.sd-item:hover { background: #f5f7fa; }
.sd-item-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sd-item-snip { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
.sd-all { display: block; text-align: center; padding: 10px; font-size: 13px; color: var(--info); border-top: 1px solid #f0f2f6; }
.sd-all:hover { background: #f5f7fa; }

.userbox { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-name { font-weight: 600; text-align: right; }
.user-role { font-size: 12px; color: var(--muted); }

.content { padding: 22px 24px 44px; max-width: 1200px; width: 100%; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn-primary { background: var(--navy-2); color: #fff; }
.btn-primary:hover { background: var(--navy-3); }
.btn-accent { background: var(--gold); color: #fff; }
.btn-accent:hover { background: var(--gold-light); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger { background: #fbe9e7; color: var(--danger); border-color: #f2c4c0; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; margin-bottom: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--text); outline: none;
  transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,138,47,.15); }
.select { cursor: pointer; }
textarea.input { resize: vertical; min-height: 60px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-left .input { width: auto; min-width: 180px; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card-head { margin-bottom: 14px; }
.card-head h3 { font-size: 15px; color: var(--navy); }

/* ---------- 工作台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; text-align: center; border-top: 3px solid var(--navy-2); }
.stat-card .stat-num { font-size: 30px; font-weight: 800; color: var(--navy-2); }
.stat-card .stat-num.warn { color: var(--warn); }
.stat-card .stat-label { margin-top: 6px; color: var(--muted); font-size: 13px; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.quick-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  transition: all .15s; color: var(--text);
}
.quick-card:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(20,38,60,.1); transform: translateY(-2px); }
.quick-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.quick-name { font-weight: 700; font-size: 15px; }
.quick-desc { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.tips { display: flex; flex-direction: column; gap: 8px; color: var(--muted); line-height: 1.7; }

/* ---------- 列表 ---------- */
.meeting-item, .complaint-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 6px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background .12s;
}
.meeting-item:hover, .complaint-item:hover { background: #fafbfd; }
.mi-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mi-meta { color: var(--muted); font-size: 12.5px; margin: 5px 0; }
.mi-summary { color: #55636f; font-size: 13px; }
.mi-arrow { color: #c4ccd6; font-size: 22px; flex-shrink: 0; }
.mi-main { min-width: 0; }

.sop-item { padding: 15px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.sop-item:hover { background: #fafbfd; }
.sop-code { font-size: 12px; color: var(--gold); font-weight: 600; letter-spacing: .5px; }
.sop-title { font-weight: 600; font-size: 15px; margin: 4px 0; }
.sop-meta { color: var(--muted); font-size: 12.5px; }

.ci-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ci-no { font-weight: 700; color: var(--navy-2); font-size: 13px; }
.ci-time { color: var(--muted); font-size: 12px; }
.ci-content { margin: 7px 0 5px; color: #22303f; }
.ci-meta { color: var(--muted); font-size: 12.5px; }
.ci-main { min-width: 0; flex: 1; }

.attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.attr-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: all .15s; background: #fff; }
.attr-card:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(20,38,60,.1); transform: translateY(-2px); }
.attr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.attr-name { font-weight: 700; font-size: 15px; }
.attr-meta { color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.attr-intro { color: #55636f; font-size: 13px; line-height: 1.6; min-height: 42px; }
.attr-foot { margin-top: 10px; color: var(--gold); font-weight: 600; font-size: 13px; }

/* ---------- 运营工具（应用式卡片） ---------- */
.tools-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tools-head h2 { font-size: 18px; color: var(--navy); letter-spacing: .3px; }
.tools-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tool-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 16px 2px 4px; scrollbar-width: none; }
.tool-tabs::-webkit-scrollbar { display: none; }
.tool-tab {
  flex-shrink: 0; padding: 7px 18px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; color: #55636f; font-size: 13.5px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.tool-tab:hover { border-color: var(--gold); color: var(--gold); }
.tool-tab.active { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(20,38,60,.22); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 18px; }

/* 分类配色 */
.tool-card[data-cat="前台运营"] { --tc: #b98a2f; --tcbg: #f8f1e1; }
.tool-card[data-cat="餐饮运营"] { --tc: #c2671c; --tcbg: #fdf0e1; }
.tool-card[data-cat="客房运营"] { --tc: #2f5fd0; --tcbg: #e8effd; }
.tool-card[data-cat="会议宴会"] { --tc: #7c4d9e; --tcbg: #f1e9f7; }
.tool-card[data-cat="市场运营"] { --tc: #1d8a4e; --tcbg: #e5f6ec; }
.tool-card[data-cat="其他"] { --tc: #5b6b7c; --tcbg: #eef1f6; }

.tool-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 18px 20px; text-decoration: none; color: var(--text);
  position: relative; overflow: hidden; transition: all .2s;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--tc, var(--gold)); opacity: .9;
}
.tool-card:hover {
  transform: translateY(-4px); box-shadow: 0 14px 32px rgba(20,38,60,.14);
  border-color: var(--tc, var(--gold));
}
.tool-icon {
  width: 72px; height: 72px; border-radius: 20px; font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tcbg, #eef1f6);
  border: 1px solid color-mix(in srgb, var(--tc, var(--gold)) 22%, transparent);
  margin-bottom: 14px;
}
.tool-name { font-size: 15.5px; font-weight: 700; color: var(--navy); }
.tool-cat {
  margin-top: 6px; font-size: 12px; font-weight: 500;
  color: var(--tc, var(--gold)); background: var(--tcbg, #eef1f6);
  padding: 2px 10px; border-radius: 20px; line-height: 1.7;
}
.tool-desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
  margin: 10px 0 16px; min-height: 40px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-open {
  margin-top: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: #fff; letter-spacing: .3px;
  background: linear-gradient(135deg, var(--tc, var(--gold)), color-mix(in srgb, var(--tc, var(--gold)) 72%, #1f1f1f));
  padding: 8px 18px; border-radius: 20px; box-shadow: 0 6px 14px color-mix(in srgb, var(--tc, var(--gold)) 30%, transparent);
  transition: all .15s;
}
.tool-card:hover .tool-open { box-shadow: 0 8px 18px color-mix(in srgb, var(--tc, var(--gold)) 40%, transparent); transform: translateY(-1px); }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-sec { background: #eef1f6; color: #5b6b7c; }
.tag-ok { background: #e5f6ec; color: var(--ok); }
.tag-warn { background: #fdf0e1; color: var(--warn); }
.tag-info { background: #e8effd; color: var(--info); }
.tag-danger { background: #fbe9e7; color: var(--danger); }
.tag-muted { background: #eef1f6; color: var(--muted); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(14,26,41,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 680px;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(14,26,41,.3); overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { border: none; background: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }

.kv { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.kv th, .kv td { border: 1px solid var(--line); padding: 8px 12px; font-size: 13px; text-align: left; }
.kv th { background: #f7f9fc; color: var(--muted); font-weight: 600; width: 90px; white-space: nowrap; }
.modal-sec { margin-top: 14px; }
.modal-sec h4 { font-size: 14px; color: var(--navy); margin-bottom: 8px; border-left: 3px solid var(--gold); padding-left: 8px; }
.modal-sec p { line-height: 1.75; color: #33414f; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- 飞书一键登录 ---------- */
.feishu-login-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid #3370FF;
  background: linear-gradient(135deg, #3370FF, #4C8DFF); color: #fff;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.feishu-login-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(51,112,255,.35); }
.feishu-login-txt { line-height: 1; }
.feishu-login-sub { font-size: 12px; font-weight: 400; opacity: .85; line-height: 1; }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-col { flex: 1; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-col label { font-size: 13px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.handle-box { border-top: 1px dashed var(--line); padding-top: 14px; }
.handle-box .input { margin-bottom: 10px; }

/* ---------- 登录页 ---------- */
.standalone { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px; background: linear-gradient(160deg, #14263c 0%, #1b3450 55%, #24456a 100%); }
.login-wrap { width: 100%; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 460px; background: var(--card); border-radius: 14px; box-shadow: 0 24px 70px rgba(5,15,28,.45); padding: 36px; }
.login-brand { text-align: center; color: var(--navy-2); margin-bottom: 24px; }
.login-title { font-size: 21px; font-weight: 800; margin-top: 12px; letter-spacing: 1px; }
.login-sub { color: var(--muted); font-size: 13px; margin-top: 8px; letter-spacing: .5px; }
.demo-section { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-label { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-btn { width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; cursor: pointer; transition: all .15s; font-family: inherit; }
.demo-btn:hover { border-color: var(--gold); background: #fff8ec; }
.demo-name { font-weight: 600; color: var(--text); font-size: 14px; }
.demo-role { color: var(--muted); font-size: 12px; margin-top: 3px; }
.demo-tip { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- 提示 ---------- */
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert-danger { background: #fbe9e7; color: var(--danger); }
.alert-info { background: #e8effd; color: var(--info); }
.alert-ok { background: #e5f6ec; color: var(--ok); }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--navy-2); color: #fff; padding: 11px 22px;
  border-radius: 8px; font-size: 14px; z-index: 200;
  box-shadow: 0 8px 24px rgba(14,26,41,.3);
}

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 搜索页 ---------- */
.search-result { margin-bottom: 22px; }
.search-result h3 { font-size: 15px; color: var(--navy); margin-bottom: 6px; border-left: 3px solid var(--gold); padding-left: 10px; }
.search-result .count { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* ---------- 管理后台 ---------- */
.admin-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.admin-tab {
  padding: 9px 18px; border: 1px solid transparent; border-bottom: none;
  border-radius: 8px 8px 0 0; background: transparent; cursor: pointer;
  font-size: 14px; color: var(--muted); font-family: inherit; transition: all .15s;
}
.admin-tab.active { background: var(--card); border-color: var(--line); color: var(--navy-2); font-weight: 700; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; background: #f5f7fa; color: var(--muted); font-weight: 600; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-top: 1px solid #f0f2f6; vertical-align: middle; }
.data-table tr:hover td { background: #fafbfd; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cfg-field { display: flex; flex-direction: column; gap: 5px; }
.cfg-field label { font-size: 13px; color: var(--muted); }
.cfg-status { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cfg-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 12px; border-radius: 20px; background: #eef1f6; color: var(--muted); }
.cfg-chip.on { background: #e5f6ec; color: var(--ok); }
.cfg-chip.off { background: #fbe9e7; color: var(--danger); }
.sync-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sync-result { font-size: 13px; color: var(--muted); }
.contact-badge { font-size: 12px; color: var(--muted); }

/* ---------- 响应式（软件化：平板/手机适配） ---------- */
@media (max-width: 900px) {
  .hamburger { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 6px 0 24px rgba(14,26,41,.18);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(14,26,41,.5); z-index: 80; }
  .sidebar-mask.show { display: block; }
  .page-title { font-size: 15.5px; }
  .topbar { padding: 0 12px; }
  .content { padding: 14px 12px 36px; }
  .user-role { display: none; }
  .global-search { max-width: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 10px; row-gap: 6px; }
  .global-search { order: 3; flex-basis: 100%; max-width: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px 8px; }
  .stat-card .stat-num { font-size: 24px; }
  .form-row { flex-direction: column; gap: 0; }
  .cfg-grid { grid-template-columns: 1fr; }
  .user-name { font-size: 13px; }
  .demo-grid { grid-template-columns: 1fr; }
  .attr-grid { grid-template-columns: 1fr 1fr; }
  .attr-card { padding: 12px; }
  .mi-title { font-size: 14px; }
  .meeting-item, .complaint-item { gap: 10px; }
  .mi-summary, .ci-content { font-size: 12.5px; }
  .modal { max-height: 92vh; }
  .modal-mask { padding: 10px; }
  .toolbar-left .input { min-width: 130px; }
}


/* ---------- 上传 PDF 自动解析 ---------- */
.parse-box { border: 1px dashed #f0b90b; background: #fffdf3; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.parse-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.parse-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.parse-row .input { flex: 1; min-width: 200px; }
.parse-box .muted { display: block; margin-top: 6px; font-size: 12px; }

/* ===== MOD 值班 ===== */
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mod-head h2 { margin: 0 0 4px; }
.mod-head p { margin: 0; color: var(--muted, #64748b); font-size: 13px; }

.mod-today { background: linear-gradient(135deg, #1a2f4b, #2c4a6e); color: #fff; border-radius: 16px; padding: 22px 26px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(26,47,75,.18); }
.mod-today-label { font-size: 12px; letter-spacing: 3px; color: #f0c75e; margin-bottom: 6px; }
.mod-today-date { font-size: 17px; font-weight: 600; }
.mod-today-left { min-width: 180px; }
.mod-today-list { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.mod-today-person { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); padding: 12px 16px; border-radius: 12px; min-width: 260px; }
.mod-today-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #f0c75e, #e2a93c); color: #1a2f4b; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.mod-today-meta { flex: 1; }
.mod-today-name { font-size: 17px; font-weight: 700; }
.mod-today-role { font-size: 12px; color: rgba(255,255,255,.82); margin-top: 2px; }
.btn-call { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 20px; padding: 6px 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-call:hover { background: rgba(255,255,255,.3); color: #fff; }
.mod-today-empty { width: 100%; padding: 8px 0; }
.mod-today-empty .mod-today-name { font-size: 20px; margin: 8px 0 4px; }

.mod-month-head, .mod-reports-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mod-month-head h3, .mod-reports-head h3 { margin: 0 0 2px; }
.mod-month-nav { display: flex; align-items: center; gap: 8px; }
.mod-month-input { padding: 6px 8px; border: 1px solid var(--border, #d7dde6); border-radius: 8px; font-size: 14px; }

.mod-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border, #d7dde6); border-radius: 12px; }
.mod-matrix { min-width: 700px; }
.mod-row { display: grid; grid-template-columns: 150px repeat(var(--mod-cols, 31), minmax(26px, 1fr)); min-width: 100%; }
.mod-row + .mod-row { border-top: 1px solid var(--border, #e5eaf1); }
.mod-matrix .mod-head { display: grid; gap: 0; background: #f1f5f9; font-weight: 600; font-size: 12px; color: #475569; position: sticky; top: 0; }
.mod-cell { padding: 8px 2px; text-align: center; font-size: 13px; border-left: 1px solid #eef2f7; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.mod-cell.mod-person { border-left: none; justify-content: flex-start; padding: 8px 12px; font-weight: 600; flex-direction: column; align-items: flex-start; gap: 2px; }
.mod-pname { font-size: 13px; }
.mod-prole { font-size: 11px; color: #64748b; font-weight: 400; }
.mod-day.mon, .mod-day.tue, .mod-day.wed, .mod-day.thu, .mod-day.fri { background: #fff; }
.mod-day.sun, .mod-day.sat { background: #fdf3e3; color: #b45309; }
.mod-day.is-today { background: #e8f0fe; box-shadow: inset 0 0 0 2px #3b82f6; border-radius: 8px; color: #1d4ed8; font-weight: 700; }
.mod-star { color: #d4a94e; font-size: 15px; line-height: 1; }
.mod-star.none { color: transparent; }
.mod-legend { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: #64748b; flex-wrap: wrap; }
.mod-legend .legend-dot { width: 10px; height: 10px; border-radius: 50%; background: #d4a94e; display: inline-block; }
.mod-legend .legend-today { width: 12px; height: 12px; border-radius: 4px; background: #e8f0fe; box-shadow: inset 0 0 0 2px #3b82f6; display: inline-block; }
.mod-legend .legend-weekend { width: 12px; height: 12px; border-radius: 4px; background: #fdf3e3; display: inline-block; }

.mod-reports-head p { margin: 2px 0 0; font-size: 12px; }
.mod-report { border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.mod-report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mod-report-date { font-weight: 700; font-size: 14px; }
.mod-report-by { font-size: 12px; }
.mod-report-body { background: #f8fafc; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; margin: 0; color: #334155; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.tag-ok { background: #ecfdf5; color: #059669; }
.tag-warn { background: #fef3c7; color: #b45309; }
.tag-muted { background: #f1f5f9; color: #64748b; }

@media (max-width: 720px) {
  .mod-today { padding: 18px 16px; }
  .mod-today-person { min-width: 100%; }
}

.mod-reports-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-report-file { display: flex; align-items: center; gap: 8px; background: #f8fafc; border-radius: 8px; padding: 8px 12px; }
.mod-file-icon { font-size: 18px; }
.mod-file-link { color: #1d4ed8; font-weight: 600; word-break: break-all; }
.mod-remind { margin-bottom: 20px; }

.mod-schedule-tools { margin-bottom: 16px; }
.mod-tool-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mod-tool-row label { font-weight: 600; color: #475569; }
.mod-tool-hint { margin-top: 8px; font-size: 12px; color: #64748b; }

/* ---------- 通讯录缓存管理 ---------- */
.contact-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.contact-status { display:flex; align-items:center; gap:10px; font-size:14px; color:#334155; }
.contact-actions { display:flex; gap:8px; }
.contact-tools { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.contact-tools .input { max-width:420px; flex:1; min-width:220px; }
.contact-tools .select { max-width:200px; flex:0 0 auto; }
.contact-list { display:flex; flex-direction:column; }
.contact-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border:1px solid #E2E8F0; border-radius:10px; margin-bottom:8px; background:#fff; }
.contact-row:hover { border-color:#B9C4D4; }
.contact-name { font-weight:600; font-size:14px; color:#1E293B; }
.contact-sub { font-size:12px; color:#64748B; margin-top:2px; word-break:break-all; }
.contact-empty { color:#94A3B8; text-align:center; padding:16px; font-size:13px; }
.contact-more { text-align:center; margin-top:4px; }
.perm-pick-list { max-height:220px; overflow-y:auto; border:1px solid #E2E8F0; border-radius:10px; margin-top:6px; background:#fff; }
.perm-pick-row { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:8px 12px; cursor:pointer; font-size:13px; }
.perm-pick-row:hover { background:#F1F5F9; }
.pp-name { font-weight:600; color:#1E293B; white-space:nowrap; }

/* 通讯录勾选联系人控件 */
.perm-pick-row { cursor:pointer; gap:10px; }
.perm-pick-row input[type=checkbox] { width:16px; height:16px; accent-color:#2563EB; flex:0 0 auto; }
.perm-pick-row.picked { background:#EFF6FF; border-left:3px solid #2563EB; }
.oid-pick-status { margin-top:4px; color:#2563EB; }

/* 已选接收人 chips */
.cfg-chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; align-items:center; gap:6px; background:#EFF6FF; border:1px solid #BFDBFE; color:#1D4ED8; font-size:12px; padding:3px 10px; border-radius:999px; }
.chip b { cursor:pointer; color:#64748B; font-weight:700; }
.chip b:hover { color:#DC2626; }

/* ---------- 酒店图库 ---------- */
.gallery-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.gallery-search { position: relative; flex: 1; min-width: 220px; display: flex; align-items: center; }
.gallery-search svg { position: absolute; left: 12px; color: #94a3b8; }
.gallery-search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px; background: #fff; }
.gallery-search input:focus { outline: none; border-color: #3370FF; box-shadow: 0 0 0 3px rgba(51,112,255,.12); }
.gallery-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-cats .chip { padding: 7px 14px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff; font-size: 13px; cursor: pointer; color: #475569; transition: all .15s; }
.gallery-cats .chip:hover { border-color: #3370FF; color: #3370FF; }
.gallery-cats .chip.active { background: #3370FF; border-color: #3370FF; color: #fff; }
.gallery-count { font-size: 13px; color: #94a3b8; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.g-card { background: #fff; border: 1px solid #eef2f7; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 4px rgba(15,23,42,.04); transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column; }
.g-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,23,42,.10); }
.g-card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; cursor: zoom-in; background: #f1f5f9; }
.g-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.g-card:hover .g-card-img img { transform: scale(1.04); }
.g-cat { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(15,23,42,.55); color: #fff; font-size: 11px; backdrop-filter: blur(4px); }
.g-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.g-title { font-size: 14px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-meta { font-size: 12px; color: #94a3b8; }
.g-dl { font-size: 12px; color: #3370FF; text-decoration: none; margin-top: auto; padding-top: 6px; }
.g-dl:hover { text-decoration: underline; }
.gallery-empty { text-align: center; color: #94a3b8; padding: 60px 0; font-size: 14px; }
/* 灯箱 */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox-mask { position: absolute; inset: 0; background: rgba(15,23,42,.82); }
.lightbox-body { position: relative; max-width: 92vw; max-height: 88vh; background: #fff; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.lightbox-body img { max-width: 92vw; max-height: 72vh; object-fit: contain; background: #111827; }
.lightbox-info { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.lightbox-info span:first-child { font-weight: 600; font-size: 14px; }
.lightbox-info span:nth-child(2) { font-size: 12px; color: #94a3b8; }
.lightbox-close { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(15,23,42,.55); color: #fff; font-size: 18px; cursor: pointer; z-index: 2; }
/* 图库管理(后台) */
.gal-manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gal-manage-card { border: 1px solid #eef2f7; border-radius: 10px; overflow: hidden; background: #fff; }
.gal-manage-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
.gal-manage-card .gal-m-body { padding: 8px 10px; }
.gal-manage-card .gal-m-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-manage-card .gal-m-ops { display: flex; gap: 8px; margin-top: 6px; align-items: center; font-size: 12px; }
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .g-card-body { padding: 8px 10px; }
}
