:root {
  --ink: #162044;
  --muted: #6a728b;
  --line: #dce1eb;
  --surface: #ffffff;
  --canvas: #f4f6fa;
  --navy: #151b48;
  --indigo: #393881;
  --blue: #315efb;
  --blue-dark: #244ad0;
  --teal: #12a594;
  --danger: #d64a4a;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.landing-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; background: radial-gradient(circle at 72% 20%, #3f458b 0, transparent 32%), linear-gradient(135deg, #11153b 0%, #27265c 58%, #323171 100%); }
.entry-shell { width: min(100%, 456px); padding: 44px; text-align: center; color: #fff; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.09); box-shadow: 0 22px 70px rgba(3,6,35,.3); border-radius: 10px; backdrop-filter: blur(12px); }
.brand-mark { display: grid; width: 48px; height: 48px; margin: 0 auto 20px; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; font-weight: 800; letter-spacing: 0; color: #e3f5ff; }
.eyebrow { margin: 0 0 10px; color: #6a75a8; font-size: 12px; font-weight: 700; letter-spacing: 0; }
.entry-shell .eyebrow { color: #b6bbdd; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: 28px; line-height: 1.25; letter-spacing: 0; }
.entry-copy { margin: 0 auto 30px; color: #c4c8df; font-size: 14px; line-height: 1.7; }
.field-label { display: block; margin: 0 0 8px; text-align: left; color: #d8dbee; font-size: 13px; }
.entry-input, input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); outline: none; transition: border .18s, box-shadow .18s; }
.entry-input { height: 46px; padding: 0 14px; border-color: rgba(255,255,255,.23); background: rgba(255,255,255,.1); color: #fff; }
.entry-input::placeholder { color: #aeb4d1; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,94,251,.13); }
.entry-input:focus { border-color: #a5b8ff; box-shadow: 0 0 0 3px rgba(159,179,255,.2); }
.entry-actions { display: grid; gap: 10px; margin-top: 14px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 700; transition: transform .18s, background .18s, border .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .68; transform: none; }
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 7px 16px rgba(49,94,251,.22); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.11); color: #fff; }
.button-secondary:hover { background: rgba(255,255,255,.18); }
.entry-footer { margin: 25px 0 0; color: #989fc5; font-size: 12px; }
.form-hint { min-height: 19px; margin: 6px 0 0; color: #eea5a5; font-size: 13px; text-align: left; }

.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid #e8ebf2; background: #fff; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; font-weight: 800; text-decoration: none; }
.wordmark span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 5px; background: var(--navy); color: #fff; font-size: 10px; letter-spacing: 0; }
.quiet-link, .back-link { color: #4e5d8c; font-size: 14px; text-decoration: none; }
.quiet-link:hover, .back-link:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.quiet-button { padding: 0; border: 0; background: transparent; color: #4e5d8c; cursor: pointer; font-size: 14px; }
.quiet-button:hover { color: var(--blue); }
.page-wrap { width: min(100% - 40px, 920px); margin: 0 auto; padding: 52px 0 80px; }
.page-intro { margin-bottom: 28px; }
.page-intro h1 { margin: 0 0 9px; font-size: 27px; }
.page-intro p:last-child { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.back-link { display: inline-block; margin-bottom: 28px; }
.report-form, .records-panel { border: 1px solid #e3e7ee; border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px rgba(26,37,71,.04); }
.report-form { padding: 28px; }
.base-fields { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid #edf0f5; }
.field-group { display: block; }
.field-group > span { display: block; margin-bottom: 8px; color: #53607e; font-size: 13px; }
input, select { height: 42px; padding: 0 12px; }
textarea { min-height: 104px; padding: 11px 12px; resize: vertical; line-height: 1.6; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 14px; }
.section-heading h2, .records-header h2 { margin: 0; font-size: 17px; }
.section-heading span { color: #9299ac; font-size: 12px; }
.project-list { display: grid; gap: 12px; margin-bottom: 14px; }
.project-card { padding: 17px; border: 1px solid #e5e8ef; border-radius: 7px; background: #fafbfc; }
.project-card-header { display: flex; align-items: center; justify-content: space-between; height: 18px; margin-bottom: 13px; }
.project-index { color: #42558e; font-size: 13px; font-weight: 700; }
.remove-project { width: 25px; height: 25px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #8d96a9; cursor: pointer; font-size: 22px; line-height: 1; }
.remove-project:hover { background: #ffebeb; color: var(--danger); }
.project-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(160px, .7fr); gap: 14px; }
.content-field { margin-top: 14px; }
.button-outline { border-color: #bfcaf2; background: #fff; color: #3153c5; }
.button-outline:hover { border-color: var(--blue); background: #f5f7ff; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.form-footer .form-hint { margin: 0; }
.submit-button { min-width: 174px; }
.toast { position: fixed; z-index: 2; left: 50%; bottom: 24px; padding: 12px 18px; border-radius: 6px; background: #1d315d; color: #fff; box-shadow: 0 12px 30px rgba(15,24,54,.25); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.admin-wrap { width: min(100% - 40px, 1120px); }
.admin-intro { margin-bottom: 22px; }
.admin-login { width: min(100%, 430px); margin: 40px auto 0; padding: 32px; border: 1px solid #e3e7ee; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(26,37,71,.04); text-align: center; }
.lock-icon { display: grid; width: 42px; height: 42px; margin: 0 auto 16px; place-items: center; border-radius: 50%; background: #eef1ff; color: #3449a4; font-size: 24px; font-weight: 800; }
.admin-login h2 { margin-bottom: 8px; font-size: 19px; }
.admin-login > p { margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.admin-login .field-group { text-align: left; }
.admin-login .button { width: 100%; margin-top: 10px; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; padding: 18px; border: 1px solid #e3e7ee; border-radius: 8px; background: #fff; }
.filters .button { height: 42px; white-space: nowrap; }
.button-text { border-color: #d7dce7; background: #fff; color: #53607e; }
.button-text:hover { border-color: #aeb8cb; }
.records-panel { overflow: hidden; }
.records-header { display: flex; align-items: center; justify-content: space-between; padding: 21px 24px; border-bottom: 1px solid #edf0f5; }
.records-header span { color: #7e879d; font-size: 13px; }
.record-card { border-bottom: 1px solid #edf0f5; }
.record-card:last-child { border-bottom: 0; }
.record-card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 24px; background: #fbfcfe; }
.record-card-header > div { display: flex; align-items: center; gap: 16px; }
.record-date, .record-person { color: #5d6884; font-size: 14px; }
.record-person { color: var(--ink); }
.delete-report { padding: 6px 9px; border: 1px solid #f1c4c4; border-radius: 4px; background: #fff; color: #c84242; cursor: pointer; font-size: 12px; }
.delete-report:hover { background: #fff4f4; }
.delete-report:disabled { opacity: .6; cursor: wait; }
.record-projects { padding: 0 24px; }
.record-project-line { display: grid; grid-template-columns: minmax(180px, .9fr) minmax(250px, 2.2fr); gap: 20px; padding: 17px 0; border-bottom: 1px solid #edf0f5; }
.record-project-line:last-child { border-bottom: 0; }
.record-project { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.record-project strong { font-size: 14px; font-weight: 700; }
.type-tag { padding: 3px 7px; border-radius: 4px; background: #e9f7f5; color: #087a6d; font-size: 12px; }
.record-content { margin: 0; color: #46516d; font-size: 14px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.empty-state { display: grid; min-height: 250px; place-content: center; justify-items: center; color: #9aa2b3; text-align: center; }
.empty-state span { font-size: 28px; color: #bdc5d5; }
.empty-state p { margin: 12px 0 0; font-size: 14px; }

@media (max-width: 720px) {
  .entry-shell { padding: 36px 26px; }
  .topbar { padding: 0 20px; }
  .wordmark { font-size: 13px; }
  .page-wrap, .admin-wrap { width: min(100% - 28px, 920px); padding-top: 36px; }
  .report-form { padding: 20px; }
  .base-fields, .project-fields { grid-template-columns: 1fr; gap: 14px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .submit-button { width: 100%; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field-group:nth-child(3), .filters .field-group:nth-child(4) { grid-column: span 1; }
  .filters .button { grid-column: span 2; }
  .record-project-line { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 420px) {
  .quiet-link { font-size: 12px; }
  .wordmark { gap: 7px; font-size: 12px; }
  .filters { grid-template-columns: 1fr; }
  .filters .field-group:nth-child(3), .filters .field-group:nth-child(4), .filters .button { grid-column: span 1; }
}
