/* ═══════════════════════════════════════════════════
   CTBA 獨立表單頁樣式 — ctba-forms.css
   登入、忘記密碼、球隊/教練裁判/學員註冊頁面引入
   需先引入 ctba-base.css
═══════════════════════════════════════════════════ */

/* ── 置中登入卡片 ── */
.login-card {
  width: 100%;
  max-width: 440px;
  flex: none;          /* 防止 flex 容器壓縮 */
  animation: slideUp 0.45s ease both;
}
.login-card .reg-card {
  box-shadow: var(--shadow-login);
}

.login-logo-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(var(--black)/.10);
}
.login-logo {
  width: 120px; height: 120px; /*border-radius: 50%;
  border: 2px solid rgba(var(--black)/.10);*/
  display: flex; align-items: center; justify-content: center;
  /*margin-bottom: 0.75rem;
  box-shadow: var(--shadow-md);*/
}
.login-title    { font-size: 1.8rem; color: rgb(var(--primary)); letter-spacing: 0.04em; margin-bottom: 3px; }
.login-subtitle { font-size: .8rem; color: rgba(var(--black)/.7); text-align: center; line-height: 1.5; }

/* 登入身分 radio — 樣式由 foundation-prototype.css 統一管理 */
.role-label { font-size: 0.8rem; font-weight: 700; color: rgba(var(--primary),.85); margin-bottom: 6px; display: block; }
.role-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1.1rem; }

/* 登入輔助列 */
.login-aux { display: flex; align-items: center; justify-content: space-between; margin: 0.5rem 0 1.1rem; }
.remember-label { display: flex; align-items: center; gap: 7px; font-size: 0.9rem; color: rgba(var(--black)/.55); cursor: pointer; user-select: none; line-height: 1; }
.remember-label input { width: 15px; height: 15px; accent-color: rgb(var(--red)); cursor: pointer; }
.link-forgot { font-size: 0.9rem; font-weight: 700; color: rgb(var(--red)); text-decoration: none; transition: color var(--ease); }
.link-forgot:hover { color: rgb(var(--red-bright)); }

/* 登入主按鈕 */
.btn-login {
  width: 100%; height: 50px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em;
  border: none; border-radius: var(--radius); cursor: pointer;
  background: rgb(var(--primary)); color: white;
  box-shadow: 0 4px 14px rgba(var(--primary),0.28);
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
}
.btn-login svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.btn-login:hover { background: rgb(var(--primary-mid)); box-shadow: 0 6px 20px rgba(var(--primary),0.35); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* 步驟點（忘記密碼） */
.step-dots { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 1.25rem; }
.step-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--black)/.20); transition: all var(--ease); }
.step-dot.active { width: 22px; border-radius: 4px; background: rgb(var(--primary)); }

/* 返回連結 */
.link-back { display: inline-flex; align-items: center; gap: 5px; font-size: 0.9rem; font-weight: 700; color: rgb(var(--red)); text-decoration: none; transition: color var(--ease); }
.link-back svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.link-back:hover { color: rgb(var(--red-bright)); }

/* 成功通知（忘記密碼） */
.alert-success {
  display: none;
  align-items: flex-start; gap: 10px;
  padding: 0.75rem 1rem; margin-bottom: 1.1rem;
  background: rgba(43,155,37,0.07);
  border: 1px solid rgba(43,155,37,0.3);
  border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500; color: rgb(30,100,28);
}
.alert-success.show { display: flex; }
.alert-success svg { width: 16px; height: 16px; stroke: rgb(43,155,37); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }

/* ── 密碼設定區 ── */
.pwd-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.75rem; align-items: start; }
@media (max-width: 560px) { .pwd-row { grid-template-columns: 1fr; } }
.pwd-row .form-hint,
.pwd-row .form-error { min-height: 1.2rem; }

.acct-notice {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 0.45rem 0.875rem; margin-bottom: 0.875rem;
  background: rgb(var(--red-pale)); border-left: 3px solid rgba(var(--red),0.5);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.75rem; font-weight: 500; color: rgb(var(--red));
}
.acct-notice svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }

