/* 申报闭环（P3）。只使用 ui.css 变量，不改共享样式。 */

.af-page{padding-bottom:var(--space-16)}
.rd [hidden]{display:none !important}
.af-page h2{margin:0}
.af-kicker{margin:var(--space-1) 0 0;color:var(--color-text-muted)}

.af-flow{margin:0 0 var(--space-6)}
.af-flow ol{
  display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;
  gap:var(--space-2) var(--space-3);margin:0;padding:var(--space-3) 0;list-style:none;
}
.af-flow li{
  display:inline-flex;align-items:center;gap:var(--space-2);
  color:var(--color-text-muted);font-size:14px;line-height:20px;font-weight:500;
}
.af-flow li.is-done{color:var(--color-text-primary)}
.af-flow li.is-current{color:var(--color-brand-seal)}
.af-dot{
  width:10px;height:10px;border-radius:50%;box-sizing:border-box;
  border:1.5px solid var(--color-border-strong);background:transparent;
}
.af-flow li.is-done .af-dot{background:var(--color-status-success);border-color:var(--color-status-success)}
.af-flow li.is-current .af-dot{background:var(--color-brand-seal);border-color:var(--color-brand-seal)}
.af-flow li+li::before{
  content:"";width:18px;height:1.5px;background:var(--color-border-strong);display:inline-block;
}

.af-card{
  background:var(--color-bg-surface);border:1px solid var(--color-border-default);
  border-radius:var(--radius-xl);padding:var(--space-8);margin:0 0 var(--space-6);
}
.af-card h3,.af-card h4{margin:0 0 var(--space-3)}
.af-stack{display:flex;flex-direction:column;gap:var(--space-6)}

.af-login{max-width:460px;margin:var(--space-10) auto;box-shadow:var(--shadow)}
.af-return{
  display:flex;align-items:flex-start;gap:var(--space-2);
  padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);
  background:var(--color-bg-seal-tint);color:var(--color-brand-seal);
}
.af-return p{margin:0}
.af-fields{display:flex;flex-direction:column;gap:var(--space-5);margin:var(--space-5) 0}
.af-field{display:flex;flex-direction:column;gap:var(--space-2)}
.af-field label{font-size:14px;font-weight:500;line-height:20px;color:var(--color-text-primary)}
.af-field input,.af-field select,.af-field textarea{
  width:100%;box-sizing:border-box;min-height:54px;
  padding:var(--space-3) var(--space-4);border:1px solid var(--color-border-strong);
  border-radius:var(--radius-md);background:var(--color-bg-surface);
  color:var(--color-text-primary);font:inherit;font-size:16px;line-height:28px;
}
.af-field textarea{min-height:120px}
.af-code-row{display:flex;align-items:center;gap:var(--space-3)}
.af-code-row input{flex:1;min-width:0}
.af-note{margin:var(--space-4) 0 0;color:var(--color-text-muted)}
.af-error{
  margin:0;padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);
  background:var(--color-status-warning-soft);color:var(--color-text-warning);
}

.af-head{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-4);margin-bottom:var(--space-6)}
.af-save-slot{display:flex;align-items:center;gap:var(--space-2);flex-shrink:0;min-height:0}
.af-save-slot:empty,.af-page .ui-save[hidden],.af-page .ui-save:empty{display:none !important}
.af-brief{margin:0 0 var(--space-6)}
/* 稿 37:110：内容宽 960（左 220 + 间距 24 + 右侧主体）。
   冻结的 .wrap 是 980 且左右各 18px，.form-page 是 760，只在这两页放宽。 */
/* 版心与全站一致（1200，左边缘对齐顶栏）；向导两栏本身仍按 960 排 */
.af-split{max-width:960px}
.af-page.form-page{max-width:none}
.af-split{display:flex;align-items:flex-start;gap:24px}
.af-side{
  position:sticky;top:var(--space-4);flex:0 0 220px;background:var(--color-bg-surface);
  border:1px solid var(--color-border-default);border-radius:var(--radius-xl);padding:var(--space-5);
}
.af-side ol{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--space-3)}
.af-side a,.af-side span{font-size:14px;font-weight:500;line-height:20px;color:var(--color-text-primary);text-decoration:none}
.af-side .is-done::before,.af-side a.on::before{content:"✓ ";color:var(--color-status-success)}
.af-side .is-current,.af-side a.on.is-current{color:var(--color-brand-seal)}
.af-side a.on{color:var(--color-text-primary)}
.af-side .is-todo{color:var(--color-text-muted)}
.af-expired-fields{margin:var(--space-3) 0;padding-left:1.2em}
.af-expired-fields li{margin:var(--space-1) 0}
.af-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-4)}

.af-seg-head,.af-row{display:flex;justify-content:space-between;align-items:center;gap:var(--space-3)}
.af-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3)}
.af-warn{
  padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);
  background:var(--color-status-warning-soft);color:var(--color-text-warning);
}
.af-info{
  padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);
  background:var(--color-status-info-soft);color:var(--color-status-info);font-weight:500;
}
.af-check{display:flex;align-items:flex-start;gap:var(--space-3);margin:0}
.af-check input{width:18px;height:18px;margin-top:4px;flex:none}
.af-seal-self{
  display:flex;align-items:flex-start;gap:var(--space-3);
  padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);
  background:var(--color-bg-sunken);
}
.af-file{display:flex;justify-content:space-between;align-items:center;gap:var(--space-4)}
.af-file p{margin:0}
.af-kv{display:flex;flex-direction:column;margin:0;padding:0}
.af-kv div{
  display:grid;grid-template-columns:120px minmax(0,1fr);gap:var(--space-4);
  align-items:center;padding:var(--space-3) var(--space-1);
  border-bottom:1px solid var(--color-border-default);
}
.af-kv dt{margin:0;font-size:14px;font-weight:500;line-height:20px;color:var(--color-text-secondary)}
.af-kv dd{margin:0}

