:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #66726f;
  --paper: #f3f5f2;
  --panel: #fff;
  --dark: #101817;
  --dark-2: #192523;
  --green: #bfe76b;
  --blue: #546fd8;
  --red: #b94e46;
  --amber: #9a6a1c;
  --line: #dfe5e1;
  --shadow: 0 16px 40px rgba(23, 39, 36, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.is-hidden { display: none !important; }
.boot-screen { position: fixed; inset: 0; z-index: 99; display: grid; place-content: center; justify-items: center; background: var(--paper); color: var(--muted); }
.boot-screen span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 17px; background: var(--dark); color: var(--green); font-size: 25px; font-weight: 800; }
.boot-screen p { font-size: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--green); color: var(--dark); font-weight: 850; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .08em; }
.brand small { margin-top: 2px; color: #81908d; font-size: 9px; }
.brand-light { color: white; }
.eyebrow { margin: 0 0 12px; color: #73968f; font-size: 9px; font-weight: 850; letter-spacing: .17em; }

.admin-login { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .9fr) minmax(520px, 1.1fr); }
.login-brand-panel { display: flex; flex-direction: column; justify-content: space-between; padding: 42px clamp(40px, 5vw, 80px); background: var(--dark); color: white; }
.login-copy h1 { margin: 0; font-size: clamp(44px, 5vw, 70px); line-height: 1.08; letter-spacing: -.05em; }
.login-copy > p:last-child { max-width: 580px; color: #a9bbb7; line-height: 1.85; }
.login-copy .eyebrow { color: var(--green); }
.security-callout { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 12px; max-width: 550px; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.04); }
.security-callout > span { width: 27px; height: 27px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #47342b; color: #ffcc95; font-weight: 800; }
.security-callout p { margin: 0; }
.security-callout strong, .security-callout small { display: block; }
.security-callout strong { font-size: 11px; }
.security-callout small { margin-top: 4px; color: #9fb0ad; font-size: 9px; line-height: 1.6; }
.login-form-panel { display: grid; place-items: center; padding: 40px; }
.login-form { width: min(100%, 460px); }
.login-form h2, .admin-dialog h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.subcopy { margin: 10px 0 28px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.back-link { display: inline-block; margin-bottom: 55px; color: var(--muted); text-decoration: none; font-size: 11px; }
label { display: grid; gap: 8px; margin: 16px 0; color: #3f4d4a; font-size: 11px; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #d3dcd6; border-radius: 10px; background: white; color: var(--ink); outline: none; }
input, select { height: 45px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #567d75; box-shadow: 0 0 0 3px rgba(86,125,117,.13); }
.primary-button, .secondary-button, .danger-button { min-height: 40px; padding: 0 15px; border-radius: 10px; font-size: 11px; font-weight: 800; }
.primary-button { border: 1px solid var(--dark); background: var(--dark); color: white; }
.primary-button:hover { background: #21312e; }
.secondary-button { border: 1px solid #cfd8d2; background: white; color: #29433e; }
.secondary-button:hover { background: #eef2ef; }
.danger-button { border: 1px solid #edc7c3; background: #fff0ee; color: #a2433c; }
.full-button { width: 100%; margin-top: 8px; }
button:disabled { opacity: .58; cursor: wait; }
.inline-status { margin-top: 13px; padding: 11px 13px; border-radius: 10px; background: #e8f1e9; color: #356057; font-size: 10px; line-height: 1.6; }
.inline-status.is-error { background: #ffefed; color: #9c443d; }
.demo-credential { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-credential strong { width: 100%; color: var(--muted); font-size: 9px; }
code { padding: 5px 7px; border-radius: 6px; background: #e8ece9; color: #40534f; font-size: 9px; }

.admin-shell { min-height: 100vh; display: grid; grid-template: 72px 1fr / 245px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 245px; display: flex; flex-direction: column; padding: 21px 15px; background: var(--dark); color: white; }
.sidebar > .brand { padding: 0 9px; }
.admin-identity { display: flex; align-items: center; gap: 10px; margin-top: 27px; padding: 18px 9px; border-top: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.admin-identity > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: #263835; color: var(--green); font-size: 12px; font-weight: 800; }
.admin-identity strong, .admin-identity small { display: block; max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-identity strong { font-size: 10px; }
.admin-identity small { margin-top: 4px; color: #7f918d; font-size: 8px; }
.sidebar nav { display: grid; gap: 3px; margin-top: 14px; padding-right: 2px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #394946 transparent; }
.nav-group-label { margin: 12px 12px 4px; color: #536661; font-size: 7px; font-weight: 850; letter-spacing: .14em; }
.nav-button { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #92a29f; font-size: 10px; font-weight: 700; text-align: left; }
.nav-button span { width: 20px; color: #728580; text-align: center; font-size: 13px; }
.nav-button:hover { background: rgba(255,255,255,.05); color: white; }
.nav-button.is-active { background: #273633; color: white; }
.nav-button.is-active span { color: var(--green); }
.sidebar-bottom { margin-top: auto; }
.session-chip { display: flex; align-items: flex-start; gap: 9px; margin: 0 5px 13px; padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.03); }
.session-chip i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: #7cbd68; box-shadow: 0 0 0 4px rgba(124,189,104,.1); }
.session-chip strong, .session-chip small { display: block; }
.session-chip strong { font-size: 8px; }
.session-chip small { margin-top: 3px; color: #738681; font-size: 7px; }
.logout-button { width: 100%; min-height: 38px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: transparent; color: #8fa19d; font-size: 9px; }
.logout-button:hover { color: white; background: rgba(255,255,255,.05); }
.topbar { position: sticky; top: 0; z-index: 10; grid-column: 2; display: flex; align-items: center; justify-content: space-between; padding: 0 31px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.topbar p { margin: 0 0 4px; color: #8a9693; font-size: 8px; }
.topbar strong { font-size: 13px; }
.environment-badge { display: flex; align-items: center; gap: 8px; color: #7a8582; font-size: 8px; }
.environment-badge span { padding: 5px 8px; border-radius: 6px; background: #fff0dc; color: #906322; font-weight: 800; }
.admin-main { grid-column: 2; min-width: 0; padding: 27px 31px 70px; outline: none; }
.production-blocker { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; padding: 10px 13px; border: 1px solid #eddbbb; border-radius: 10px; background: #fff9eb; }
.production-blocker > span { flex: none; padding: 4px 7px; border-radius: 5px; background: #9a681a; color: white; font-size: 8px; font-weight: 850; }
.production-blocker p { margin: 0; color: #735d35; font-size: 9px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.page-heading .actions { display: flex; gap: 7px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 18px; }
.metric-card { position: relative; min-height: 112px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 18px rgba(28,43,40,.03); overflow: hidden; }
.metric-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent, #bfd1c4); }
.metric-card.warn { --accent: #dda74d; }
.metric-card.info { --accent: #7189de; }
.metric-card.safe { --accent: #78a66c; }
.metric-card.risk { --accent: #d67870; }
.metric-card span { color: var(--muted); font-size: 9px; }
.metric-card strong { display: block; margin-top: 17px; font-size: 25px; }
.metric-card small { display: block; margin-top: 5px; color: #8a9592; font-size: 8px; }
.overview-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.overview-metrics .metric-card { min-height: 98px; padding: 14px; }
.overview-metrics .metric-card strong { margin-top: 12px; font-size: 22px; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 5px 22px rgba(25,42,39,.04); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #e8ece9; }
.panel-header h2 { margin: 0; font-size: 12px; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.panel-body { padding: 17px; }
.queue-list { display: grid; gap: 7px; }
.queue-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 9px 11px; border: 1px solid #e5e9e6; border-radius: 9px; background: #fbfcfa; }
.queue-row div { min-width: 0; }
.queue-row strong, .queue-row small { display: block; }
.queue-row strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.queue-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.queue-row > span { color: #82908d; font-size: 9px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-button { min-height: 65px; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 11px; border: 1px solid #e1e6e2; border-radius: 10px; background: #f9faf8; color: #3d4f4b; text-align: left; }
.quick-button span { color: #53766f; font-size: 16px; }
.quick-button strong { font-size: 9px; }
.quick-button small { color: #85918e; font-size: 7px; line-height: 1.4; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 170px; height: 38px; font-size: 9px; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e8ece9; text-align: left; vertical-align: middle; }
th { background: #f8faf8; color: #7a8784; font-size: 8px; font-weight: 800; white-space: nowrap; }
td { font-size: 9px; line-height: 1.5; }
tbody tr:hover { background: #fbfcfa; }
tbody tr:last-child td { border-bottom: 0; }
.cell-title strong, .cell-title small { display: block; }
.cell-title strong { font-size: 9px; }
.cell-title small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.status-pill { display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border-radius: 99px; background: #edf1fb; color: #53679e; font-size: 7px; font-weight: 800; white-space: nowrap; }
.status-approved, .status-active, .status-published { background: #e7f1e3; color: #4b7342; }
.status-rejected, .status-revoked, .status-failed { background: #ffedeb; color: #a24740; }
.status-pending, .status-submitted, .status-platform_approved { background: #fff2db; color: #926218; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { min-height: 29px; padding: 0 9px; font-size: 7px; }
.empty-state, .error-state, .loading-state { display: grid; justify-items: center; padding: 52px 20px; text-align: center; }
.state-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 12px; background: #edf1ed; color: #58756f; font-size: 17px; }
.empty-state h3, .error-state h3 { margin: 0; font-size: 12px; }
.empty-state p, .error-state p { max-width: 450px; margin: 7px 0 15px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.loading-line { width: min(100%, 440px); height: 9px; margin: 5px; border-radius: 20px; background: linear-gradient(90deg,#edf0ed 25%,#e2e7e3 40%,#edf0ed 65%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
.loading-line.short { width: 70%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.assignment-layout { display: grid; grid-template-columns: 330px 1fr; gap: 14px; }
.assignment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.form-note { padding: 11px; border-radius: 9px; background: #eef2ed; color: #63716e; font-size: 8px; line-height: 1.65; }
.qr-layout { display: grid; grid-template-columns: 380px 1fr; gap: 14px; }
.qr-result { min-height: 430px; display: grid; place-items: center; padding: 25px; text-align: center; }
.qr-placeholder span { width: 100px; height: 100px; display: grid; place-items: center; margin: 0 auto 15px; border: 2px dashed #cad5ce; border-radius: 18px; color: #71827e; font-size: 32px; }
.qr-placeholder h3 { margin: 0; font-size: 13px; }
.qr-placeholder p { max-width: 390px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.qr-output canvas { width: 285px; height: 285px; max-width: 100%; border: 8px solid white; border-radius: 8px; box-shadow: 0 10px 30px rgba(15,30,27,.12); image-rendering: pixelated; }
.qr-output h3 { margin: 17px 0 7px; font-size: 12px; }
.qr-token { width: min(100%, 470px); height: auto; min-height: 40px; margin-top: 8px; padding: 9px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; word-break: break-all; }
.qr-actions { display: flex; justify-content: center; gap: 7px; margin-top: 12px; }
.conversation-audit-layout { display: grid; grid-template-columns: minmax(290px, .72fr) minmax(0, 1.28fr); gap: 14px; }
.conversation-audit-list { display: grid; align-content: start; gap: 7px; }
.conversation-audit-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #e1e7e3; border-radius: 10px; background: #fafbf9; color: var(--ink); text-align: left; }
.conversation-audit-item:hover, .conversation-audit-item.is-active { border-color: #8da79f; background: #f0f5f1; }
.conversation-audit-item strong, .conversation-audit-item small { display: block; }
.conversation-audit-item strong { font-size: 10px; }
.conversation-audit-item small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.conversation-audit-item b { padding: 5px 7px; border-radius: 99px; background: #e7f1e3; color: #4b7342; font-size: 7px; white-space: nowrap; }
.conversation-audit-detail { min-height: 390px; overflow: hidden; }
.conversation-audit-note { margin-bottom: 14px; padding: 11px 13px; border: 1px solid #dfe7e1; border-radius: 9px; background: #f1f5f1; color: #5c6c68; font-size: 8px; line-height: 1.65; }
.conversation-audit-messages { display: grid; gap: 9px; }
.audit-message { padding: 12px; border: 1px solid #e2e7e3; border-radius: 10px; background: #fbfcfa; }
.audit-message header { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.audit-message header strong { color: #3c4e49; font-size: 9px; }
.audit-message time { font-size: 8px; }
.audit-message p { margin: 8px 0 0; font-size: 10px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-message > span { display: inline-block; margin-top: 8px; padding: 4px 6px; border-radius: 5px; background: #fff1df; color: #91631f; font-size: 7px; font-weight: 800; }
.audit-message.is-retracted { border-color: #e8d8ba; background: #fffaf1; }
.audit-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.audit-summary span { padding: 6px 9px; border: 1px solid #dfe5e1; border-radius: 7px; background: white; color: #5c6a67; font-size: 8px; }

.admin-dialog { width: min(92vw, 530px); padding: 0; border: 0; border-radius: 16px; background: transparent; }
.admin-dialog::backdrop { background: rgba(8,18,16,.58); backdrop-filter: blur(2px); }
.admin-dialog form { margin: 0; padding: 22px; border-radius: 15px; background: white; box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.admin-dialog form > p { color: var(--muted); font-size: 10px; line-height: 1.7; }
.small-dialog { width: min(92vw, 440px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.icon-button { width: 31px; height: 31px; border: 0; border-radius: 8px; background: #edf1ee; color: #5e6c69; font-size: 17px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 20px; }
.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 7px; }
.toast { width: min(360px, calc(100vw - 32px)); padding: 11px 13px; border-radius: 10px; background: var(--dark); color: white; box-shadow: 0 15px 35px rgba(0,0,0,.2); font-size: 9px; line-height: 1.6; }
.toast.is-error { background: #863f39; }

/* 四库总控 */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted-copy { color: #8a9693; font-size: 8px; }
.panel-count { min-width: 25px; height: 25px; display: grid; place-items: center; padding: 0 7px; border-radius: 99px; background: #edf2ee; color: #58716b; font-size: 8px; font-weight: 850; }
.library-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.library-overview-card { --library-accent: #587c75; min-width: 0; padding: 15px; border: 1px solid var(--line); border-top: 3px solid var(--library-accent); border-radius: 13px; background: white; box-shadow: 0 5px 22px rgba(25,42,39,.04); }
.library-projects { --library-accent: #5470d1; }
.library-talents { --library-accent: #4e8b78; }
.library-investors { --library-accent: #a7782d; }
.library-enterprises { --library-accent: #7a668f; }
.library-card-heading { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.library-card-heading:hover strong { color: var(--library-accent); }
.library-card-heading > span:nth-child(2) { min-width: 0; }
.library-card-heading strong, .library-card-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-card-heading strong { font-size: 12px; }
.library-card-heading small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.library-card-heading > b { color: var(--library-accent); font-size: 14px; }
.library-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--library-accent) 12%, white); color: var(--library-accent); font-size: 10px; font-weight: 900; }
.library-card-stats { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; margin-top: 14px; color: #788581; font-size: 7px; }
.library-card-stats span:last-child { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.library-card-stats b { color: #394a46; font-size: 9px; }
.completion-track { height: 3px; margin: 9px 0 10px; border-radius: 99px; background: #edf0ed; overflow: hidden; }
.completion-track i { display: block; height: 100%; border-radius: inherit; background: var(--library-accent); }
.library-preview-list { display: grid; gap: 3px; }
.library-preview-row { width: 100%; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border: 0; border-top: 1px solid #edf0ee; background: transparent; color: var(--ink); text-align: left; }
.library-preview-row:first-child { border-top: 0; }
.library-preview-row > span:first-child { min-width: 0; }
.library-preview-row strong, .library-preview-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-preview-row strong { font-size: 8px; }
.library-preview-row small { margin-top: 3px; color: #84908d; font-size: 7px; }
.library-preview-row:hover strong { color: var(--library-accent); }
.library-empty-copy { margin: 10px 0 0; color: #8b9794; font-size: 8px; }
.overview-lower-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 14px; }
.compact-list { display: grid; gap: 5px; }
.recent-row { width: 100%; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #e8ece9; border-radius: 9px; background: #fbfcfa; color: var(--ink); text-align: left; }
button.recent-row:hover { border-color: #aebfb9; background: #f3f6f3; }
.recent-row strong, .recent-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-row strong { font-size: 9px; }
.recent-row small, .recent-row time { margin-top: 3px; color: var(--muted); font-size: 7px; }
.recent-library-tag { padding: 4px 6px; border-radius: 5px; background: #e8efea; color: #526b65; font-size: 7px; font-weight: 800; }
.operations-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 四库列表 */
.library-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; padding: 11px 13px; }
.library-toolbar label { flex: 1; min-width: 220px; margin: 0; }
.library-toolbar input { height: 39px; }
.library-toolbar .secondary-button { flex: none; }
.toolbar-count { margin-left: auto; color: var(--muted); font-size: 8px; white-space: nowrap; }
.library-table-panel .panel-header { padding-block: 13px; }
.library-table { min-width: 920px; }
.library-record-row.is-filtered-out { display: none; }
.record-title-button, .record-open-button { padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.record-title-button { max-width: 250px; }
.record-title-button strong, .record-title-button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-title-button strong { font-size: 10px; }
.record-title-button small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.record-title-button:hover strong, .record-open-button:hover { color: #406b62; }
.record-open-button { color: #4e716a; font-size: 8px; font-weight: 850; white-space: nowrap; }
.record-tags, .detail-value-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.record-tags span, .detail-value-tags span { padding: 3px 6px; border-radius: 5px; background: #eef2ef; color: #536762; font-size: 7px; white-space: nowrap; }
.meta-summary { display: grid; gap: 2px; margin: 0; }
.meta-summary div { display: flex; gap: 5px; }
.meta-summary dt { color: #899491; font-size: 7px; }
.meta-summary dd { max-width: 190px; margin: 0; overflow: hidden; color: #50615e; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }

/* 四库完整详情 */
.detail-back-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.detail-back-row > span { color: #8a9693; font-size: 8px; }
.record-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 20px 22px; border-radius: 14px; background: var(--dark); color: white; }
.record-hero .eyebrow { margin-bottom: 8px; color: var(--green); }
.record-hero h1 { margin: 0; font-size: clamp(22px, 3vw, 34px); letter-spacing: -.035em; }
.record-hero-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #93a6a2; font-size: 8px; }
.record-shield { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.04); color: #c5d1ce; font-size: 8px; line-height: 1.5; }
.record-shield > b { width: 31px; height: 31px; display: grid; place-items: center; flex: none; border-radius: 9px; background: #263a36; color: var(--green); }
.record-shield small { color: #80918e; font-size: 7px; }
.record-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 14px; }
.record-sections { display: grid; gap: 12px; min-width: 0; }
.detail-section { overflow: hidden; }
.detail-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.detail-field { min-width: 0; padding: 13px 16px; border-right: 1px solid #edf0ee; border-bottom: 1px solid #edf0ee; }
.detail-field:nth-child(2n) { border-right: 0; }
.detail-field:nth-last-child(-n+2) { border-bottom: 0; }
.detail-field.is-sensitive { background: #fffaf1; }
.detail-field dt { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; color: #73817d; font-size: 8px; font-weight: 800; }
.detail-field dt > span { padding: 2px 5px; border-radius: 4px; background: #a16b20; color: white; font-size: 6px; }
.detail-field dd { min-width: 0; margin: 0; color: #293b37; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.field-text { white-space: pre-wrap; }
.detail-value-list { display: grid; gap: 6px; }
.detail-value-list > div { padding: 8px; border: 1px solid #e6ebe7; border-radius: 7px; background: rgba(255,255,255,.65); }
.nested-value { display: grid; gap: 5px; margin: 0; }
.nested-value > div { display: grid; grid-template-columns: minmax(72px, .38fr) minmax(0, 1fr); gap: 8px; padding-bottom: 5px; border-bottom: 1px dashed #e2e7e3; }
.nested-value > div:last-child { padding-bottom: 0; border-bottom: 0; }
.nested-value dt { margin: 0; color: #80908c; font-size: 7px; }
.nested-value dd { margin: 0; font-size: 8px; }
.detail-field pre { max-width: 100%; margin: 0; overflow-x: auto; font-size: 7px; white-space: pre-wrap; }
.record-system-panel { position: sticky; top: 88px; overflow: hidden; }
.system-fields > dl { display: grid; gap: 0; margin: 0; }
.system-fields > dl > div { padding: 9px 0; border-bottom: 1px solid #edf0ee; }
.system-fields > dl > div:first-child { padding-top: 0; }
.system-fields > dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.system-fields dt { color: #84908d; font-size: 7px; }
.system-fields dd { margin: 4px 0 0; color: #344642; font-size: 8px; line-height: 1.55; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .metric-grid, .overview-metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .assignment-layout, .qr-layout, .conversation-audit-layout, .overview-lower-grid, .record-detail-grid { grid-template-columns: 1fr; }
  .library-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-system-panel { position: static; }
  .assignment-form { max-width: 600px; }
}

@media (max-width: 780px) {
  .admin-login { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 370px; padding: 28px; }
  .security-callout { margin-top: 45px; }
  .login-form-panel { padding: 55px 24px; }
  .back-link { margin-bottom: 35px; }
  .admin-shell { display: block; padding-top: 62px; }
  .sidebar { position: fixed; inset: 0 0 auto 0; width: auto; height: 62px; flex-direction: row; align-items: center; padding: 9px 13px; }
  .sidebar .brand small, .admin-identity, .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; margin: 0 0 0 auto; padding: 0; overflow-x: auto; overflow-y: hidden; }
  .nav-group-label { display: none; }
  .nav-button { min-height: 38px; padding: 0 9px; white-space: nowrap; }
  .nav-button span { display: none; }
  .topbar { display: none; }
  .admin-main { padding: 20px 15px 60px; }
}

@media (max-width: 560px) {
  .sidebar .brand > span:last-child { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .assignment-form .form-row { grid-template-columns: 1fr; }
  .environment-badge { display: none; }
  .production-blocker { align-items: flex-start; }
  .library-overview-grid { grid-template-columns: 1fr; }
  .library-toolbar { align-items: stretch; flex-wrap: wrap; }
  .library-toolbar label { width: 100%; flex-basis: 100%; min-width: 0; }
  .toolbar-count { width: 100%; margin: 2px 0 0; }
  .detail-back-row { align-items: flex-start; flex-direction: column; }
  .record-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
  .record-shield { width: 100%; }
  .detail-field-grid { grid-template-columns: 1fr; }
  .detail-field, .detail-field:nth-child(2n), .detail-field:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #edf0ee; }
  .detail-field:last-child { border-bottom: 0; }
  .operations-quick-grid { grid-template-columns: 1fr 1fr; }
  .library-table { min-width: 0; }
  .library-table thead { display: none; }
  .library-table tbody { display: grid; gap: 8px; padding: 10px; }
  .library-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 11px; border: 1px solid #e2e7e3; border-radius: 10px; background: #fbfcfa; }
  .library-table td { padding: 0; border: 0; }
  .library-table td:nth-child(1), .library-table td:nth-child(3), .library-table td:nth-child(4) { grid-column: 1 / -1; }
  .library-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .library-table td:nth-child(5) { grid-column: 2; grid-row: 2; color: var(--muted); text-align: right; }
  .library-table td:nth-child(6) { grid-column: 1 / -1; }
  .record-title-button { max-width: none; }
}

@media (prefers-reduced-motion: reduce) { .loading-line { animation: none; } }
