/* 外科咨询百宝箱：所有颜色来自 CSS 变量，由后台品牌色在页面加载时推导注入 */
:root {
  --brand: #4A6378; --primary: #4A6378; --primary-rgb: 74,99,120; --brand-deep: #2B3A46; --brand-night: #1B252D; --brand-glow: #3E5363;
  --brand-tint: #E4E9EE; --brand-weak: #F2F5F7; --brand-ink: #26343F;
  --good: #2E7D32; --bad: #C62828; --warn: #B26A00;
  --bg: #F4F6F7; --card: #fff; --line: #E2E7EA; --line-2: #D2DADF; --text: #1C2427; --text-2: #4F5D63; --text-3: #6B787D;
  --radius: 10px; --radius-lg: 14px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body.no-scroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { flex: none; vertical-align: middle; }
.pre { white-space: pre-line; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- 按钮与表单 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--brand-weak); border-color: var(--line-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-danger { color: var(--bad); border-color: currentColor; background: #fff; }
.btn-danger:hover { background: #FFF5F5; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--brand-weak); color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field small, .hint { font-size: 12px; color: var(--text-3); }
.req::after { content: " *"; color: var(--bad); }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14); }
textarea { resize: vertical; line-height: 1.6; }
select { appearance: auto; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #EBEFF1; border-radius: 9px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); min-height: 30px; }
.seg button.on { background: #fff; color: var(--brand-ink); font-weight: 600; box-shadow: var(--shadow); }
.switch { position: relative; display: inline-flex; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #B9C3C8; transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { left: 24px; }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 6px; font-size: 12px; line-height: 20px; white-space: nowrap; background: #EEF1F3; color: var(--text-2); }
.badge-good { background: #E8F3E9; color: var(--good); }
.badge-bad { background: #FDECEC; color: var(--bad); }
.badge-warn { background: #FFF4E0; color: var(--warn); }
.badge-star { background: #FFF1E0; color: #8A4300; font-weight: 600; }
.badge-lock { background: #EFEBF7; color: #4A3B6B; }
.badge-brand { background: var(--brand-tint); color: var(--brand-ink); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; background: var(--brand-tint); color: var(--brand-ink); font-size: 12px; }

/* ---------- 外框 ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--brand-deep); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; color: #fff !important; text-decoration: none !important; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { font-size: 15px; letter-spacing: .02em; }
.brand-text small { font-size: 11px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-letter { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 700; flex: none; }
.side .logo-letter { background: rgba(255,255,255,.14); }
.logo-sq { border-radius: 9px; object-fit: contain; background: #fff; flex: none; }
.logo-invert { filter: brightness(0) invert(1); background: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 20px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.78); text-decoration: none !important; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav-sep { margin: 14px 12px 4px; font-size: 11px; letter-spacing: .1em; color: rgba(255,255,255,.5); }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #fff; color: var(--brand-ink); font-size: 11px; text-align: center; line-height: 18px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.gsearch { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text-3); }
.gsearch input { border: 0; background: transparent; padding: 0; min-height: 0; box-shadow: none !important; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.bell b { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; line-height: 17px; font-weight: 600; }
.me { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; color: var(--text) !important; text-decoration: none !important; }
.me:hover { background: var(--brand-weak); }
.me small { display: block; font-size: 11px; color: var(--text-3); line-height: 1.2; }
.me .only-d { line-height: 1.3; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.notice-bar { display: flex; align-items: center; gap: 6px; padding: 8px 24px; background: #FFF8E6; color: #6B4E00; font-size: 13px; border-bottom: 1px solid #F3E2B3; }
.content { flex: 1; padding: 22px 24px 32px; width: 100%; max-width: 1440px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 0; padding: 14px 20px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); background: #fff; }
.site-footer a { color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.site-footer .sep { display: inline-block; width: 1px; height: 11px; background: var(--line-2); margin: 0 10px; }
.psb-ic { width: 14px; height: 14px; }
.only-m { display: none !important; }
.side-mask { display: none; }
.tabbar { display: none; }

/* ---------- 页面通用 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; }
.crumb { font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.crumb a { color: var(--text-3); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.grid2 > .card, .grid3 > .card, .admin-grid > .card, .detail-layout > .card { margin-top: 0; }
.filter-toggle { display: none; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.stack > * + * { margin-top: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab.on { color: var(--brand-ink); border-bottom-color: var(--primary); font-weight: 600; }
.tab-count { min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; }
.empty { text-align: center; padding: 48px 16px; color: var(--text-3); }
.empty p { margin: 10px 0 4px; color: var(--text-2); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px; color: var(--text-3); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; color: var(--text-3); font-size: 13px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { color: var(--text-3); font-weight: 500; background: #FAFBFB; white-space: nowrap; }
.tbl tr:hover td { background: #FBFCFC; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search-in { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; flex: 1 1 220px; max-width: 340px; color: var(--text-3); }
.toolbar .search-in input { border: 0; padding: 0; min-height: 0; box-shadow: none !important; }
.cat-select { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-select select { width: auto; min-width: 130px; flex: 1 1 130px; }

/* ---------- 弹窗与提示 ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,26,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: #1F2A30; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw; transition: opacity .3s, transform .3s; }
.toast-ok .ic { color: #7BD389; } .toast-error { background: #7A1F1F; } .toast.out { opacity: 0; transform: translateY(-8px); }

/* ---------- 登录页（默认左右分栏） ---------- */
.login { min-height: 100vh; display: flex; background: #F6F7F8; }
.login-brand { flex: 0 0 53%; position: relative; overflow: hidden; color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 0% 0%, var(--brand-glow), transparent 60%), linear-gradient(150deg, var(--brand-deep), var(--brand-night)); }
.login-brand.has-img { background-size: cover; background-position: center; }
.login-brand.has-img::before { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(10,16,20,.55), rgba(10,16,20,.72)); }
.login-brand > * { position: relative; }
.lb-top { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .24em; }
.lb-top img { height: 34px; width: auto; max-width: 180px; filter: brightness(0) invert(1); }
.lb-mid { margin-top: auto; margin-bottom: auto; padding-top: 40px; max-width: 520px; }
.lb-mid h1 { font-family: var(--serif); font-size: clamp(28px, 3.2vw, 44px); font-weight: 600; line-height: 1.3; letter-spacing: .02em; }
.lb-line { width: 48px; height: 2px; background: rgba(255,255,255,.6); margin: 22px 0 18px; }
.lb-desc { opacity: .8; white-space: pre-line; font-size: 15px; line-height: 1.8; }
.lb-org { font-size: 12px; letter-spacing: .3em; opacity: .75; }
.lb-mark { position: absolute; right: -40px; bottom: -40px; width: 340px; opacity: .07; filter: brightness(0) invert(1); pointer-events: none; }
.lb-mark-letter { position: absolute; right: 10px; bottom: -60px; font-size: 300px; font-weight: 800; opacity: .06; line-height: 1; pointer-events: none; font-family: var(--serif); }
.login-form { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 0; min-width: 0; }
.login-box { width: 100%; max-width: 380px; margin: auto 0; }
.login-logo { height: 64px; max-width: 240px; object-fit: contain; display: block; margin-bottom: 18px; }
.login-box h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; }
.login-sub { color: var(--text-3); margin: 6px 0 26px; font-size: 13px; letter-spacing: .08em; }
.login-note { margin-top: 16px; font-size: 12px; color: var(--text-3); white-space: pre-line; line-height: 1.7; }
.login-alt { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; color: var(--text-3); font-size: 12px; }
.login-alt::before, .login-alt::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login .site-footer { background: transparent; border: 0; width: 100%; margin-top: 24px; }
.login-card { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(150deg, var(--brand-deep), var(--brand-night)); }
.login-card.light { background: var(--bg); }
.login-card.has-img { background-size: cover; background-position: center; }
.login-card .login-box { background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.18); margin: auto; }
.login-card .site-footer { background: transparent; border: 0; color: rgba(255,255,255,.8); }
.login-card .site-footer a { color: rgba(255,255,255,.8); }
.login-card.light .site-footer, .login-card.light .site-footer a { color: var(--text-3); }
.err-box { padding: 10px 12px; border-radius: 8px; background: #FDECEC; color: var(--bad); font-size: 13px; margin-bottom: 14px; display: flex; gap: 6px; align-items: flex-start; }

/* ---------- 案例库 ---------- */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 14px; }
.part-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.part-chips button { flex: none; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer; min-height: 36px; }
.part-chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.sub-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; align-items: center; }
.sub-chips button { border: 0; background: #F1F4F5; color: var(--text-2); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.sub-chips button.on { background: var(--brand-tint); color: var(--brand-ink); font-weight: 600; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.filter-row select { width: auto; min-width: 110px; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.case-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; color: var(--text) !important; text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.case-card:hover { box-shadow: 0 6px 18px rgba(16,24,40,.08); transform: translateY(-1px); }
.cc-media { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; aspect-ratio: 16 / 10; background: #E5EAEC; }
.cc-media.single { grid-template-columns: 1fr; }
.cc-media > div { position: relative; overflow: hidden; background: #DDE3E6; }
.cc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-media .lbl { position: absolute; left: 6px; bottom: 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); padding: 0 6px; border-radius: 4px; }
.cc-media > .cc-badges { background: transparent; overflow: visible; position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.cc-vid { white-space: nowrap; background: rgba(15,22,25,.78); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 99px; display: inline-flex; align-items: center; gap: 3px; }
.cc-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cc-title { font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.cc-title span:last-child { font-weight: 400; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.cc-meta { font-size: 12.5px; color: var(--text-2); }
.cc-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.img-missing { opacity: 0; }

/* 案例详情 */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.viewer { background: #11181B; border-radius: 14px; overflow: hidden; position: relative; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #000; }
.compare figure { margin: 0; position: relative; background: #0B1012; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; }
.compare img, .compare video { width: 100%; height: 100%; object-fit: contain; }
.compare figcaption { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; z-index: 2; }
.wm { position: absolute; inset: 0; pointer-events: none; z-index: 1; background-repeat: repeat; }
.stage-bar { display: flex; gap: 6px; padding: 10px; overflow-x: auto; background: #1A2327; }
.stage-bar button { flex: none; border: 1px solid #39474D; background: transparent; color: #D7E0E3; border-radius: 7px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; }
.stage-bar button.on { background: #fff; color: #11181B; border-color: #fff; font-weight: 600; }
.thumbs { display: flex; gap: 8px; padding: 0 10px 12px; overflow-x: auto; background: #1A2327; }
.thumbs button { flex: none; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #2A363B; position: relative; }
.thumbs button.on { border-color: #fff; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.25); }
.side-info dl { display: grid; grid-template-columns: 76px 1fr; gap: 8px 10px; margin: 0; font-size: 13px; }
.side-info dt { color: var(--text-3); }
.side-info dd { margin: 0; min-width: 0; word-break: break-all; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mini-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text) !important; text-decoration: none !important; background: #fff; }
.mini-card .mc-img { aspect-ratio: 4 / 3; background: #DDE3E6; }
.mini-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-card div:last-child { padding: 6px 8px; font-size: 12.5px; }

/* 编辑 / 上传 */
.uploader { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 14px; background: #FBFCFC; }
.uploader.drag { border-color: var(--primary); background: var(--brand-weak); }
.stage-group { margin-bottom: 14px; }
.stage-group h4 { font-size: 13px; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.media-list { display: flex; flex-wrap: wrap; gap: 10px; }
.media-item { width: 112px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; position: relative; }
.media-item .mi-img { width: 112px; height: 112px; background: #E5EAEC; display: flex; align-items: center; justify-content: center; color: var(--text-3); position: relative; }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item select { border: 0; border-top: 1px solid var(--line); border-radius: 0; min-height: 30px; padding: 2px 6px; font-size: 12px; }
.media-item .mi-x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.media-item .mi-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.15); }
.media-item .mi-bar i { display: block; height: 100%; background: var(--primary); width: 0; transition: width .2s; }
.add-tile { width: 112px; height: 142px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--text-3); font-size: 12px; }
.add-tile:hover { border-color: var(--primary); color: var(--primary); }
.qlist { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #FBFCFC; }
.form-actions { position: sticky; bottom: 0; background: rgba(244,246,247,.96); padding: 12px 0; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; z-index: 5; }

/* 话术卡片 */
.script { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.script + .script { margin-top: 12px; }
.script .q { display: flex; gap: 10px; font-size: 14.5px; }
.script .q b { flex: none; color: var(--text-3); font-weight: 500; }
.script .a { display: flex; gap: 10px; margin-top: 8px; padding: 10px 12px; background: var(--brand-weak); border-radius: 8px; line-height: 1.75; }
.script .a b { flex: none; color: var(--brand-ink); }
.script .a span { white-space: pre-line; }
.banned-hit { background: #FFE2E2; color: var(--bad); border-radius: 3px; padding: 0 2px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.doc-row + .doc-row { margin-top: 10px; }
.doc-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; flex: none; font-size: 11px; font-weight: 700; }

/* 医生 */
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-list { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: sticky; top: 76px; }
.doc-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text) !important; text-decoration: none !important; }
.doc-list a.on { background: var(--brand-tint); color: var(--brand-ink) !important; font-weight: 600; }
.doc-list .av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--brand-tint); flex: none; display: flex; align-items: center; justify-content: center; color: var(--brand-ink); font-weight: 600; }
.doc-list .av img { width: 100%; height: 100%; object-fit: cover; }
.doc-hero { display: flex; gap: 20px; flex-wrap: wrap; }
.doc-photo { width: 140px; height: 176px; border-radius: 12px; overflow: hidden; background: #DDE3E6; flex: none; }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-grid .ph { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #DDE3E6; cursor: zoom-in; border: 0; padding: 0; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.license { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; }

/* 后台 */
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 54px; text-align: center; font-size: 10.5px; color: var(--text-3); }
.swatch i { display: block; height: 34px; border-radius: 8px; border: 1px solid rgba(0,0,0,.06); margin-bottom: 3px; }
.preview-login { display: flex; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); min-height: 230px; font-size: 12px; }
.pl-left { flex: 1.1; color: #fff; padding: 16px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.pl-left h4 { font-family: var(--serif); font-size: 18px; margin-top: auto; }
.pl-left .ln { width: 28px; height: 2px; background: rgba(255,255,255,.6); margin: 8px 0; }
.pl-right { flex: 1; background: #F6F7F8; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.pl-right .inp { height: 26px; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; }
.pl-right .bt { height: 28px; border-radius: 5px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.preview-shell { display: flex; height: 140px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); font-size: 12px; }
.ps-side { width: 120px; color: #fff; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.ps-side span { padding: 4px 8px; border-radius: 5px; }
.ps-main { flex: 1; background: var(--bg); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.perm-tbl td:not(:first-child), .perm-tbl th:not(:first-child) { text-align: center; }
.cat-tree ul { list-style: none; margin: 0; padding-left: 22px; }
.cat-tree > ul { padding-left: 0; }
.cat-node { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; }
.cat-node:hover { background: var(--brand-weak); }
.cat-node .acts { margin-left: auto; display: flex; gap: 2px; opacity: .25; }
.cat-node:hover .acts, .cat-node:focus-within .acts { opacity: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--text-3); }
.bar-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.bar-list { list-style: none; margin: 0; padding: 0; }
.bar-list .bl-name { flex: 0 0 46%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-list .bl-bar { flex: 1; height: 8px; background: #EEF1F3; border-radius: 99px; overflow: hidden; }
.bar-list .bl-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.bar-list .bl-n { width: 40px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.search-group h3 { font-size: 15px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.result { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--text) !important; text-decoration: none !important; }
.result + .result { margin-top: 8px; }
.result .rt { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--brand-tint); flex: none; display: flex; align-items: center; justify-content: center; color: var(--brand-ink); }
.result .rt img { width: 100%; height: 100%; object-fit: cover; }
.notif { display: flex; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.notif + .notif { margin-top: 8px; }
.notif.unread { border-left: 3px solid var(--primary); }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; }
.lightbox img, .lightbox video { max-width: 96vw; max-height: 90vh; }
.lightbox .icon-btn { position: absolute; top: 12px; right: 12px; color: #fff; }

/* ---------- 手机（< 900px） ---------- */
@media (max-width: 899px) {
  .only-d { display: none !important; }
  .only-m { display: inline-flex !important; }
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s; height: 100%; }
  .nav-open .side { transform: none; }
  .nav-open .side-mask { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.35); }
  .topbar { padding: 0 10px; gap: 6px; height: 56px; }
  .gsearch { height: 38px; }
  .content { padding: 14px 12px 90px; }
  .site-footer { padding-bottom: 76px; }
  .tabbar { display: flex !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px; font-size: 11px; color: var(--text-3); text-decoration: none !important; }
  .tabbar a.on { color: var(--primary); font-weight: 600; }
  .page-head h1 { font-size: 19px; }
  .detail-layout, .doc-layout, .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .doc-list { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .doc-list a { flex: none; }
  .doc-list .search-in { display: none; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cc-body { padding: 8px 9px 10px; }
  .cc-title { font-size: 13.5px; flex-direction: column; gap: 0; }
  .cc-meta { font-size: 12px; }
  .card { padding: 14px; }
  .login { flex-direction: column; }
  .login-brand { flex: none; padding: 22px 20px 26px; }
  .lb-mid { padding-top: 14px; margin: 0; }
  .lb-mid h1 { font-size: 22px; }
  .lb-line, .lb-desc, .lb-org { display: none; }
  .lb-mark { width: 160px; right: -20px; bottom: -20px; }
  .lb-mark-letter { font-size: 140px; bottom: -30px; }
  .login-form { padding: 24px 20px 0; justify-content: flex-start; }
  .login-logo { display: none; }
  .login-box h2 { font-size: 24px; }
  .modal-wrap { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .compare figure { aspect-ratio: 3 / 4; }
  .form-actions { bottom: 58px; }
  .filter-row select { flex: 1 1 40%; }
  .filter-toggle { display: inline-flex; }
  .filters:not(.open) .filter-row { display: none; }
  .filters .filter-row .seg { margin-left: 0; }
}
@media (max-width: 380px) { .case-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 打印：隐藏导航和网站信息底栏 ---------- */
@media print {
  .side, .topbar, .tabbar, .site-footer, .notice-bar, .form-actions, .btn, .icon-btn { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; }
}
