/* 我的申请 */
.ap-subnav { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.ap-subnav a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ap-subnav a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ap-subnav a:hover { text-decoration: none; color: var(--primary); }

.ap-intro ul, .ap-guide { padding-left: 20px; margin: 8px 0 14px; }
.ap-guide li { margin-bottom: 6px; }

.ap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.ap-head h1 { margin: 0; }
.ap-stats { display: flex; gap: 8px; }
.ap-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; text-align: center; min-width: 76px; }
.ap-stats b { display: block; font-size: 20px; line-height: 1.2; color: var(--primary); }
.ap-stats span { font-size: 12px; color: var(--muted); }
.ap-stats .hot b { color: var(--red); }
.ap-actions { margin-bottom: 12px; gap: 10px; }

.ap-month { font-size: 16px; border-left: 3px solid var(--accent); padding-left: 8px; }
.ap-item { padding: 14px 16px; }
.ap-item.ap-closed { opacity: .65; }
.ap-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.ap-title { flex: 1; min-width: 0; }
.ap-title a { color: var(--text); }
.ap-title .small { display: block; }
.ap-status select { width: auto; padding: 4px 8px; font-size: 13px; border-radius: 8px; }
.ap-status .st-submitted, .ap-status .st-interview { background: var(--primary-soft); }
.ap-status .st-admitted, .ap-status .st-accepted { background: #E6F4EA; color: #1E6B34; }
.ap-status .st-rejected, .ap-status .st-withdrawn, .ap-status .st-declined { background: var(--gray-soft); }
.ap-status .st-waitlisted { background: var(--amber-soft); }

.ap-ddl { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 8px; }
.ap-other { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
.ap-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ap-rec { display: flex; align-items: center; gap: 6px; }
.ap-rec .btn-sm { padding: 0 10px; line-height: 24px; }
.ap-rec .btn[disabled] { opacity: .4; cursor: default; }
.ap-rec b.ok { color: #1E6B34; }
.ap-total .linkbtn { font-size: 15px; padding: 0 3px; }

.ap-more { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.ap-more summary { cursor: pointer; color: var(--muted); }
.ap-more textarea { min-height: 70px; margin: 8px 0; }
.ap-events { margin: 8px 0 0; padding-left: 18px; }

.ap-custom { max-width: none; }
.ap-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.ap-ical { display: flex; gap: 8px; margin: 10px 0; }
.ap-ical input { flex: 1; font-size: 13px; }

.ap-stats .good b { color: #1E6B34; }

/* 本周待办 */
.ap-todo h2 { margin-bottom: 8px; }
.ap-todo h3 { margin: 4px 0 6px; color: var(--text); }
.ap-todo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.ap-todo-list { list-style: none; margin: 0; padding: 0; }
.ap-todo-list li { padding: 6px 0; border-bottom: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.ap-todo-list li:last-child { border-bottom: 0; }
.ap-todo-list a { color: var(--text); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* 院校库搜索与批量添加 */
.ap-search-form { display: flex; gap: 8px; }
.ap-search-form input { flex: 1; min-width: 0; }
.ap-results ul { list-style: none; margin: 4px 0 10px; padding: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.ap-results li { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.ap-results li:last-child { border-bottom: 0; }
.ap-results li.added { background: var(--gray-soft); }
.ap-results label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; margin: 0; font-weight: normal; }
.ap-results input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.ap-res-meta { display: block; padding-left: 26px; }

/* 视图切换 */
.ap-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 8px; }
.ap-viewtitle { margin: 0; font-size: 17px; }
.ap-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ap-seg a { padding: 6px 14px; font-size: 14px; color: var(--muted); }
.ap-seg a + a { border-left: 1px solid var(--line); }
.ap-seg a.on { background: var(--primary); color: #fff; font-weight: 600; }
.ap-seg a:hover { text-decoration: none; }

/* 进度条与材料清单 */
.ap-progress { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ap-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--gray-soft); overflow: hidden; min-width: 60px; }
.ap-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.ap-bar span.full { background: #3C8D5A; }
.ap-progress .small { white-space: nowrap; }
.ap-check { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 3px 10px 3px 6px; font: inherit; font-size: 13px; cursor: pointer; min-height: 30px; }
.ap-chip:hover { border-color: var(--primary); }
.ap-tick { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--line); font-size: 11px; line-height: 1; }
.ap-chip.done { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary); }
.ap-chip.done .ap-tick { background: var(--primary); border-color: var(--primary); color: #fff; }

.ap-gentle { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--amber-soft); color: var(--text); }
.ap-gentle-good { background: #E6F4EA; color: #1E6B34; }
.ap-item.ap-closed .ap-gentle { opacity: 1; }

/* 状态时间线 */
.ap-timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 4px; }
.ap-timeline li { position: relative; padding: 0 0 10px 20px; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; font-size: 14px; }
.ap-timeline li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--muted); }
.ap-timeline li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.ap-timeline li:last-child { padding-bottom: 0; }
.ap-timeline li:last-child::after { display: none; }
.ap-timeline li.now::before { background: var(--primary); border-color: var(--primary); }
.ap-timeline li.st-admitted::before, .ap-timeline li.st-accepted::before { border-color: #3C8D5A; }
.ap-timeline li.st-admitted.now::before, .ap-timeline li.st-accepted.now::before { background: #3C8D5A; }

/* 看板 */
.ap-board-hint { margin: 0 0 8px; }
.ap-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.ap-col { flex: 0 0 248px; background: var(--gray-soft); border-radius: var(--radius); padding: 10px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 8px; align-self: flex-start; }
.ap-col.ap-col-empty { flex-basis: 150px; opacity: .8; }
.ap-col header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 0 2px; }
.ap-count { font-size: 12px; background: var(--surface); border-radius: 999px; padding: 0 8px; color: var(--muted); }
.ap-col-submitted header, .ap-col-interview header { color: var(--primary); }
.ap-col-admitted header, .ap-col-accepted header { color: #1E6B34; }
.ap-col-rejected header, .ap-col-closed header { color: var(--muted); }
.ap-col-none { margin: 0; padding: 4px 2px; }
.ap-kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ap-kcard .ap-progress { margin-top: 0; }
.ap-ktitle { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ap-ktitle a { color: var(--text); }
.ap-kfoot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ap-status-sm select { font-size: 12px; padding: 2px 6px; }
.ap-col-rejected .ap-kcard, .ap-col-closed .ap-kcard { opacity: .75; }

@media (max-width: 720px) {
  .ap-stats { width: 100%; }
  .ap-stats div { flex: 1; min-width: 0; padding: 6px 4px; }
  .ap-cols { grid-template-columns: 1fr; }
  .ap-top { flex-direction: column; }
  .ap-status select { width: 100%; }
  .ap-status-sm select { width: auto; }
  .ap-todo-grid { grid-template-columns: 1fr; }
  .ap-col { flex-basis: 78vw; max-width: 280px; }
  .ap-col.ap-col-empty { flex-basis: 40vw; }
  .ap-chip { min-height: 34px; }
  .ap-ical { flex-wrap: wrap; }
  .ap-ical input { flex-basis: 100%; }
}

/* 材料清单：普通芯片在一个表单里，推荐信芯片是可展开的计数器 */
.ap-check-form { display: contents; }
.ap-recpop { position: relative; display: inline-block; }
.ap-recpop > summary { list-style: none; cursor: pointer; }
.ap-recpop > summary::-webkit-details-marker { display: none; }
.ap-recpop[open] > summary { box-shadow: 0 0 0 2px var(--primary-soft); }
.ap-recpop .ap-rec { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; min-width: 220px; flex-direction: column; align-items: stretch;
  gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-2, 0 6px 20px rgba(0,0,0,.12)); }
.ap-recpop .ap-rec .row { gap: 8px; align-items: center; flex-wrap: nowrap; }
.ap-recpop .linkbtn[disabled] { opacity: .4; cursor: default; }
.ap-more-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ap-posts { display: inline-block !important; margin-top: 2px; }
.ap-later { margin-top: 6px; }
.ap-later summary { cursor: pointer; color: var(--muted); }
.ap-fold > summary { cursor: pointer; list-style: none; }
.ap-fold > summary::-webkit-details-marker { display: none; }
.ap-fold > summary h2 { display: inline; margin: 0; }
.ap-fold > summary::after { content: " ▸"; color: var(--muted); }
.ap-fold[open] > summary::after { content: " ▾"; }
.ap-fold[open] > summary { margin-bottom: 10px; }

/* 提醒计划：卡片列表，手机上不用横向滚动 */
.ap-plan { list-style: none; margin: 0; padding: 0; }
.ap-plan-item { padding: 10px 14px; margin-bottom: 8px; }
.ap-plan-item.sent { opacity: .65; }
.ap-plan-when { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ap-plan-what { margin: 4px 0 2px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .ap-recpop .ap-rec { position: static; margin-top: 6px; min-width: 0; box-shadow: none; }
  .ap-recpop[open] { display: block; width: 100%; }
}
