:root {
  color-scheme: light;
  --ink: #19242d;
  --muted: #6e7b84;
  --line: #dce3e6;
  --surface: #ffffff;
  --canvas: #f4f7f7;
  --teal: #087f7a;
  --teal-dark: #056460;
  --amber: #d08722;
  --danger: #b34036;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
.topbar { height: 72px; padding: 0 4vw; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand, .api-status, .topbar-actions, .section-heading, .pagination, .record-header, .record-meta { display: flex; align-items: center; }
.topbar-actions { gap: 15px; }
.brand { gap: 12px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--teal); color: white; font-weight: 700; border-radius: 7px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.api-status { gap: 7px; color: var(--muted); font-size: 12px; }
.logout-button { min-height: 32px; padding: 0 10px; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b4bec1; }
.status-dot.online { background: #269c72; }
.status-dot.offline { background: var(--danger); }
.workspace { max-width: 1480px; margin: 0 auto; padding: 30px 4vw 64px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.search-panel { padding: 24px 26px 22px; margin-bottom: 18px; }
.section-heading { justify-content: space-between; gap: 16px; }
.section-heading.compact { margin-bottom: 18px; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .13em; margin: 0 0 5px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 18px; }
h3 { margin-bottom: 13px; font-size: 13px; color: var(--ink); }
h3 span { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 5px; }
.result-count, .required-note { color: var(--muted); font-size: 12px; }
.search-form { display: grid; grid-template-columns: 1fr 1fr 1.25fr auto auto; align-items: end; gap: 12px; margin-top: 22px; }
label { display: block; color: var(--muted); font-size: 12px; }
label.required::after { content: " *"; color: var(--danger); }
input, textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 5px; padding: 10px 11px; color: var(--ink); background: #fbfcfc; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 122, .1); }
textarea { resize: vertical; min-height: 62px; }
.button { min-height: 40px; border: 1px solid transparent; border-radius: 5px; padding: 0 16px; font: inherit; cursor: pointer; white-space: nowrap; }
.button-primary { background: var(--teal); color: white; }
.button-primary:hover { background: var(--teal-dark); }
.button-quiet { background: transparent; color: var(--muted); border-color: var(--line); }
.button-quiet:hover { color: var(--ink); border-color: #aebbc0; background: #f8faf9; }
.icon-button { border: 0; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; cursor: pointer; padding: 4px 7px; }
.content-grid { display: grid; grid-template-columns: minmax(330px, .84fr) minmax(600px, 1.45fr); gap: 18px; align-items: start; }
.results-panel { min-height: 520px; padding: 24px 22px; }
.form-panel { padding: 24px 26px; }
.results-list { display: grid; gap: 10px; }
.empty-state { min-height: 310px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 20px; }
.empty-state strong { color: var(--ink); margin: 12px 0 5px; }
.empty-state p { margin: 0; font-size: 12px; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--teal); border: 1px solid #aed3d0; border-radius: 50%; font-size: 25px; }
.record-card { padding: 15px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.record-card:hover { border-color: #84bfbb; box-shadow: 0 3px 12px rgba(25, 36, 45, .07); }
.record-header { justify-content: space-between; gap: 10px; }
.record-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-tag { background: #eaf5f3; color: var(--teal-dark); border-radius: 3px; padding: 3px 6px; font-size: 11px; }
.record-meta { flex-wrap: wrap; gap: 6px 15px; color: var(--muted); font-size: 12px; margin-top: 10px; }
.record-meta span { overflow-wrap: anywhere; }
.record-card-action { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; color: var(--teal-dark); font-size: 12px; font-weight: 700; }
.pagination { justify-content: center; gap: 14px; margin-top: 18px; }
.pagination .button { min-height: 34px; padding: 0 11px; font-size: 12px; }
.form-section { padding-top: 4px; margin-top: 21px; border-top: 1px solid #edf0f1; }
.form-section:first-of-type { border-top: 0; margin-top: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.field-grid label:has(textarea), .one-column label { grid-column: 1 / -1; }
.one-column { grid-template-columns: 1fr; }
.checkbox-label { display: flex; align-items: center; gap: 8px; color: var(--ink); padding-top: 27px; }
.checkbox-label input { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.form-message { min-height: 22px; color: var(--danger); font-size: 12px; margin-top: 18px; }
.form-message.success { color: #237b5c; }
.submit-button { width: 100%; margin-top: 3px; }
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 27, 31, .7); }
.modal-dialog { position: relative; z-index: 1; width: min(920px, 100%); height: min(720px, 90vh); background: var(--surface); border-radius: 7px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-close { position: absolute; right: 11px; top: 7px; border: 0; background: transparent; font-size: 28px; color: var(--muted); cursor: pointer; }
.detail-dialog { overflow: auto; }
.detail-heading { padding-right: 38px; margin-bottom: 18px; }
.detail-heading h2 { font-size: 21px; }
.detail-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-field { display: grid; gap: 5px; min-width: 0; padding: 12px; border: 1px solid #edf0f1; border-radius: 5px; background: #f8faf9; }
.detail-field-wide { grid-column: 1 / -1; }
.detail-label { color: var(--muted); font-size: 11px; }
.detail-value { min-width: 0; color: var(--ink); font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-value a { color: var(--teal-dark); font-weight: 700; text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }
.login-gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(244, 247, 247, .96); }
.login-gate[hidden] { display: none; }
.login-card { width: min(390px, 100%); padding: 34px 32px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 45px rgba(25, 36, 45, .12); }
.login-mark { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 24px; background: var(--teal); color: white; border-radius: 8px; font-size: 18px; font-weight: 700; }
.login-card h1 { font-size: 23px; margin-bottom: 7px; }
.login-subtitle { color: var(--muted); font-size: 12px; margin-bottom: 25px; }
.login-form { display: grid; gap: 15px; }
.login-form .button { width: 100%; margin-top: 3px; }
.login-message { min-height: 18px; color: var(--danger); font-size: 12px; margin-top: 1px; }
.login-captcha { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.captcha-heading, .captcha-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.captcha-heading { color: var(--ink); font-size: 12px; font-weight: 700; }
#captcha-count { color: var(--muted); font-size: 11px; font-weight: 400; }
.captcha-instruction { color: var(--muted); font-size: 11px; }
.captcha-image-label { color: var(--ink); font-size: 11px; font-weight: 700; }
.captcha-thumb-wrap { min-height: 56px; display: flex; align-items: center; }
#captcha-thumb { width: 220px; height: 56px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.captcha-image-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #eef2f2; border-radius: 4px; }
.captcha-image { display: block; width: 100%; height: 100%; object-fit: fill; cursor: crosshair; user-select: none; }
.captcha-dots { position: absolute; inset: 0; pointer-events: none; }
.captcha-dot { position: absolute; width: 24px; height: 24px; transform: translate(-50%, -50%); display: grid; place-items: center; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--teal); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; pointer-events: auto; }
.captcha-refresh { padding: 0; border: 0; background: transparent; color: var(--teal-dark); font: inherit; font-size: 11px; cursor: pointer; }
.captcha-refresh:hover { text-decoration: underline; }
.captcha-status { min-height: 16px; color: var(--muted); font-size: 11px; text-align: right; }
.captcha-status.success { color: #237b5c; }
.captcha-status.error { color: var(--danger); }
@media (max-width: 980px) { .content-grid { grid-template-columns: 1fr; } .results-panel { min-height: auto; } }
@media (max-width: 700px) { .topbar { height: 64px; padding: 0 18px; } .topbar-actions { gap: 8px; } .api-status { font-size: 11px; } .logout-button { padding: 0 7px; } .workspace { padding: 20px 14px 42px; } .search-panel, .results-panel { padding: 20px 16px; } .search-form { grid-template-columns: 1fr 1fr; } .search-form label:nth-child(3) { grid-column: 1 / -1; } .search-form .button { width: 100%; } .detail-content { grid-template-columns: 1fr; } .detail-field-wide { grid-column: auto; } h1 { font-size: 21px; } .login-card { padding: 28px 22px 24px; } }
