/* ==========================================================================
   CYFA 申请人中心 — 在 ../assets/style.css 的基础上补充
   ========================================================================== */
/* 带 hidden 的元素一律隐藏（按钮等自带 display 样式会盖掉浏览器默认的隐藏） */
[hidden] { display: none !important; }
body.portal { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.portal-main { flex: 1; padding: clamp(32px, 5vw, 64px) 0 96px; }
.portal-wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.portal-wrap--narrow { max-width: 760px; }

/* 原型提示条：上线前删除 */
.proto-bar { background: var(--deep); color: #C4BDE6; font-size: .8rem; text-align: center; padding: 8px 16px; }
.proto-bar b { color: var(--lime); }

/* 顶栏 */
.portal-top { background: var(--surface); border-bottom: 1px solid var(--line); }
.portal-top-inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portal-top .nav-logo { gap: 10px; }
.portal-top-right { display: flex; align-items: center; gap: 14px; font-size: .88rem; color: var(--ink-2); }
.portal-top-right a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.portal-top-right a:hover { color: var(--purple); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.user-chip i { width: 30px; height: 30px; border-radius: 8px; background: var(--purple); color: var(--lime); font-style: normal; font-size: .78rem; font-weight: 800; display: grid; place-items: center; }

/* 通用卡片 */
.p-card { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 32px); }
.p-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--purple); margin-bottom: 10px; }
.p-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; line-height: 1.25; letter-spacing: -.02em; }
.p-sub { margin-top: 10px; color: var(--ink-2); font-size: .98rem; line-height: 1.8; }
.p-muted { color: var(--ink-3); font-size: .86rem; line-height: 1.7; }

