/* Customer tasks use one quiet workspace; the admin interface keeps its own layout. */
.customer-workspace {
  --accent: #17191c;
  --text: #17191c;
  --muted: #666b73;
  --line: #dfe1e5;
  --soft: #eff0f2;
  --bg: #f5f6f7;
  --surface: #fff;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
.customer-workspace :is(a,button,input,textarea,summary,[tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.customer-workspace .btn { min-height: 44px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 14px; line-height: 1.5; font-weight: 550; justify-content: center; box-shadow: none; }
.customer-workspace .btn:hover { background: var(--soft); border-color: #b9bec6; }
.customer-workspace .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.customer-workspace .btn.primary:hover { background: #303338; }
.customer-workspace .btn.text { border: 0; background: transparent; padding: 8px 12px; }
.customer-workspace .btn:disabled { opacity: .5; cursor: not-allowed; }
.customer-header { height: 76px; border-bottom: 1px solid var(--line); background: var(--bg); }
.customer-header-inner { height: 100%; max-width: 1200px; margin: auto; padding: 0 40px; display: flex; align-items: center; gap: 48px; }
.customer-header .brand { font-size: 19px; gap: 11px; white-space: nowrap; }
.customer-header .brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); }
.customer-header nav { align-self: stretch; display: flex; }
.customer-header nav a { display: flex; align-items: center; padding: 0 2px; border-bottom: 2px solid var(--accent); font-weight: 550; }
.customer-account { position: relative; margin-left: auto; border: 0; }
.customer-account summary { display: flex; align-items: center; gap: 10px; cursor: pointer; border-radius: 8px; min-height: 44px; padding: 0; list-style: none; }
.customer-account summary span { color: var(--text); }
.customer-account[open] summary span { transform: none; }
.customer-account summary::-webkit-details-marker { display: none; }
.customer-avatar { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--soft); font-size: 12px; }
.customer-account-label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.customer-account-menu { position: absolute; top: calc(100% + 12px); right: 0; width: 260px; max-width: calc(100vw - 32px); z-index: 40; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #17191c0c; }
.customer-account-menu b { display: block; overflow-wrap: anywhere; }
.customer-account-menu p { margin: 4px 0 16px; padding: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.customer-account-menu .btn { width: 100%; border-top: 1px solid var(--line); border-radius: 0; justify-content: flex-start; padding: 14px 0 0; }
.customer-content { max-width: 1200px; padding: 44px 40px 80px; margin: auto; }
.customer-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 32px; }
.customer-page-heading h1 { font-size: 30px; font-weight: 600; line-height: 1.4; letter-spacing: -.03em; margin: 0; overflow-wrap: anywhere; }
.customer-page-heading > .btn { flex-shrink: 0; }
.customer-list-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.customer-project-count { margin-right: auto; font-size: 12px; color: var(--muted); }
.customer-list-tools > .btn { flex-shrink: 0; }
.customer-filters { display: flex; gap: 6px; }
.customer-filters .btn { min-height: 36px; padding: 7px 16px; border-color: transparent; background: transparent; font-size: 13px; font-weight: 400; }
.customer-filters .btn.is-active { background: var(--surface); border-color: var(--line); color: var(--text); font-weight: 550; }
.customer-project-table { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; overflow: hidden; }
.customer-project-columns,.customer-project-row { display: grid; grid-template-columns: minmax(0,1fr) 132px 120px 104px; align-items: center; column-gap: 24px; padding: 0 24px; }
.customer-project-columns { min-height: 46px; background: #fafbfc; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.customer-projects { margin: 0; padding: 0; list-style: none; }
.customer-project-row { min-height: 112px; padding-block: 24px; }
.customer-project-row + .customer-project-row { border-top: 1px solid var(--line); }
.customer-project-name { display: flex; align-items: center; gap: 16px; min-width: 0; }
.customer-project-name > div { min-width: 0; }
.customer-document { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 50px; background: var(--soft); border-radius: 6px; color: #555b64; }
.customer-document svg { width: 22px; height: 22px; }
.customer-project-name h2 { margin: 0 0 5px; font-size: 16px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.customer-project-name h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.customer-project-name p { color: var(--muted); font-size: 12px; margin: 0; }
.customer-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.customer-state::before { content: ''; width: 6px; height: 6px; background: #9298a0; border-radius: 50%; flex-shrink: 0; }
.customer-state.is-delivered::before { background: var(--accent); }
.customer-project-payment { display: flex; flex-direction: column; gap: 3px; }
.customer-project-payment strong { font-weight: 550; font-size: 16px; font-variant-numeric: tabular-nums; }
.customer-project-payment small,.customer-order-total small { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.customer-project-payment > span { color: var(--muted); font-size: 12px; }
.customer-workspace .customer-row-action { padding-inline: 12px; font-size: 13px; min-height: 38px; }
.customer-empty { padding: 68px 24px; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.customer-empty .customer-document { margin: 0 auto 22px; }
.customer-empty h2 { font-size: 20px; margin-bottom: 10px; font-weight: 550; }
.customer-empty p { color: var(--muted); line-height: 1.8; }

/* A single submission sheet; required material has the strongest emphasis. */
.customer-submit-page { max-width: 880px; margin: auto; }
.customer-workspace .mvp-submit-form { max-width: none; padding: 32px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.customer-workspace .mvp-upload-group h2 { font-size: 15px; font-weight: 550; margin: 0 0 12px; gap: 10px; }
.customer-workspace .mvp-upload-group h2 small { font-size: 12px; font-weight: 400; color: var(--muted); }
.customer-workspace .mvp-drop { min-height: 108px; padding: 20px; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; border: 1px dashed #c5c9cf; border-radius: 8px; background: var(--bg); text-align: left; }
.customer-workspace .mvp-drop:hover,.customer-workspace .mvp-drop.drag-over { background: var(--soft); border-color: var(--accent); }
.customer-workspace .mvp-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.customer-workspace .customer-upload-manual .mvp-drop { min-height: 148px; justify-content: center; }
.customer-upload-icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 40px; color: var(--text); }
.customer-upload-icon svg { width: 26px; height: 26px; }
.customer-upload-manual .customer-upload-icon { width: 44px; height: 54px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.customer-upload-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.customer-workspace .mvp-drop strong { font-size: 14px; font-weight: 550; color: var(--text); }
.customer-upload-copy > span { font-size: 12px; line-height: 1.7; color: var(--muted); }
.customer-workspace .mvp-optional-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; margin: 28px 0; }
.customer-workspace .field { margin-bottom: 0; font-size: 14px; font-weight: 550; gap: 12px; }
.customer-workspace .field textarea { min-height: 80px; width: 100%; padding: 12px 14px; font: inherit; font-size: 14px; font-weight: 400; line-height: 1.6; resize: vertical; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); }
.customer-workspace .field textarea::placeholder { font-size: 13px; color: #777d86; font-weight: 400; }
.customer-workspace .mvp-submit-footer { display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.customer-workspace .mvp-consent { font-size: 12px; line-height: 1.8; color: var(--muted); max-width: 490px; gap: 9px; }
.customer-workspace .mvp-consent input { width: 16px; height: 16px; margin-top: 3px; }
.customer-workspace .mvp-submit-footer > .btn { flex-shrink: 0; min-width: 124px; }
.customer-workspace .mvp-file { font-size: 13px; padding: 12px 0; gap: 10px; }
.customer-workspace .mvp-file .btn { font-size: 12px; min-height: 36px; }
.customer-workspace .form-error { margin: 18px 0 0; }

/* Progress and delivery lead; order metadata stays in a quiet supporting column. */
.customer-detail-heading h1 { max-width: 850px; }
.customer-progress { padding: 28px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 32px; }
.customer-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.customer-section-heading h2,.customer-order h2 { margin: 0; font-size: 16px; font-weight: 600; }
.customer-section-heading > span { color: var(--muted); font-size: 12px; }
.customer-stages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; list-style: none; padding: 0; margin: 0; }
.customer-stages li { position: relative; display: flex; align-items: center; gap: 10px; color: #7c828b; }
.customer-stages li::after { content: ''; flex: 1; height: 1px; margin: 0 18px; background: var(--line); }
.customer-stages li:last-child::after { display: none; }
.customer-stages li:last-child { justify-content: flex-end; }
.customer-stages li > span { height: 28px; width: 28px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.customer-stages li b { font-size: 13px; font-weight: 450; white-space: nowrap; }
.customer-stages .is-current { color: var(--text); }
.customer-stages .is-current b { font-weight: 600; }
.customer-stages .is-current > span { background: var(--accent); border-color: var(--accent); color: white; }
.customer-stages .is-complete > span { background: var(--soft); color: var(--text); }
.customer-progress-note { margin: 24px 0 0; font-size: 13px; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--line); }
.customer-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 292px; gap: 40px; align-items: start; }
.customer-detail-main { display: grid; gap: 24px; min-width: 0; }
.customer-panel { padding: 28px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.customer-panel .customer-section-heading { margin-bottom: 16px; }
.customer-files { display: flex; flex-direction: column; }
.customer-file { display: flex; align-items: center; gap: 14px; padding: 16px 0; }
.customer-file + .customer-file { border-top: 1px solid var(--line); }
.customer-file-icon { color: var(--muted); flex-shrink: 0; display: flex; }
.customer-file-icon svg { width: 22px; height: 22px; }
.customer-file-name { min-width: 0; flex: 1; }
.customer-file-name b { display: block; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.customer-file-name small { font-size: 12px; color: var(--muted); display: block; margin-top: 3px; }
.customer-file-action { font-size: 12px; flex-shrink: 0; }
.customer-file:hover .customer-file-name b { text-decoration: underline; text-underline-offset: 4px; }
.customer-links { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 20px; }
.customer-links h3 { font-size: 13px; margin: 0 0 12px; font-weight: 550; }
.customer-links a { display: flex; align-items: baseline; gap: 12px; margin-top: 8px; overflow-wrap: anywhere; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.customer-links a span { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.customer-delivery > .btn { margin: 4px 0 18px; }
.customer-delivery .customer-files { border-top: 1px solid var(--line); padding-top: 6px; }
.customer-detail-aside { min-width: 0; padding-top: 6px; }
.customer-order-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 24px; }
.customer-order-total strong { font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.customer-order-total > span { color: var(--muted); font-size: 12px; }
.customer-order dl { border-top: 1px solid var(--line); margin: 0; padding-top: 18px; display: grid; gap: 16px; }
.customer-order dl > div { display: grid; grid-template-columns: 68px minmax(0,1fr); gap: 12px; }
.customer-order dt { color: var(--muted); font-size: 12px; }
.customer-order dd { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.customer-payment-note { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.customer-events { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 28px; padding-top: 8px; }
.customer-events summary { cursor: pointer; font-size: 14px; font-weight: 550; padding: 14px 0; }
.customer-events summary::after { content: '+'; color: var(--muted); font-weight: 400; }
.customer-events[open] summary::after { content: '−'; }
.customer-events ol { list-style: none; margin: 4px 0 0; padding: 0; }
.customer-events li { margin: 0 0 20px; padding-left: 14px; border-left: 1px solid var(--line); }
.customer-events b { font-size: 13px; font-weight: 500; }
.customer-events p { color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; padding: 0; }
.customer-events time { color: var(--muted); font-size: 11px; display: block; margin-top: 8px; }

@media (max-width: 900px) {
  .customer-header-inner { padding-inline: 28px; gap: 32px; }
  .customer-content { padding: 32px 28px 64px; }
  .customer-project-columns,.customer-project-row { grid-template-columns: minmax(0,1fr) 100px 88px 90px; gap: 16px; padding-inline: 20px; }
  .customer-project-name { gap: 12px; }
  .customer-detail-grid { grid-template-columns: minmax(0,1fr) 240px; gap: 24px; }
  .customer-panel,.customer-progress { padding: 24px; }
  .customer-stages li { gap: 7px; }
  .customer-stages li::after { margin: 0 10px; }
}
@media (max-width: 680px) {
  .customer-header { height: 64px; }
  .customer-header-inner { padding-inline: 20px; gap: 24px; }
  .customer-header .brand { font-size: 17px; gap: 8px; }
  .customer-header .brand-mark { width: 30px; height: 30px; }
  .customer-header nav a { font-size: 13px; }
  .customer-account-label { display: none; }
  .customer-content { padding: 30px 20px 56px; }
  .customer-page-heading { gap: 16px; margin-bottom: 26px; align-items: flex-start; }
  .customer-page-heading h1 { font-size: 26px; }
  .customer-page-heading > .btn { padding: 9px 14px; min-height: 40px; font-size: 13px; }
  .customer-list-tools { gap: 8px; }
  .customer-project-count { display: none; }
  .customer-list-tools > .btn { min-height: 40px; padding: 9px 14px; font-size: 13px; }
  .customer-filters { gap: 2px; }
  .customer-filters .btn { padding-inline: 12px; }
  .customer-project-columns { display: none; }
  .customer-project-row { grid-template-columns: minmax(0,1fr) auto; gap: 18px 12px; padding: 22px 20px; }
  .customer-project-name { grid-column: 1/-1; }
  .customer-project-status { grid-column: 1; grid-row: 2; }
  .customer-project-payment { grid-column: 1; grid-row: 3; flex-direction: row; gap: 12px; align-items: baseline; }
  .customer-workspace .customer-row-action { grid-column: 2; grid-row: 2/4; align-self: end; }
  .customer-workspace .mvp-submit-form { padding: 24px 20px; }
  .customer-workspace .mvp-optional-grid { grid-template-columns: 1fr; gap: 24px; }
  .customer-workspace .mvp-drop { min-height: 100px; padding: 18px 14px; }
  .customer-workspace .customer-upload-manual .mvp-drop { min-height: 132px; }
  .customer-workspace .field textarea { font-size: 16px; min-height: 88px; }
  .customer-workspace .mvp-submit-footer { flex-direction: column; align-items: stretch; gap: 20px; margin-top: 24px; }
  .customer-workspace .mvp-submit-footer > .btn { width: 100%; }
  .customer-detail-heading { align-items: center; }
  .customer-detail-heading h1 { font-size: 24px; }
  .customer-detail-heading > .btn { padding-inline: 12px; }
  .customer-progress,.customer-panel { padding: 24px 20px; }
  .customer-section-heading { align-items: flex-start; }
  .customer-progress .customer-section-heading { flex-direction: column; gap: 5px; }
  .customer-stages { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .customer-stages li { flex-direction: column; align-items: center; gap: 8px; }
  .customer-stages li:last-child { align-items: center; justify-content: flex-start; }
  .customer-stages li::after { position: absolute; top: 14px; left: calc(50% + 20px); width: calc(100% - 40px); margin: 0; }
  .customer-stages li b { font-size: 12px; }
  .customer-detail-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .customer-detail-aside { padding: 0 4px; }
  .customer-order dl { gap: 16px; }
  .customer-order-total { margin-block: 12px 18px; }
}
@media (max-width: 380px) {
  .customer-header-inner { padding-inline: 16px; gap: 18px; }
  .customer-header .brand { font-size: 15px; }
  .customer-content { padding-inline: 16px; }
  .customer-page-heading { flex-wrap: wrap; }
  .customer-detail-heading > .btn { margin-top: 0; }
  .customer-filters .btn { padding-inline: 8px; }
  .customer-workspace .mvp-submit-form,.customer-panel,.customer-progress { padding-inline: 16px; }
  .customer-workspace .customer-upload-manual .mvp-drop { flex-direction: column; text-align: center; gap: 12px; padding-block: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .customer-workspace .btn { transition: none; }
}
