/* 诺达校园管理平台·校区业务补充样式（基础视觉沿用诺达美居管理端 admin.css） */

/* 工作台 KPI 四列 */
.kpi-grid.kpi-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 表格内容换行 */
.data-table td.wrap { white-space: normal; max-width: 340px; overflow-wrap: anywhere; line-height: 1.6; }
.data-table td .sub { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

/* 筛选栏 */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.input, .filters select {
  height: 36px; padding: 0 12px; border: 1px solid #E4EAF3; border-radius: 8px;
  background: #fff; color: var(--text); font-size: 13px; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.input:focus, .filters select:focus { border-color: var(--primary); }
.input::placeholder { color: #A6AFBE; }

/* 提示条 */
.notice {
  background: var(--primary-weak); color: #2E66B8; border: 1px solid #D6E6FF;
  border-radius: 8px; padding: 10px 14px; font-size: 12.5px; line-height: 1.7; margin: 0 0 14px;
}

/* 登录页错误提示 */
.access-error { font-size: 12px; color: #DC5143; background: #FFF4F0; border: 1px solid #FFE4DA; border-radius: 6px; padding: 8px 10px; line-height: 1.5; margin: 0 0 13px; }
.access-error[hidden] { display: none; }

/* 打印配置 */
.print-block { border: 1px solid #EDF1F7; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.print-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.print-block-head h3 { margin: 0; font-size: 14px; }
.print-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.print-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.print-checks .inline-check { flex-direction: row; align-items: center; gap: 7px; color: var(--text); }
.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-table th { text-align: left; font-weight: 600; color: var(--sub); padding: 8px 10px; background: #F7F9FD; white-space: nowrap; }
.print-table td { padding: 8px 10px; border-top: 1px solid #EDF1F7; }
.print-table .input { width: 120px; height: 34px; }
.print-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 2px; color: #E8590C; }
@media (max-width: 900px) { .print-grid { grid-template-columns: 1fr; } }

/* 用户分布 */
.user-map-card { padding-bottom: 14px; }
.user-map-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.role-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px; border: 1px solid #E8EDF5; background: #fff; color: #667085; font-size: 13px; cursor: pointer; }
.role-tab em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #F1F5F9; color: #64748B; }
.role-tab.on { background: #FFF4E8; border-color: #FFD8B0; color: #E8590C; font-weight: 600; }
.role-tab.on em { background: #FFE3C7; color: #E8590C; }
.user-map { height: 460px; border-radius: 12px; overflow: hidden; border: 1px solid #EDF1F7; position: relative; z-index: 0; }
.user-pin-wrap { background: none; border: 0; display: flex; flex-direction: column; align-items: center; }
.user-pin { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--pin); background: #fff; box-shadow: 0 6px 16px rgba(15,23,42,.22); overflow: hidden; }
.user-pin i { font-style: normal; font-weight: 700; font-size: 14px; color: var(--pin); }
.user-pin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.user-pin-name { margin-top: 4px; max-width: 88px; padding: 2px 7px; border-radius: 10px; background: rgba(255,255,255,.96); border: 1px solid #E2E8F0; box-shadow: 0 2px 6px rgba(15,23,42,.18); font-size: 11px; line-height: 16px; color: #1E293B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.user-pop { min-width: 210px; font-size: 13px; color: #334155; }
.user-pop-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.user-pop-head b { display: block; font-size: 14px; color: #1E293B; }
.user-pop-head span { font-size: 12px; color: #64748B; }
.user-pop em { display: block; font-style: normal; font-size: 12px; line-height: 1.8; color: #64748B; }
.user-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #FFF1E2; color: #E8590C; font-weight: 700; }
.user-avatar i { font-style: normal; }
.user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.user-cell { display: flex; align-items: center; gap: 9px; }
.user-cell b { display: block; font-size: 13px; color: #1E293B; }
.user-cell span { font-size: 12px; color: #94A3B8; }
.user-avatar.big { width: 56px; height: 56px; font-size: 20px; }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-edit small { display: block; margin-top: 6px; font-size: 12px; color: #94A3B8; }
.avatar-pick { display: inline-flex; }
.user-map .leaflet-popup-content { margin: 12px 14px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 28, 51, .42);
  backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 120;
}
.modal-card {
  width: min(560px, 100%); max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(15, 34, 66, .26); padding: 22px 24px;
}
.modal-card.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-close:hover { background: #F2F5FA; color: var(--text); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 弹窗内表单 */
.form-stack { display: flex; flex-direction: column; gap: 13px; }
.form-stack > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--sub); }
.form-stack input, .form-stack select, .form-stack textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; font-family: inherit; outline: none; background: #fff;
  transition: border-color .2s;
}
.form-stack input, .form-stack select { height: 38px; padding: 0 12px; }
.form-stack textarea { min-height: 150px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus { border-color: var(--primary); }
.form-stack .inline-check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.form-stack .inline-check input { width: 16px; height: 16px; }

/* 订单详情 */
.detail-grid { display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: #3E4A5E; }
.detail-grid .row-line { display: flex; gap: 8px; line-height: 1.6; }
.detail-grid .row-line > span { flex: 0 0 72px; color: var(--muted); }
.detail-grid .row-line > b { font-weight: 500; }

/* 空状态行 */
.data-table .empty { text-align: center; color: var(--muted); padding: 34px 0; white-space: normal; }

/* 校区地图 */
.campus-map-card { margin-bottom: 16px; }
.campus-map { position: relative; z-index: 0; height: 320px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #EEF2F6; }
.campus-map-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.campus-map-hint[hidden] { display: none; }
.campus-map-fallback { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.campus-pin-wrap { background: none; border: 0; }
.campus-pin { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--primary); border: 2px solid #fff; box-shadow: 0 6px 14px rgba(22, 119, 255, .35); }
.campus-pin i { transform: rotate(45deg); font-style: normal; color: #fff; font-size: 12px; font-weight: 700; }
.campus-pop { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #3E4A5E; min-width: 150px; }
.campus-pop b { font-size: 13px; color: #1F2A3D; }
.campus-pop span { color: #5B6779; }
.campus-pop em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.campus-picker-wrap { display: flex; flex-direction: column; gap: 8px; }
.campus-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--sub); }
.campus-picker-head .muted { font-size: 11.5px; color: var(--muted); }
.campus-picker { position: relative; z-index: 0; height: 240px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: #EEF2F6; }
.campus-search-row { display: flex; gap: 8px; }
.campus-search-row input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit; outline: none; background: #fff; }
.campus-search-row input:focus { border-color: var(--primary); }
.campus-search-row .btn { flex: 0 0 auto; height: 38px; }
.campus-search-results { max-height: 150px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.campus-search-results[hidden] { display: none; }
.campus-result { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 8px 12px; border: 0; border-bottom: 1px solid #F2F5F9; background: #fff; cursor: pointer; font-family: inherit; }
.campus-result:last-child { border-bottom: 0; }
.campus-result:hover { background: #F5F9FF; }
.campus-result b { font-size: 12.5px; color: var(--text); }
.campus-result span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campus-result-empty { padding: 10px 12px; font-size: 12px; color: var(--muted); }
.coord-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coord-row label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--sub); }
.leaflet-container { font-family: inherit; }
.btn.link.danger { color: #E5484D; }

/* 批量选择 */
.batch-check { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--sub); cursor:pointer; white-space:nowrap; }
.batch-check input { width:15px; height:15px; accent-color:var(--primary); cursor:pointer; }
.data-table th .batch-check { font-weight:500; }
.data-table td.batch-cell { width:42px; text-align:center; }
.data-table tr.batch-on td { background:#F5F9FF; }
.batch-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:10px 14px; margin-bottom:12px; border:1px solid #E4EAF3; border-radius:9px; background:#F8FAFE; }
.batch-count { font-size:12.5px; color:var(--sub); }
.batch-count b { color:var(--primary); font-size:14px; }
.batch-actions { display:flex; gap:8px; flex-wrap:wrap; }
.batch-bar .btn:disabled { opacity:.45; cursor:not-allowed; }
.batch-fails { max-height:240px; overflow:auto; font-size:12.5px; line-height:1.9; color:#B4443C; background:#FFF7F5; border:1px solid #FFE4DA; border-radius:8px; padding:10px 12px; }

/* 少量工具类 */
.mt-16 { margin-top: 16px; }
.flex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.flex-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* ============ 在线客服工作台 ============ */
.sc-head { display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:14px 18px; margin-bottom:12px; }
.sc-head h1 { margin:0; font-size:18px; }
.sc-tabs { display:flex; gap:4px; flex:1; flex-wrap:wrap; }
.sc-tab { border:0; background:transparent; color:var(--sub); font-size:13.5px; padding:7px 14px; border-radius:8px; cursor:pointer; font-family:inherit; transition:background .15s,color .15s; }
.sc-tab:hover { background:#F4F7FC; color:var(--text); }
.sc-tab.active { background:var(--primary-weak); color:var(--primary); font-weight:600; }
.sc-actions { font-size:13px; display:flex; align-items:center; gap:6px; }

.sc-grid { display:grid; grid-template-columns: 280px 1fr 240px; gap:12px; height: calc(100vh - 210px); min-height: 480px; }
.sc-col { display:flex; flex-direction:column; padding:0; overflow:hidden; }
.sc-list-col, .sc-chat-col, .sc-side-col { min-width:0; }

/* 左：会话列表 */
.sc-list-head { display:flex; flex-direction:column; gap:10px; padding:12px; border-bottom:1px solid var(--border); }
.sc-status-tabs { display:flex; gap:6px; }
.sc-status-tabs .btn { flex:1; padding:6px 4px; font-size:12.5px; }
.sc-list-head input { height:34px; padding:0 10px; border:1px solid var(--border); border-radius:8px; font-size:13px; font-family:inherit; outline:none; background:#fff; }
.sc-list-head input:focus { border-color:var(--primary); }
.sc-list { flex:1; overflow:auto; }
.sc-list-foot { padding:8px 12px; border-top:1px solid var(--border); }
.sc-item { padding:11px 12px; border-bottom:1px solid #F4F7FC; cursor:pointer; }
.sc-item:hover { background:#F7FAFF; }
.sc-item.active { background:var(--primary-weak); }
.sc-item-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:3px; }
.sc-item-top b { font-size:13.5px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sc-item-preview { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-bottom:2px; }
.sc-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:#FF5A4F; color:#fff; font-size:11px; font-weight:600; }

/* 中：聊天区 */
.sc-chat-head { display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.sc-avatar { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; background:var(--primary-weak); color:var(--primary); font-weight:700; font-size:14px; flex-shrink:0; }
.sc-chat-user { display:flex; flex-direction:column; gap:1px; }
.sc-chat-user b { font-size:14px; color:var(--text); }
.sc-chat-actions { margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; }
.sc-msgs { flex:1; overflow:auto; padding:14px; background:#FAFBFD; display:flex; flex-direction:column; gap:8px; }
.sc-msg-time { text-align:center; color:var(--muted); font-size:11px; margin:6px 0; }
.sc-bubble-row { display:flex; }
.sc-bubble-row.left { justify-content:flex-start; }
.sc-bubble-row.right { justify-content:flex-end; }
.sc-bubble { max-width:72%; padding:8px 12px; border-radius:10px; background:#fff; border:1px solid var(--border); color:var(--text); font-size:13.5px; line-height:1.6; word-break:break-word; }
.sc-bubble.mine { background:var(--primary); color:#fff; border-color:var(--primary); }
.sc-bubble-text { white-space:pre-wrap; }
.sc-bubble-name { font-size:11px; opacity:.75; margin-top:4px; }
.sc-reply { padding:10px 12px; border-top:1px solid var(--border); background:#fff; }
.sc-reply-row { display:flex; gap:8px; align-items:flex-end; }
.sc-reply-row textarea { flex:1; min-width:0; resize:none; border:1px solid var(--border); border-radius:8px; padding:8px 10px; font-size:13.5px; font-family:inherit; outline:none; line-height:1.5; }
.sc-reply-row textarea:focus { border-color:var(--primary); }
.sc-reply-row .btn { height:auto; padding:8px 16px; white-space:nowrap; }

/* 右：用户/会话信息 */
.sc-side-head { padding:10px 12px; font-size:12.5px; font-weight:600; color:var(--sub); background:#F7F9FD; border-bottom:1px solid var(--border); }
.sc-side-body { padding:8px 0; }
.sc-side-row { display:flex; justify-content:space-between; gap:10px; padding:7px 12px; font-size:13px; color:var(--text); }
.sc-side-row .muted { color:var(--muted); }

@media (max-width:1180px){ .sc-grid { grid-template-columns: 260px 1fr; } .sc-side-col { display:none; } }
@media (max-width:760px){ .sc-grid { grid-template-columns: 1fr; height:auto; } .sc-list-col { max-height:240px; } .sc-chat-col { min-height:420px; } }

/* 商家经营分类标签 */
.cat-tag-field { display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--sub); }
.cat-tag-list { max-height:210px; overflow:auto; border:1px solid var(--border); border-radius:8px; padding:8px 10px; }
.form-stack .cat-tag-list .cat-tag-item { display:flex; flex-direction:row; align-items:flex-start; gap:8px; font-size:12px; color:var(--text); padding:3px 0; }
.form-stack .cat-tag-list .cat-tag-item input[type=checkbox] { width:16px; height:16px; min-height:16px; padding:0; margin:2px 0 0; flex:0 0 auto; }
.cat-tag-list .cat-tag-item span { line-height:1.5; word-break:break-all; }