/* 表单控件 */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 22px; }
.field label, .field .label { font-size: .95rem; font-weight: 800; color: var(--ink); line-height: 1.55; }
.field .req { color: #E0489A; margin-left: 4px; }
.field .hint { font-size: .84rem; color: var(--ink-3); line-height: 1.7; margin-top: -2px; }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--purple); background: var(--surface); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.75; }
.other-input { margin-top: 10px; }
.count { align-self: flex-end; font-size: .78rem; color: var(--ink-3); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-block; padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); font-size: .92rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.choice input:checked + span { border-color: var(--purple); background: var(--purple-50); color: var(--purple); }
.choice input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.field .check, .check { font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); line-height: 1.7; }
.check input { margin-top: 5px; accent-color: var(--purple); flex: none; }
.check a { color: var(--purple); font-weight: 700; }
.err { color: #D43C86; font-size: .84rem; font-weight: 700; }
.btn-block { width: 100%; justify-content: center; }
.cta-button[disabled] { opacity: .5; cursor: not-allowed; }

/* 登录页 */
.login-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(28px, 5vw, 64px); align-items: center; }
.login-points { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-points li { display: flex; gap: 12px; font-size: .98rem; color: var(--ink); font-weight: 600; line-height: 1.6; }
.login-points li::before { content: ""; width: 10px; height: 10px; margin-top: 8px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 0 2px var(--purple); flex: none; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.code-btn { font: inherit; font-size: .9rem; font-weight: 800; color: var(--purple); background: var(--purple-50); border: 0; border-radius: 12px; padding: 0 16px; cursor: pointer; white-space: nowrap; }
.code-btn[disabled] { color: var(--ink-3); background: var(--bg-2); cursor: default; }

/* 主页 */
.dash-head { margin-bottom: 28px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.next-card { background: var(--purple); color: #fff; border-radius: 28px; padding: clamp(26px, 3.4vw, 40px); position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 300px; }
.next-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(215, 245, 58, .16); right: -50px; top: -60px; }
.next-card .p-kicker { color: var(--lime); }
.next-card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.3; letter-spacing: -.01em; position: relative; }
.next-card p { margin-top: 12px; color: var(--purple-100); font-size: .96rem; line-height: 1.8; max-width: 34em; position: relative; }
.next-card .next-actions { margin-top: auto; padding-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.next-card .cta-button { background: var(--lime); color: var(--purple); border-color: var(--lime); }
.next-card .cta-button--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }

.app-card .app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.app-card h3 { font-size: 1.15rem; font-weight: 900; line-height: 1.4; }
.status-tag { font-size: .76rem; font-weight: 800; padding: 4px 10px; border-radius: 6px; white-space: nowrap; background: var(--bg-2); color: var(--ink-2); }
.status-tag--live { background: var(--purple-50); color: var(--purple); }
.status-tag--done { background: var(--lime); color: var(--purple); }
.ring { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.ring svg { width: 72px; height: 72px; flex: none; }
.ring b { font-size: 1.05rem; font-weight: 900; }

.steps { margin-top: 20px; }
.steps ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.steps ol::before { content: ""; position: absolute; left: 8%; right: 8%; top: 17px; height: 2px; background: var(--line-2); }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .82rem; font-weight: 700; color: var(--ink-3); }
.steps li i { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .84rem; color: var(--ink-3); box-shadow: 0 0 0 5px var(--surface); }
.steps li.done i { background: var(--purple); border-color: var(--purple); color: var(--lime); }
.steps li.done { color: var(--ink); }
.steps li.now i { background: var(--lime); border-color: var(--purple); color: var(--purple); }
.steps li.now { color: var(--purple); }

.wechat-card { margin-top: 20px; display: flex; gap: 22px; align-items: center; }
.wechat-card[hidden] { display: none; }
.wechat-card img { width: 132px; height: 132px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.wechat-card h3 { font-size: 1.08rem; font-weight: 900; line-height: 1.45; margin-bottom: 6px; }
.prog-list { display: flex; flex-direction: column; gap: 12px; }
.prog-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg); }
.prog-item b { display: block; font-size: .98rem; }
.prog-item span { font-size: .84rem; color: var(--ink-3); }
.prog-item .text-link { white-space: nowrap; font-weight: 800; color: var(--purple); text-decoration: none; font-size: .9rem; }

/* 申请表 */
.form-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.save-state { font-size: .84rem; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.save-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--purple); }
.form-progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-bottom: 24px; }
.form-progress span { display: block; height: 100%; background: var(--purple); border-radius: 99px; transition: width .3s; }
.sec + .sec { margin-top: 20px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sec-head b { font-size: 1.6rem; font-weight: 900; color: var(--purple-100); letter-spacing: -.03em; line-height: 1; }
.sec-head h2 { font-size: 1.2rem; font-weight: 900; }
.sec-head p { font-size: .86rem; color: var(--ink-3); margin-left: auto; }
.form-foot { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* 付款页 */
.pay-sum { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-sum .amount { font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 900; letter-spacing: -.02em; color: var(--ink); }
.tabs { display: flex; gap: 6px; background: var(--bg-2); border-radius: 14px; padding: 5px; margin: 24px 0 20px; }
.tabs button { flex: 1; font: inherit; font-size: .95rem; font-weight: 800; padding: 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--purple); box-shadow: 0 6px 16px -10px rgba(60, 30, 180, .5); }
.pane[hidden] { display: none; }
.qr-ph { width: 220px; height: 220px; margin: 8px auto 16px; border-radius: 16px; border: 2px dashed var(--line-2); display: grid; place-items: center; text-align: center; font-size: .84rem; color: var(--ink-3); padding: 20px; background: var(--bg); }
.qr-ph.qr-on { border: 0; background: #fff; padding: 8px; }
.qr-ph.qr-on svg { width: 100%; height: 100%; display: block; }
.acct { border-top: 1px solid var(--line); }
.rule-list { margin: 20px 0 22px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.rule-list li { position: relative; padding-left: 18px; font-size: .9rem; color: var(--ink-2); line-height: 1.7; }
.rule-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--purple); }
.rule-list b { color: var(--ink); }
.slot-title { font-size: 1.35rem; font-weight: 900; line-height: 1.4; margin: 2px 0 18px; }
.propose { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.propose-toggle { font: inherit; font-size: .92rem; font-weight: 800; color: var(--purple); background: none; border: 0; padding: 0; cursor: pointer; }
.propose .textarea { margin-top: 12px; min-height: 90px; }
.callout { margin-top: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--purple-50); border-left: 4px solid var(--purple); }
.callout b { display: block; font-size: 1rem; color: var(--purple); margin-bottom: 6px; }
.callout p { font-size: .92rem; color: var(--ink); line-height: 1.8; margin-top: 4px; }
.callout .p-muted { color: var(--ink-3); font-size: .84rem; }
.meet-link { display: block; margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--purple-50); color: var(--purple); font-weight: 800; word-break: break-all; text-decoration: none; }
.acct div { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.acct dt { font-size: .86rem; font-weight: 800; color: var(--purple); }
.acct dd { font-size: 1rem; font-weight: 700; color: var(--ink); word-break: break-all; }
.copy-btn { font: inherit; font-size: .8rem; font-weight: 800; color: var(--purple); background: var(--purple-50); border: 0; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.upload { margin-top: 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--bg); }
.upload input { margin-top: 10px; font-size: .86rem; }

/* 录取通知书 */
.letter { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px); border-top: 8px solid var(--purple); }
.letter p { font-size: 1rem; line-height: 1.95; color: var(--ink); margin-bottom: 14px; }
.letter-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); }
.letter-head .logo-mark { font-size: 1.5rem; }
.letter-title { font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 22px; }
.letter-facts { margin: 22px 0; padding: 6px 20px; border-radius: var(--radius); background: var(--bg); }
.letter-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.letter-facts div:last-child { border-bottom: 0; }
.letter-facts div[hidden] { display: none; }
.letter-facts dt { font-size: .9rem; color: var(--ink-2); }
.letter-facts dd { font-size: 1rem; font-weight: 800; color: var(--ink); text-align: right; }
.letter-sign { margin-top: 26px; text-align: right; font-weight: 700; }
.terms-box { margin-top: 14px; max-height: 340px; overflow-y: auto; padding: 18px 20px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); font-size: .86rem; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; }
.pay-break { margin-top: 14px; font-size: .9rem; color: var(--ink-2); }
.pay-break b { color: var(--ink); }
@media print {
  .portal-top, .no-print, .portal-foot { display: none !important; }
  body.portal { background: #fff; }
  .portal-main { padding: 0; }
  .letter { border-radius: 0; padding: 0; }
}

/* 原型状态切换器：上线前删除 */
.proto-switch { margin-top: 32px; padding: 16px 18px; border-radius: var(--radius); border: 1.5px dashed var(--line-2); font-size: .84rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.proto-switch button { font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.proto-switch button.on { background: var(--purple); color: #fff; border-color: var(--purple); }

.portal-foot { border-top: 1px solid var(--line); padding: 22px 0; font-size: .82rem; color: var(--ink-3); }
.portal-foot .portal-wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.portal-foot a { color: var(--ink-3); }

@media (max-width: 900px) {
  .login-grid, .dash-grid { grid-template-columns: 1fr; }
  .steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .steps ol::before { display: none; }
}
@media (max-width: 640px) {
  .portal-wrap, .portal-top-inner { padding: 0 18px; }
  .portal-top .logo-sub { display: none; }
  .portal-top-right { gap: 10px; font-size: .82rem; }
  .portal-top-right .user-chip { display: none; }
  .sec-head p { display: none; }
  .wechat-card { flex-direction: column; align-items: flex-start; }
  .acct div { grid-template-columns: 1fr auto; }
  .acct dt { grid-column: 1 / -1; }
  .form-foot .cta-button { width: 100%; justify-content: center; }
}
