:root {
  --navy: #102a43;
  --navy-deep: #0b1f33;
  --ink: #243b53;
  --muted: #627d98;
  --line: #d9e2ec;
  --soft: #f5f8fb;
  --paper: #ffffff;
  --accent: #d97706;
  --accent-dark: #b45309;
  --success: #16794c;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.site-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--navy); font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--navy); font-size: 14px; font-weight: 800; }
.topbar-note, .admin-exit { color: var(--muted); font-size: 13px; }
.admin-exit:hover { color: var(--navy); }
.hero { padding: 72px 0 52px; }
.eyebrow, .section-label { color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.hero h1 { max-width: 680px; margin: 9px 0 12px; color: var(--navy); font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -.03em; }
.hero p { max-width: 570px; margin: 0; color: var(--muted); font-size: 16px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 32px; align-items: start; padding-bottom: 88px; }
.panel { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(16, 42, 67, .06); }
.form-panel { padding: 34px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel h2, .dashboard h2 { margin: 6px 0 0; color: var(--navy); font-size: 22px; letter-spacing: -.015em; }
.required { color: var(--accent-dark); font-size: 12px; }
.upload-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 250px; margin-top: 24px; padding: 28px; overflow: hidden; border: 1px dashed #9fb3c8; background: #fbfcfe; color: var(--muted); text-align: center; cursor: pointer; transition: border .2s, background .2s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--accent); background: #fffaf2; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border: 1px solid #bdcddd; color: var(--navy); font-size: 24px; line-height: 1; }
.upload-zone strong { color: var(--navy); font-size: 15px; }
.upload-zone span:not(.upload-icon) { margin-top: 5px; font-size: 12px; }
.preview { display: none; width: min(210px, 100%); max-height: 210px; margin-top: 18px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.preview.visible { display: block; }
.note-heading { margin-top: 34px; }
.field-label { display: block; margin: 20px 0 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
textarea, input[type="password"] { width: 100%; border: 1px solid #b8c7d6; background: #fff; color: var(--ink); outline: none; transition: border .2s, box-shadow .2s; }
textarea { min-height: 128px; padding: 13px 14px; resize: vertical; }
input[type="password"] { height: 46px; padding: 0 14px; }
textarea:focus, input[type="password"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 119, 6, .12); }
.field-meta { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 12px; }
.field-meta b { color: var(--ink); font-weight: 600; }
.primary-button { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: space-between; margin-top: 26px; padding: 0 18px; border: 0; background: var(--navy); color: #fff; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.primary-button:hover { background: var(--navy-deep); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.form-message { min-height: 20px; margin: 13px 0 0; font-size: 13px; }
.form-message.success { color: var(--success); }
.form-message.error { color: var(--danger); }
.success-notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px; border: 1px solid #a8d4bc; background: #f0faf4; color: var(--success); }
.success-mark { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--success); color: #fff; font-size: 14px; font-weight: 800; }
.success-notice strong { display: block; font-size: 14px; }
.success-notice p { margin: 2px 0 0; color: #28734d; font-size: 12px; }
.side-column { padding-top: 10px; }
.info-block { padding: 12px 0 28px; border-bottom: 1px solid var(--line); }
.notice-list { list-style: none; margin: 22px 0 0; padding: 0; }
.notice-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.notice-list li > span { color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.notice-list p { margin: 0; color: var(--muted); font-size: 13px; }
.contact-strip { display: flex; gap: 12px; align-items: center; padding-top: 27px; }
.contact-dot { width: 9px; height: 9px; background: #2f855a; border-radius: 50%; box-shadow: 0 0 0 5px #d9f2e3; }
.contact-strip strong { display: block; color: var(--navy); font-size: 13px; }
.contact-strip p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.footer { display: flex; justify-content: space-between; padding: 18px 0 25px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.admin-hero { padding-bottom: 40px; }
.login-panel { width: min(520px, 100%); margin: 0 auto 100px; padding: 34px; }
.login-panel > p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.dashboard { padding-bottom: 80px; }
.dashboard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.count-badge { display: inline-grid; place-items: center; min-width: 28px; height: 24px; margin-left: 5px; padding: 0 7px; background: #e6eef5; color: var(--navy); font-size: 12px; vertical-align: 2px; }
.toolbar-actions { display: flex; gap: 8px; }
.ghost-button { min-height: 38px; padding: 0 13px; border: 1px solid #b8c7d6; background: #fff; color: var(--navy); font-size: 13px; cursor: pointer; }
.ghost-button:hover { border-color: var(--navy); }
.records { display: grid; gap: 12px; }
.record { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--line); background: #fff; }
.record-image { display: block; width: 132px; height: 132px; object-fit: contain; border: 1px solid var(--line); background: #fff; cursor: zoom-in; transition: border-color .2s, box-shadow .2s; }
.record-image:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 119, 6, .14); }
.record-meta { min-width: 0; }
.record-time { color: var(--muted); font-size: 12px; }
.record-note { margin: 10px 0 0; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.record-id { margin-top: 12px; color: #829ab1; font-family: Consolas, monospace; font-size: 10px; }
.delete-button { align-self: start; border: 0; background: none; color: var(--danger); font-size: 12px; cursor: pointer; }
.delete-button:hover { text-decoration: underline; }
.empty-state { padding: 68px 20px; border: 1px dashed #b8c7d6; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 14px; border: 1px solid #a8d4bc; color: var(--success); }
.empty-state h3 { margin: 0; color: var(--navy); font-size: 17px; }
.empty-state p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.image-modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(11, 31, 51, .78); }
.image-modal-content { position: relative; display: flex; width: min(620px, 100%); max-height: min(820px, 100%); flex-direction: column; align-items: center; padding: 28px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.image-modal-close { position: absolute; top: 8px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--navy); font-size: 30px; line-height: 1; cursor: pointer; }
.image-modal-close:hover { color: var(--accent-dark); }
.image-modal-image { display: block; width: min(520px, 100%); max-height: min(680px, 72vh); margin-top: 18px; object-fit: contain; background: #fff; }
.image-modal-content p { margin: 15px 0 0; color: var(--muted); font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .site-shell { width: min(100% - 28px, 620px); }
  .topbar { min-height: 64px; }
  .topbar-note { display: none; }
  .hero { padding: 52px 0 36px; }
  .hero h1 { font-size: 40px; }
  .content-grid { grid-template-columns: 1fr; gap: 34px; padding-bottom: 60px; }
  .form-panel, .login-panel { padding: 24px; }
  .side-column { padding-top: 0; }
  .footer { gap: 12px; flex-direction: column; }
  .dashboard-toolbar { align-items: flex-start; flex-direction: column; }
  .record { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  .record-image { width: 88px; height: 88px; }
  .delete-button { grid-column: 2; justify-self: start; margin-top: -4px; }
}