/* ── 學員專區 Tab ── */
.student-nav {
  background: rgb(var(--white)); border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-card);
  display: flex; overflow: hidden;
  border-bottom: 2px solid rgb(var(--primary-pale));
}
.student-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 0.7rem 0.5rem;
  text-decoration: none; font-size: 0.75rem; font-weight: 700;
  color: rgba(var(--black)/.55); border-right: 1px solid rgba(var(--black)/.10);
  position: relative; cursor: pointer;
  background: none; border-top: none; border-bottom: none; border-left: none;
  font-family: inherit; transition: background var(--ease), color var(--ease);
}
.student-nav-item:last-child { border-right: none; }
.student-nav-item:hover { background: rgba(var(--black)/.02); color: rgb(var(--primary)); }
.student-nav-item.active { color: rgb(var(--primary)); background: rgb(var(--primary-pale)); }
.student-nav-item.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: rgb(var(--red)); }
@media (max-width: 480px) { .student-nav-item { font-size: 0.65rem; padding: 0.6rem 0.25rem; } }
.student-card { background: rgb(var(--white)); border-radius: 0 0 8px 8px; box-shadow: var(--shadow-card); overflow: hidden; }
.student-card-header { padding: 1.1rem 1.5rem 1rem; border-bottom: 1px solid rgba(var(--black)/.10); }
.student-card-title  { font-size: 0.95rem; font-weight: 900; color: rgb(var(--primary)); margin-bottom: 2px; }
.student-card-subtitle { font-size: 0.75rem; color: rgba(var(--black)/.55); }
.student-card-body { padding: 1.25rem 1.5rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── 上傳 Grid（教練裁判/學員/人員登錄）── */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
}
.upload-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .upload-grid { grid-template-columns: repeat(2, 1fr); } }
.upload-grid .upload-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.upload-grid .upload-item-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(var(--primary), 0.85);
}
.upload-grid .upload-item-spec {
  font-size: 0.67rem;
  color: rgba(var(--black), 0.35);
  margin-top: -3px;
}
.upload-grid .upload-filename {
  font-size: 0.68rem;
  color: rgba(var(--black), 0.55);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-preview {
  display: none;
  width: 80px; height: 52px;
  border-radius: var(--radius);
  border: 1px solid rgba(var(--black), 0.10);
  overflow: hidden; margin-top: 2px;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview.has-img { display: block; }

/* ════════════════════════════════════════════════
   學員專區 — 學習歷程 / 報名資料 / 申請補換發
════════════════════════════════════════════════ */

/* ── 統計卡列（學習歷程頂部）── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 560px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: rgb(var(--white));
  border: 1px solid rgba(var(--black)/.10);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(var(--black)/.45);
  letter-spacing: 0.03em;
}

/* ── 時間軸（課程修習紀錄）── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1.5px;
  background: rgba(var(--black)/.12);
}
.timeline-item {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(var(--black)/.06);
}
.timeline-item:last-child { border-bottom: none; }

.timeline-dot {
  position: absolute;
  left: -16px; top: 1.05rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(var(--black)/.20);
  background: rgb(var(--white));
}
.timeline-dot.done    { background: rgb(var(--success)); border-color: rgb(var(--success)); }
.timeline-dot.ing     { background: rgb(var(--primary)); border-color: rgb(var(--primary)); }
.timeline-dot.pending { background: rgb(var(--white));   border-color: rgba(var(--black)/.25); }

.timeline-date {
  font-size: 0.7rem;
  color: rgba(var(--black)/.4);
  margin-bottom: 3px;
}
.timeline-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(var(--black)/.85);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
}
.timeline-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
}
.badge-done    { background: rgba(43,155,37,.1); color: rgb(43,155,37);     border: 1px solid rgba(43,155,37,.25); }
.badge-ing     { background: rgb(var(--primary-pale)); color: rgb(var(--primary)); border: 1px solid rgba(var(--primary),.2); }
.badge-pending { background: rgba(var(--black)/.05); color: rgba(var(--black)/.55); border: 1px solid rgba(var(--black)/.12); }
.badge-cancel  { background: rgb(var(--red-pale)); color: rgb(var(--red)); border: 1px solid rgba(var(--red),.25); }

.timeline-desc {
  font-size: 0.75rem;
  color: rgba(var(--black)/.5);
  line-height: 1.5;
}
.timeline-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  background: rgb(var(--primary-pale));
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgb(var(--primary));
}

/* ── 報名資料：entry-list ── */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  background: rgb(var(--white));
  border: 1px solid rgba(var(--black)/.10);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.entry-card:hover { box-shadow: var(--shadow-md); }
.entry-card-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--radius);
  background: rgb(var(--primary-pale));
  display: flex; align-items: center; justify-content: center;
}
.entry-card-icon svg { width: 18px; height: 18px; stroke: rgb(var(--primary)); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.entry-card-info { flex: 1; min-width: 0; }
.entry-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(var(--black)/.85);
  margin-bottom: 3px;
}
.entry-card-meta {
  font-size: 0.72rem;
  color: rgba(var(--black)/.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-card-status { flex-shrink: 0; }

/* ── 申請補換發：類型選擇 ── */
.apply-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0;
}
@media (max-width: 480px) { .apply-type-grid { grid-template-columns: 1fr; } }

.apply-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 1rem 0.75rem;
  background: rgb(var(--white));
  border: 2px solid rgba(var(--black)/.12);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--ease);
  text-align: center;
}
.apply-type-btn:hover {
  border-color: rgba(var(--primary),.4);
  background: rgb(var(--primary-pale));
}
.apply-type-btn.is-selected {
  border-color: rgb(var(--primary));
  background: rgb(var(--primary-pale));
}
.apply-type-btn .aicon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(var(--primary),.08);
  display: flex; align-items: center; justify-content: center;
}
.apply-type-btn.is-selected .aicon { background: rgb(var(--primary)); }
.apply-type-btn .aicon svg { width: 20px; height: 20px; stroke: rgb(var(--primary)); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.apply-type-btn.is-selected .aicon svg { stroke: white; }
.apply-type-btn .aname {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(var(--black)/.8);
}
.apply-type-btn .adesc {
  font-size: 0.7rem;
  color: rgba(var(--black)/.4);
}
.apply-type-btn.is-selected .aname { color: rgb(var(--primary)); }

/* 申請表單顯示/隱藏 */
.apply-form { display: none; }
.apply-form.show { display: block; }

/* ── 個人資料：帳號設定 ── */
.acct-notice {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 0.5rem 0.875rem; margin-bottom: 0.875rem;
  background: rgb(var(--red-pale));
  border-left: 3px solid rgba(var(--red),.5);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.75rem; font-weight: 500; color: rgb(var(--red));
}
.acct-notice svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
