:root { --ink: #172c42; --muted: #6c7d8e; --accent: #246b64; }
body { background: #f4f7fa; color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; min-height: 100vh; margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #174f49; text-decoration: underline; }
.site-header { max-width: 1200px; margin: auto; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 19px; font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: white; border-radius: 11px; font-size: 18px; }
.header-note { font-size: 13px; color: var(--muted); }
.page-shell { max-width: 1120px; margin: 0 auto; padding: 24px 32px 48px; }
.page-shell { overflow-wrap: anywhere; }
.auth-layout { min-height: 650px; display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: center; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 650; letter-spacing: 2px; margin-bottom: 20px; }
.auth-intro h1 { font-size: clamp(36px, 4vw, 50px); line-height: 1.4; letter-spacing: -1px; font-weight: 750; margin-bottom: 24px; }
.auth-intro p { color: var(--muted); font-size: 17px; line-height: 1.9; }
.intro-note { margin-top: 42px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.note-dot { width: 8px; height: 8px; border-radius: 50%; background: #60a798; }
.account-card { background: white; border: 1px solid #e4eaf0; border-radius: 24px; padding: 36px; box-shadow: 0 16px 48px #203a5410; }
.account-card h1, .account-card h2 { font-size: 26px; font-weight: 700; margin: 0 0 12px; }
.auth-tabs { display: flex; background: #f1f5f7; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 28px; }
.auth-tabs a { flex: 1; text-align: center; color: var(--muted); padding: 10px; border-radius: 9px; font-size: 14px; }
.auth-tabs a.active { background: white; color: var(--ink); font-weight: 650; box-shadow: 0 2px 6px #203a540a; }
.card-description { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 28px; }
.form-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-control { min-height: 46px; border-color: #dbe3eb; border-radius: 10px; font-size: 15px; }
.form-control:focus { border-color: #4e928a; box-shadow: 0 0 0 3px #246b641a; }
.form-text { font-size: 12px; line-height: 1.7; margin-top: 7px; color: var(--muted); }
.form-text ul { padding-left: 20px; margin-bottom: 0; }
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-row .form-control { min-width: 0; width: 0; flex: 1; }
.captcha-row img { width: 142px; height: 48px; border-radius: 9px; border: 1px solid #e1e8ef; }
.refresh-link { color: var(--accent); font-size: 12px; padding: 0; border: 0; background: none; }
.refresh-link:hover { text-decoration: underline; }
.field-error { color: #b23939; margin-top: 8px; font-size: 13px; }
.errorlist { margin: 0; padding-left: 18px; }
.primary-action { background: var(--accent); border-color: var(--accent); padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.primary-action:hover, .primary-action:focus { background: #195b54; border-color: #195b54; }
.card-footnote { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.7; }
.site-footer { text-align: center; padding: 20px; color: #8493a2; font-size: 12px; }
.message-stack { max-width: 600px; margin: 0 auto 20px; }
.settings-card { max-width: 560px; margin: 36px auto; }
.account-nav { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.nav-user { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.account-nav { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.summary-card { height: 100%; }
.summary-card.summary-count strong { font-size: 30px; color: var(--accent); }
.summary-count small { margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--muted); }
.status-badge { font-size: 12px; font-weight: 500; line-height: 1.5; padding: 6px 10px; white-space: normal; text-align: left; }
.status-review { color: #23605b; background: #e4f2ef; }
.status-complete { color: #285e36; background: #e8f4e9; }
.status-decision { color: #825716; background: #fff2d8; }
.status-default { color: #526579; background: #edf1f5; }
.query-warning { font-size: 12px; color: #936512; }
.error-card { text-align: center; }
.error-code { color: var(--accent); font-size: 64px; font-weight: 750; margin-bottom: 16px; }
.nav-logout { border: none; padding: 0; background: none; color: var(--muted); }
.dashboard-welcome { padding-top: 32px; }
.dashboard-welcome h1 { font-size: 32px; font-weight: 700; }
.summary-card { background: white; border: 1px solid #e4eaf0; border-radius: 16px; padding: 24px; }
.summary-card span, .summary-card strong { display: block; }
.summary-card span { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.summary-card strong { font-size: 20px; }
.manuscript-panel { background: white; border: 1px solid #e4eaf0; border-radius: 16px; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; border-bottom: 1px solid #edf1f5; }
.panel-heading h2 { margin: 0; font-size: 20px; font-weight: 650; }
/* Each manuscript wraps within the viewport; no fixed-width table columns. */
.manuscript-list { padding: 16px 24px 24px; }
.manuscript-item { padding: 24px 0; border-bottom: 1px solid #e4eaf0; }
.manuscript-item:last-child { border-bottom: 0; padding-bottom: 0; }
.manuscript-item[hidden] { display: none; }
.manuscript-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.manuscript-item-info { min-width: 0; flex: 1; }
.manuscript-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.manuscript-item h3 { font-size: 16px; line-height: 1.6; margin: 0 0 6px; overflow-wrap: anywhere; }
.manuscript-item-journal { font-size: 13px; color: var(--muted); margin: 0; }
.manuscript-item-controls { flex-shrink: 0; }
.manuscript-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; margin: 20px 0 0; padding: 18px; background: #f6f9fb; border-radius: 12px; }
.manuscript-metrics > div { min-width: 0; }
.manuscript-metrics dt { font-size: 12px; font-weight: 400; color: var(--muted); margin-bottom: 7px; }
.manuscript-metrics dd { font-size: 14px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .manuscript-list { padding: 12px 16px 20px; }
  .manuscript-item-heading { flex-direction: column; gap: 12px; }
  .manuscript-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; padding: 14px; }
}
.manuscript-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.manuscript-actions .btn { white-space: nowrap; }
.archive-badge { background: #edf1f5; color: #596d80; font-size: 11px; font-weight: 500; }
.empty-manuscripts { padding: 48px 24px; text-align: center; }
.empty-manuscripts h3 { font-size: 18px; margin-bottom: 12px; }
.dashboard-form-card { height: 100%; padding: 28px; border-radius: 16px; box-shadow: none; }
.dashboard-form-card h2 { font-size: 20px; }
.detail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.detail-heading h1 { font-size: 28px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-heading > div:first-child { min-width: 0; }
.detail-heading .manuscript-actions { flex-shrink: 0; }
.detail-parameters, .history-values { margin: 0; padding: 12px 24px; }
.detail-parameters > div, .history-values > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid #edf1f5; }
.detail-parameters > div:last-child, .history-values > div:last-child { border-bottom: 0; }
.detail-parameters dt, .history-values dt { font-size: 14px; color: var(--muted); font-weight: 500; }
.detail-parameters dd, .history-values dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.history-list { padding: 24px; }
.history-event { border-left: 3px solid #a1c8c2; padding-left: 20px; margin-bottom: 28px; }
.history-event:last-child { margin-bottom: 0; }
.history-event-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.history-event-heading h3 { font-size: 18px; font-weight: 600; margin: 0; }
.history-values { padding: 0; }
@media (max-width: 850px) {
  .auth-layout { grid-template-columns: 1fr; gap: 32px; min-height: auto; max-width: 480px; margin: auto; }
  .auth-intro { text-align: center; padding-top: 12px; }
  .auth-intro h1 { font-size: 32px; margin-bottom: 14px; }
  .auth-intro p { font-size: 14px; }
  .intro-note, .desktop-break { display: none; }
  .eyebrow { margin-bottom: 12px; }
}
@media (max-width: 480px) {
  .site-header { padding: 20px; flex-wrap: wrap; }
  .header-note { display: none; }
  .page-shell { padding: 8px 16px 28px; }
  .account-card { padding: 28px 22px; border-radius: 18px; }
  .account-nav { gap: 16px; }
  .account-nav { justify-content: flex-start; row-gap: 12px; }
  .account-nav { width: 100%; }
  .nav-user { max-width: 110px; }
  .settings-card { margin: 20px auto; }
  .captcha-row { gap: 8px; }
  .captcha-row img { width: 128px; }
  .panel-heading { padding: 20px; flex-wrap: wrap; }
  .dashboard-form-card { padding: 24px 20px; }
  .detail-heading { flex-direction: column; }
  .detail-heading h1 { font-size: 23px; }
  .detail-parameters > div, .history-values > div { grid-template-columns: 1fr; gap: 6px; }
}
