:root {
  color-scheme: light;
  --ink: #102d42;
  --muted: #4c6070;
  --blue: #155a84;
  --soft: #e9f2f8;
  --line: #d1dce4;
  --bg: #f1f5f8;
  --paper: #fff;
  --red: #9e342b;
  --amber: #725115;
  --green: #17624f;
  font-family: 'Microsoft YaHei UI', 'PingFang SC', 'Noto Sans CJK SC', system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--blue); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2688af; outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h2 { font-size: 1.24rem; line-height: 1.4; }
h3 { font-size: 1.03rem; }
.shell { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.topbar { background: var(--ink); color: #fff; }
.top-inner { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 1rem; font-weight: 700; white-space: nowrap; color: inherit; text-decoration: none; }
.brand-mark { display: grid; gap: 3px; align-content: center; width: 28px; height: 31px; border: 1px solid #9fbbcc; border-radius: 4px 4px 7px 7px; padding: 5px; }
.brand-mark i { height: 1px; background: #c7e1f4; }
.brand-mark i:last-child { width: 65%; }
nav { display: flex; align-items: center; gap: 22px; color: #c1d0db; white-space: nowrap; }
nav a, .nav-quiet { position: relative; color: inherit; text-decoration: none; background: none; border: 0; font-size: .88rem; padding: 0 0 3px; }
nav a:hover, .nav-quiet:hover, nav a[aria-current] { color: #fff; }
nav a[aria-current]::after { content: ''; background: #93cfeb; height: 2px; position: absolute; inset: auto 0 0; }
.hero { display: flex; align-items: center; justify-content: space-between; padding: 45px 0 34px; gap: 22px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--blue); font-size: .88rem; font-weight: 700; }
.eyebrow span { width: 13px; height: 1px; background: #7092a6; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.2; letter-spacing: -.045em; margin: 9px 0 12px; }
.hero p:last-child { color: var(--muted); }
.deadline { border-inline-start: 2px solid #6d9fbc; padding: 1px 0 1px 20px; min-width: 186px; display: grid; gap: 2px; }
.deadline > span { color: var(--muted); font-size: .87rem; }
.deadline strong { font-variant-numeric: tabular-nums; font-size: 2.6rem; line-height: 1.08; letter-spacing: -.06em; white-space: nowrap; }
.deadline strong span { font-size: .65em; color: #64839a; }
.deadline small { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.member-grid { display: grid; grid-template-columns: minmax(0, 1.88fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.main-column, .instructions { display: grid; align-content: start; gap: 22px; min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px; min-width: 0; }
.panel-head, .dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.panel-head > div { min-width: 0; }
.panel-head p, .section-row p, .submit-actions > span { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.mobile-billing { display: none; }
.ticket { position: relative; overflow: hidden; border-radius: 12px 12px 4px 4px; border: 1px solid #aac5d8; background: #e1eef7; padding: 19px 21px 23px; }
.ticket-label { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.ticket-label h2 { font-size: 1.08rem; }
.paper-mark { position: relative; display: block; width: 15px; height: 19px; border: 1.5px solid var(--blue); border-radius: 2px; }
.paper-mark::after { position: absolute; content: ''; inset: 6px 3px 5px; border-block: 1px solid var(--blue); }
.ticket-field { display: flex; align-items: end; justify-content: space-between; gap: 8px; border-bottom: 1px dashed #a7c0d1; padding: 10px 0; }
.ticket-field > div { min-width: 0; }
.ticket-field span, .ticket-field strong { display: block; }
.ticket-field span { font-size: .85rem; color: #3d5b70; }
.ticket-field strong { font-size: 1.13rem; margin-top: 1px; overflow-wrap: anywhere; }
.ticket-field .digits { letter-spacing: .015em; font-family: Consolas, 'SFMono-Regular', monospace; }
.ticket-strip { position: absolute; inset: auto 0 0; height: 5px; background: repeating-linear-gradient(90deg, #1d5478 0 19px, #337fa7 19px 25px, #9dc3da 25px 28px); }
.copy { padding: 3px 8px; color: var(--blue); border: 1px solid #9fbacf; border-radius: 5px; background: #f3f9fc; font-size: .86rem; flex: none; }
.guidelines { padding: 1px 1px 0; }
.guidelines h2 { font-size: 1.08rem; margin-bottom: 8px; }
.guidelines dl > div { border-bottom: 1px solid var(--line); padding: 12px 0; }
.guidelines dt { font-weight: 700; font-size: .94rem; }
.guidelines dd, .sign-reminder { font-size: .88rem; color: var(--muted); margin-top: 2px; }
.sign-reminder { padding: 12px 13px; margin-top: 14px; background: #e5edf3; border-radius: 5px; }
form { margin-top: 18px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
label { display: block; min-width: 0; font-weight: 600; font-size: .9rem; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 42px; display: block; background: #fff; border: 1px solid #bacbd7; border-radius: 6px; padding: 8px 10px; font-size: .95rem; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #637682; opacity: 1; }
label > input:not([type=checkbox]), label > select, label > textarea { margin-top: 5px; }
select { appearance: none; padding-right: 32px; background: linear-gradient(45deg, transparent 50%, #406079 50%) right 16px center / 5px 5px, linear-gradient(135deg, #406079 50%, transparent 50%) right 11px center / 5px 5px, #fff; background-repeat: no-repeat; }
textarea { resize: vertical; }
.input-action, .toolbar, .recognition, .submit-actions, .attachment-actions, .dialog-actions { display: flex; align-items: center; gap: 10px; }
.input-action { margin-top: 5px; }
.primary, .secondary, .quiet { min-height: 40px; border-radius: 6px; padding: 7px 12px; white-space: nowrap; font-size: .9rem; font-weight: 700; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; flex: none; }
.primary { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.primary:hover { background: #114566; border-color: #114566; }
.secondary { color: var(--blue); background: #f7fafc; border: 1px solid #abc4d7; }
.secondary:hover, .copy:hover { background: #dcecf7; }
.quiet { color: var(--blue); background: transparent; border: 1px solid transparent; padding-inline: 7px; }
.quiet:hover { background: var(--soft); }
.section-row { display: flex; align-items: start; gap: 10px; margin: 19px 0 12px; }
.section-row.divider { border-top: 1px solid #e3eaf0; padding-top: 17px; }
.step { height: 25px; min-width: 25px; display: grid; place-content: center; background: #e1edf6; color: #174f76; border-radius: 50%; font-size: .84rem; font-weight: 700; }
.dropzone { position: relative; cursor: pointer; display: grid; place-items: center; gap: 3px; min-height: 140px; padding: 12px; text-align: center; background: #f3f8fc; border: 1px dashed #6e9bbb; border-radius: 9px; overflow-wrap: anywhere; }
.dropzone:hover, .dropzone.dragging { background: #e3f1fb; border-color: var(--blue); }
.dropzone:focus-within { outline: 3px solid #2688af; outline-offset: 3px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0 !important; }
.dropzone small { color: var(--muted); font-weight: 400; font-size: .84rem; }
.upload-symbol { display: grid; place-items: center; border: 1px solid #94b5ca; background: #e8f2f9; color: var(--blue); width: 33px; height: 33px; border-radius: 6px; font-size: 1.25rem; line-height: 1; }
.recognition { margin-top: 9px; flex-wrap: wrap; }
.recognition > span { flex: 1 1 150px; font-size: .85rem; color: var(--muted); }
.fields, .files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.required { color: var(--red); }
input[type=file]:not(#invoice-file) { padding: 4px; max-width: 100%; }
input::file-selector-button { border: 0; padding: 5px 8px; margin-right: 8px; border-radius: 4px; background: var(--soft); color: var(--blue); cursor: pointer; }
.checkline { display: flex; align-items: start; gap: 9px; margin-top: 13px; font-weight: 400; }
input[type=checkbox] { accent-color: var(--blue); width: 17px; height: 17px; flex: none; margin: 3px 0 0; }
.signature { padding: 12px; background: #eef5fa; border-radius: 5px; }
.submit-actions { margin-top: 16px; flex-wrap: wrap; }
.feedback, .callout { font-size: .9rem; margin-top: 12px; border-left: 3px solid #b68a45; color: var(--amber); background: #fff7e6; padding: 8px 10px; overflow-wrap: anywhere; }
.feedback.error, .callout.error { color: var(--red); background: #fbefec; border-color: #c2695e; }
.feedback.success { color: var(--green); background: #edf7f2; border-color: #60aa91; }
.admin-login { max-width: 660px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: #dfeef8; border: 1px solid #acc5d8; border-radius: 9px; margin-bottom: 21px; }
.stat { padding: 16px 20px; border-right: 1px solid #acc5d8; min-width: 0; }
.stat:last-child { border-right: 0; }
.stat span { font-size: .87rem; color: var(--muted); }
.stat strong { display: block; font-variant-numeric: tabular-nums; font-size: clamp(1.15rem, 3vw, 1.65rem); line-height: 1.4; overflow-wrap: anywhere; }
#admin-dashboard > .panel + .panel { margin-top: 20px; }
.toolbar { margin: 14px 0; flex-wrap: wrap; }
.toolbar label:first-child { flex: 1 1 215px; }
.toolbar .invite-token { flex: 2 1 240px; }
.toolbar label > input, .toolbar label > select { margin: 0; }
.project-record { border-top: 1px solid var(--line); padding: 13px 0; }
.project-title { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.project-title > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.project-title p, .print-history span, .print-note, .handoff-status span { font-size: .88rem; color: var(--muted); }
.project-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 4px; flex-shrink: 0; }
.print-history { list-style: none; display: grid; gap: 6px; padding: 0; margin: 9px 0 0; }
.print-history li { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.print-history a { font-size: .9rem; font-weight: 700; }
.print-note { background: var(--soft); padding: 9px 10px; border-radius: 5px; margin-top: 4px; }
.handoff-status { display: grid; gap: 3px; margin-top: 12px; padding: 10px 12px; background: var(--soft); border-radius: 5px; overflow-wrap: anywhere; }
#handoff-form [type=datetime-local], #handoff-review [type=datetime-local] { min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 14px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; vertical-align: middle; padding: 10px 9px; border-bottom: 1px solid #e1e8ee; }
th { white-space: nowrap; background: #eaf2f8; font-size: .86rem; }
td.compact { white-space: nowrap; }
td .quiet { white-space: nowrap; min-height: 32px; padding-block: 3px; }
.badge { border-radius: 20px; padding: 3px 8px; font-size: .82rem; font-weight: 700; white-space: nowrap; background: #e7f1f9; color: #21597e; }
.badge.approved { background: #e7f4ee; color: var(--green); }
.badge.returned { background: #faece9; color: var(--red); }
.empty { padding: 20px 0 6px; color: var(--muted); }
.empty + .feedback { margin-top: 6px; }
footer { padding: 24px 0; color: var(--muted); font-size: .85rem; }
dialog { border: 1px solid #9db9ce; border-radius: 10px; padding: 0; max-height: 88dvh; width: min(680px, calc(100% - 30px)); color: var(--ink); }
dialog::backdrop { background: #102d4290; }
.dialog-head { padding: 13px 20px; background: #edf4fa; border-bottom: 1px solid var(--line); align-items: center; }
#dialog-body { padding: 16px 20px 22px; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 15px; margin-bottom: 16px; }
.detail-grid dt { color: var(--muted); font-size: .85rem; }
.detail-grid dd { font-size: .95rem; }
.attachment-list { display: grid; gap: 5px; margin: 8px 0 14px; }
.attachment-list > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 8px; background: #f0f5f9; border-radius: 5px; }
.attachment-list strong, .attachment-list small { display: block; }
.attachment-list small { color: var(--muted); }
.attachment-actions { flex-wrap: wrap; justify-content: end; }
.preview-media { display: block; max-width: 100%; max-height: 60dvh; object-fit: contain; margin: 9px auto; }
.dialog-actions { margin-top: 12px; flex-wrap: wrap; }
.dialog-separator { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.review-fields { margin-top: 11px; }
.full { grid-column: 1 / -1; }
.toast { position: fixed; z-index: 2; inset: auto 18px 18px auto; background: var(--ink); color: white; padding: 8px 14px; border-radius: 6px; max-width: calc(100% - 36px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .shell { width: calc(100% - 44px); }
  .member-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
  .panel { padding: 20px 17px; }
  .ticket { padding-inline: 13px; }
}
@media (max-width: 630px) {
  .shell { width: calc(100% - 28px); }
  .top-inner { min-height: 57px; gap: 7px; }
  .brand { gap: 6px; font-size: .88rem; }
  .brand-mark { width: 22px; height: 25px; padding: 4px; }
  nav { gap: 9px; }
  nav a, .nav-quiet { font-size: .78rem; }
  .hero { padding: 24px 0 20px; align-items: end; gap: 9px; }
  .hero h1 { margin-block: 4px 8px; }
  .hero p:last-child { font-size: .88rem; }
  .deadline { min-width: 101px; padding-inline-start: 8px; }
  .deadline strong { font-size: 1.85rem; }
  .deadline small { font-size: .72rem; white-space: normal; }
  .member-grid { grid-template-columns: minmax(0, 1fr); }
  .instructions { gap: 9px; }
  .mobile-billing { display: inline-block; font-size: .88rem; margin-top: 5px; }
  .guidelines dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .guidelines dl > div { padding: 2px 0 5px; }
  .guidelines dd { font-size: .84rem; }
  .sign-reminder { margin-top: 8px; }
  .project-title { flex-wrap: wrap; }
  .project-actions { justify-content: start; flex: 1 1 160px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid #acc5d8; }
}
@media (max-width: 395px) {
  .fields, .files { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 1.77rem; }
  .input-action { flex-wrap: wrap; }
}