.af-receipt{max-width:640px;margin:0 auto var(--space-6);text-align:center}
.af-receipt .af-no{
  background:var(--color-bg-sunken);border-radius:var(--radius-md);
  padding:var(--space-4) var(--space-8);margin:0;
}
.af-receipt .t-num{margin:var(--space-1) 0;word-break:break-all}
.af-return-card{border-color:var(--color-status-warning)}
.af-return-note{
  background:var(--color-status-warning-soft);border-radius:var(--radius-md);
  padding:var(--space-4);white-space:pre-wrap;
}
.af-timeline{
  display:flex;flex-wrap:wrap;gap:var(--space-3) var(--space-4);
  margin:0;padding:0;list-style:none;
}
.af-timeline li{font-size:14px;font-weight:500;line-height:20px;color:var(--color-text-muted)}
.af-timeline li.is-done,.af-timeline li.is-current{color:var(--color-text-primary)}
.af-timeline li.is-current{color:var(--color-brand-seal)}

.af-modal{
  position:fixed;inset:0;z-index:80;display:flex;align-items:center;justify-content:center;
  padding:var(--space-4);background:color-mix(in srgb, var(--color-text-primary) 45%, transparent);
}
.af-modal[hidden]{display:none}
.af-modal-card{
  width:min(520px,100%);background:var(--color-bg-surface);border-radius:var(--radius-xl);
  padding:var(--space-8);box-shadow:var(--shadow-lift);
}
.af-confirm-list{margin:var(--space-4) 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--space-3)}
.af-confirm-list li{color:var(--color-text-secondary)}
.af-confirm-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:var(--space-3)}
.af-confirm-note{margin:var(--space-4) 0 0;color:var(--color-text-secondary)}
.af-submit-stall{margin:0 0 var(--space-4)}
.af-submit-stall a{margin-left:var(--space-2);font-weight:500}
.af-retry{
  margin-left:var(--space-2);padding:0;border:0;background:transparent;
  color:inherit;font:inherit;font-weight:500;text-decoration:underline;cursor:pointer;
}
.af-desktop-hint{display:none}

@media (max-width:640px){
  .af-desktop-hint{display:block;margin-bottom:var(--space-4)}
  .af-head,.af-split,.af-file,.af-confirm-actions{flex-direction:column;align-items:stretch}
  .af-side{position:static;flex-basis:auto;width:100%}
  .af-side ol{flex-direction:row;overflow-x:auto;gap:var(--space-4)}
  .af-side li{flex:none}
  .af-kv div{grid-template-columns:1fr}
  .af-login{margin-top:var(--space-4)}
  .af-page .ui-btn,.af-page .btn,.af-page .btn-wechat,.af-page .af-retry{
    min-height:44px;box-sizing:border-box;
  }
  .af-page a.ui-btn{display:inline-flex;align-items:center}
  .af-flow li+li::before{display:none}
}

/* 登录与起草页修订：范围限定，保留原保存与提交行为。 */
.af-login .hint{font-size:13px;line-height:20px;color:var(--color-text-muted);margin:8px 0}
.af-login .hint a{display:inline-flex;align-items:center;min-height:44px}
.af-login .af-field input{border-color:var(--color-border-input)}
.af-login .af-field input:focus-visible,
.af-page .info-grid :is(input,select):focus-visible,
.af-section textarea:focus-visible{outline:2px solid var(--color-status-info);outline-offset:2px}
.af-login-page .af-flow-mobile{display:none}
.af-flow li.is-current{font-weight:600;color:var(--color-text-link)}
.af-flow li.is-done .af-dot{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;color:var(--color-text-success);font-weight:700}
.af-page.form-page .af-head h1{margin:0;padding:0}
.af-page.form-page .af-main{gap:32px}
.af-page.form-page .af-section>h3{margin:0 0 16px}
.af-page.form-page .info-grid label{margin-top:20px}
.af-page.form-page .info-grid>.ig-row:first-child label{margin-top:0}
.af-page.form-page .info-grid :is(input,select),
.af-page.form-page .af-section textarea{min-height:48px;padding:10px 14px;border:1px solid var(--color-border-input);border-radius:var(--radius-md);font-size:16px;color:var(--color-text-primary);width:100%;min-width:0}
.af-page.form-page .info-grid input:disabled{background:var(--color-bg-sunken);color:var(--color-text-muted);opacity:1}
.af-page.form-page .af-side a{display:inline-flex;align-items:center;min-height:44px;gap:8px}
.af-page.form-page .af-side .is-todo::before{content:'○';color:var(--color-text-muted)}
.af-page.form-page .af-side .is-current::before{content:'●';color:var(--color-text-link)}
.af-page.form-page .af-side .is-current{font-weight:600;color:var(--color-text-link)}
.af-page.form-page .af-side .is-done::before,
.af-page.form-page .af-side a.on::before{content:'✓';color:var(--color-text-success)}
@media (max-width:640px){
  .af-page.form-page .info-grid>.ig-row:first-child>div+div label{margin-top:20px}
  .af-login{padding:24px 20px;margin:16px auto 24px}
  .af-login-page{padding-bottom:24px}
  .af-login-page .af-flow-full{display:none}
  .af-login-page .af-flow-mobile{display:block}
  .af-flow-mobile summary{min-height:44px;padding:8px 0;cursor:pointer;color:var(--color-text-primary);font-weight:600}
  .af-flow-mobile summary span{display:block;font-size:13px;font-weight:400;color:var(--color-text-muted)}
  .af-flow-mobile ol{align-items:flex-start;flex-direction:column;padding-left:16px}
}
