/* ════════════════════════════════════════════════
   2. Foundation Button 覆蓋 → CTBA 品牌色
════════════════════════════════════════════════ */
.button {
  font-family: var(--font-main);
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: var(--radius);
  transition: all var(--ease);
  padding: .55rem 1.4rem;
  border: 1.5px solid transparent;
}
.button.primary {
  background: rgb(var(--primary));
  border-color: rgb(var(--primary));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.button.primary:hover, .button.primary:focus {
  background: rgb(var(--primary-mid));
  border-color: rgb(var(--primary-mid));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.button.secondary {
  background: rgb(var(--secondary));
  border-color: rgba(var(--black)/.15);
  color: rgb(var(--primary));
}
.button.secondary:hover {
  background: rgba(var(--primary)/.08);
  border-color: rgba(var(--primary)/.3);
}
.button.success {
  background: rgb(var(--success));
  border-color: rgb(var(--success));
}
.button.warning {
  background: rgb(var(--warning));
  border-color: rgb(var(--warning));
}
.button.alert {
  background: rgb(var(--alert));
  border-color: rgb(var(--alert));
  color: rgb(var(--primary));
}
.button.hollow {
  background: transparent;
  border-width: 1.5px;
}
.button.hollow.primary {
  background: transparent;
  border-color: rgba(var(--primary)/.35);
  color: rgb(var(--primary));
  box-shadow: none;
}
.button.hollow.primary:hover {
  background: rgb(var(--primary-pale));
  border-color: rgba(var(--primary)/.55);
  transform: none;
  box-shadow: none;
}
.button.small  { font-size: .8rem;  padding: .35rem 1rem; height: 34px; }
.button.tiny   { font-size: .72rem; padding: .25rem .75rem; height: 28px; }
.button.expanded { width: 100%; }

/* CTBA .btn alias → Foundation .button 相容層 */
.btn             { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn svg         { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn-primary     { @extend .button; @extend .button.primary; }
.btn-outline     { @extend .button; @extend .button.hollow.primary; }

/* 直接 class 對照（不依賴 SCSS extend）*/
.btn.btn-primary  { background: rgb(var(--primary)); color: #fff; border: 1.5px solid rgb(var(--primary)); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.btn.btn-primary:hover { background: rgb(var(--primary-mid)); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.btn-outline  { background: transparent; color: rgb(var(--primary)); border: 1.5px solid rgba(var(--primary)/.35); border-radius: var(--radius); }
.btn.btn-outline:hover { background: rgb(var(--primary-pale)); border-color: rgba(var(--primary)/.55); }
.btn.btn-danger   { background: transparent; color: rgb(var(--warning)); border: 1.5px solid rgba(var(--warning)/.3); border-radius: var(--radius); }
.btn.btn-danger:hover { background: rgb(var(--red-pale)); }
.btn.btn-teal     { background: transparent; color: rgb(0,128,128); border: 1.5px solid rgba(0,128,128,.35); border-radius: var(--radius); }
.btn.btn-teal:hover { background: rgba(0,128,128,.07); }
.btn.btn-green    { background: transparent; color: rgb(var(--success)); border: 1.5px solid rgba(43,155,37,.35); border-radius: var(--radius); }
.btn.btn-green:hover { background: rgba(43,155,37,.07); }
.btn:disabled     { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-full         { width: 100%; height: 50px; font-size: .95rem; }
.btn-sm           { height: 34px; padding: 0 14px; font-size: .8rem; }
.btn-xs           { height: 28px; padding: 0 10px; font-size: .72rem; }
.action-bar       { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.save-row         { display: flex; justify-content: center; gap: 10px; padding-top: .875rem; }
.btn-group        { display: flex; justify-content: flex-end; gap: 10px; padding-top: .875rem; }

/* ════════════════════════════════════════════════
   3. Foundation Form 覆蓋 → CTBA 樣式
════════════════════════════════════════════════ */
/* Foundation input / select / textarea 統一樣式 */
[type=color], [type=date], [type=datetime-local], [type=datetime],
[type=email], [type=month], [type=number], [type=password],
[type=search], [type=tel], [type=text], [type=time], [type=url],
[type=week], textarea, select {
  height: 46px;
  padding: 0 12px;
  font-size: .875rem;
  font-family: var(--font-main);
  color: rgba(var(--black)/ .85);
  background: rgb(var(--white));
  border: 1.5px solid rgba(var(--black)/ .20);
  border-radius: var(--radius);
  box-shadow: var(--shadow-input);
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
textarea { height: auto; min-height: 88px; padding: 10px 12px; }
[type=date] { padding: 0 10px; }

[type=text]:focus, [type=email]:focus, [type=password]:focus,
[type=date]:focus, [type=tel]:focus, [type=number]:focus,
textarea:focus, select:focus {
  border-color: rgba(var(--primary), .6);
  box-shadow: 0 0 0 3px rgba(var(--primary), .08);
  outline: none;
}
[type=text]:hover:not(:focus), [type=email]:hover:not(:focus),
[type=password]:hover:not(:focus), select:hover:not(:focus) {
  border-color: rgba(var(--primary), .35);
}
[disabled], [readonly] {
  background: rgba(var(--black), .04);
  color: rgba(var(--black), .45);
  border-color: rgba(var(--black), .12);
  cursor: not-allowed;
  box-shadow: none;
}
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a274d' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
  cursor: pointer;
}
select:disabled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4bac8' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* Foundation .label-text / placeholder */
::placeholder { color: rgba(var(--black), .35); font-size: .825rem; }

/* Foundation .help-text → CTBA form-hint */
.help-text, .form-hint {
  font-size: .72rem;
  color: rgba(var(--black), .55);
  margin-top: 4px;
  display: block;
}

/* Foundation .form-error → CTBA form-error */
.form-error {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 500;
  color: rgb(var(--warning));
  margin-top: 4px;
}
.form-error::before {
  content: '!';
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px;
  background: rgb(var(--warning)); color: #fff;
  border-radius: 50%; font-size: 9px; font-weight: 900; flex-shrink: 0;
}
.has-error input, .has-error select, .has-error textarea,
.is-invalid-input {
  border-color: rgb(var(--warning)) !important;
  box-shadow: 0 0 0 3px rgba(var(--warning), .10) !important;
}
.has-success input, .has-success select {
  border-color: rgb(var(--success)) !important;
  box-shadow: 0 0 0 3px rgba(43,155,37,.10) !important;
}

/* Foundation label → CTBA form-label */
label, .form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(var(--primary), .85);
  margin-bottom: 4px;
}
label .required, .form-label .required { color: rgb(var(--warning)); }
label .label-hint, .form-label .label-hint {
  margin-left: auto;
  padding: 1px 7px;
  font-size: .7rem; font-weight: 400;
  color: rgba(var(--black)/.55);
  background: rgba(var(--primary-pale));
  border-radius: 5px;
}

/* 帶 icon 輸入框（.input-icon-wrap）*/
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: rgba(var(--black), .35);
  pointer-events: none; transition: color var(--ease);
}
.input-icon-wrap .input-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; /*stroke-width: 2;*/ stroke-linecap: round; stroke-linejoin: round; }
.input-icon-wrap input, .input-icon-wrap select { padding-left: 35px; }
.input-icon-wrap input {
  width: 100%;
  height: 44px; /* 設定明確高度，對齊才會穩 */
  box-sizing: border-box; /* 確保 padding 不會撐大高度 */
  line-height: normal; /* 避免文字行高撐開容器 */
  display: block;
  display: flex; align-items: center; justify-content: center;
}
.input-icon-wrap:focus-within .input-icon { color: rgb(var(--primary)); }
.input-icon-wrap .input-action {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 0; cursor: pointer;
  color: rgba(var(--black), .35); transition: color var(--ease);
  display: flex; align-items: center;
  justify-content: center; height: 24px; width: 24px;
}
.input-icon-wrap .input-action:hover { color: rgb(var(--primary)); }
.input-icon-wrap .input-action svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.input-icon-wrap input.has-action { padding-right: 33px; }

/* Foundation .input-group 對齊修正 */
.input-group { display: flex; align-items: stretch; }
.input-group .input-group-label {
  display: flex; align-items: center;
  padding: 0 12px;
  background: rgba(var(--black),.04);
  border: 1.5px solid rgba(var(--black),.20);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .875rem; color: rgba(var(--black),.55); white-space: nowrap;
}
.input-group .input-group-field {
  flex: 1;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* form-group（grid 容器單元）*/
.form-group { display: flex; flex-direction: column; gap: 4px; }

/* ════════════════════════════════════════════════
   4. Foundation Callout → CTBA 通知框
════════════════════════════════════════════════ */
.callout {
  border-radius: var(--radius);
  border-width: 1px;
  padding: .75rem 1rem;
  font-size: .825rem;
}
.callout.primary  { background: rgb(var(--primary-pale)); border-color: rgba(var(--primary),.25); color: rgb(var(--primary)); }
.callout.success  { background: rgba(43,155,37,.08);      border-color: rgba(43,155,37,.25);       color: rgb(30,100,28); }
.callout.warning  { background: rgb(var(--red-pale));      border-color: rgba(var(--warning),.3);   color: rgb(var(--warning)); }
.callout.alert    { background: rgba(231,196,102,.15);     border-color: rgba(231,196,102,.4);      color: rgb(120,90,0); }
/* CTBA notice-red alias */
.notice-red, .form-notice.notice-warning {
  display: flex; align-items: flex-start; gap: 8px;
  padding: .5rem .875rem; margin-bottom: 0;
  background: rgb(var(--red-pale));
  border-left: 3px solid rgba(var(--warning),.5);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .775rem; font-weight: 500; color: rgb(var(--warning));
}
.form-notice.notice-info {
  background: rgb(var(--primary-pale));
  border-left: 3px solid rgba(var(--primary),.5);
  color: rgb(var(--primary));
}
.form-notice svg, .notice-red svg {
  width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ════════════════════════════════════════════════
   5. Foundation Badge / Label → CTBA 標籤
════════════════════════════════════════════════ */
/* Foundation .badge */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 20px;
  font-size: .72rem; font-weight: 700;
  line-height: 1;
}
.badge.primary { background: rgb(var(--primary)); color: #fff; }
.badge.success { background: rgb(var(--success)); color: #fff; }
.badge.warning { background: rgb(var(--warning)); color: #fff; }
.count-badge { /* alias */ }
.count-badge, .badge.primary {
  background: rgb(var(--primary)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 20px; font-size: .7rem; font-weight: 700; vertical-align: middle;
}

/* Foundation .label → 狀態 tag */
.label { border-radius: 20px; font-size: .72rem; font-weight: 700; padding: 3px 10px; }
.label.primary  { background: rgb(var(--primary-pale));    color: rgb(var(--primary));  border: 1px solid rgba(var(--primary),.2); }
.label.success  { background: rgba(43,155,37,.1);          color: rgb(43,155,37);        border: 1px solid rgba(43,155,37,.25); }
.label.warning  { background: rgb(var(--red-pale));         color: rgb(var(--warning));  border: 1px solid rgba(var(--warning),.25); }
.label.secondary{ background: rgba(var(--black)/.06);      color: rgba(var(--black),.55); border: 1px solid rgba(var(--black)/.15); }
/* CTBA status aliases */
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: .72rem; 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-pending { background: rgb(var(--red-pale)); color: rgb(var(--warning)); border: 1px solid rgba(var(--warning),.25); }
.badge-ing     { background: rgb(var(--primary-pale)); color: rgb(var(--primary)); border: 1px solid rgba(var(--primary),.2); }
.badge-wait    { background: rgba(var(--black)/.04); color: rgba(var(--black)/.55); border: 1px solid rgba(var(--black)/.12); }

/* ════════════════════════════════════════════════
   6. Foundation Card → CTBA .reg-card
════════════════════════════════════════════════ */
.card, .reg-card {
  background: rgb(var(--white));
  border: 1px solid rgba(var(--black)/.08);
  border-radius: 5px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.card-divider, .reg-header {
  padding: 1rem 1.4rem .875rem;
  border-bottom: 1px solid rgba(var(--black)/.08);
}
.card-section, .reg-body { padding: 1.1rem 1.4rem; }
.reg-title    { font-size: 1.5rem; font-weight: 900; color: rgb(var(--primary)); margin-bottom: 2px; }
.reg-subtitle { font-size: .78rem; color: rgba(var(--black)/.55); margin: 0; }
.reg-footer {
  text-align: center; padding: .75rem 1.4rem 1rem;
  border-top: 1px solid rgba(var(--black)/.08);
  font-size: .9rem; color: rgba(var(--black)/.55);
}
.reg-footer a { font-weight: 700; color: rgb(var(--warning)); text-decoration: none; }
.reg-footer a:hover { color: rgb(var(--red-bright)); }

/* sub-section（灰底分區卡）*/
.sub-section {
  margin-bottom: 1rem;
  padding: .875rem 1rem;
  background: rgba(var(--black)/.02);
  border: 1px solid rgba(var(--black)/.08);
  border-radius: var(--radius);
}
.sub-section:last-of-type { margin-bottom: 0; }
.sub-heading {
  font-size: .78rem; font-weight: 900;
  color: rgb(var(--primary)); letter-spacing: .05em;
  padding-bottom: 6px; margin-bottom: .75rem;
  border-bottom: 1.5px solid rgba(var(--black)/.10);
  position: relative; display: flex; align-items: center; gap: 8px;
}
.sub-heading::before {
  content: ''; position: absolute; bottom: -1.5px; left: 0;
  width: 28px; height: 1.5px;
  background: rgb(var(--warning)); border-radius: 2px;
}
.sub-heading-sm{ border:1px solid rgba(var(--black)/.05); background: rgba(var(--white)/.5); border-radius: 3px; padding-left:10px;font-size:0.72rem;font-weight:700;color:rgba(var(--black)/.55);margin-bottom:0.5rem;}
.sub-heading-note {
  font-size: .7rem; font-weight: 400;
  color: rgba(var(--black)/.55);
  background: rgba(var(--primary-pale));
  padding: 1px 7px; border-radius: 5px; margin-left: 2px;
}
/* section-heading（表格前標題）*/
.section-heading {
  position: relative;
  font-size: .825rem; font-weight: 900;
  color: rgb(var(--primary)); letter-spacing: .05em;
  padding-bottom: 6px; margin-bottom: .875rem;
  border-bottom: 2px solid rgba(var(--black)/.10);
  display: flex; align-items: center; gap: 8px;
}
.section-heading::before {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 32px; height: 2px;
  background: rgb(var(--warning)); border-radius: 2px;
}

/* ════════════════════════════════════════════════
   7. Foundation Grid 補充 → CTBA form-grid
════════════════════════════════════════════════ */
/* Foundation .grid-x .cell 為主，以下是 CTBA 的 form-grid alias */
.form-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.grid-2    { grid-template-columns: 1fr 1fr; }
.grid-3    { grid-template-columns: 1fr 1fr 1fr; }
.grid-4    { grid-template-columns: repeat(4, 1fr); }
.grid-5    { grid-template-columns: repeat(5, 1fr); }
.col-full  { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .grid-4, .grid-5 { grid-template-columns: 1fr; } }
.section-row { display: flex; gap: .875rem; margin-bottom: .875rem; }
.section-row .sub-section { flex: 1; margin-bottom: 0; }
@media (max-width: 768px) { .section-row { flex-direction: column; } }

/* ════════════════════════════════════════════════
   8. 頁面容器 / 背景
════════════════════════════════════════════════ */
body.form-page {
  display: flex;
  flex-direction: column;         /* 垂直排列 page-wrap 等子元素 */
  align-items: center;            /* 水平居中 */
  justify-content: flex-start;    /* 預設頂對齊 */
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
  background:
    linear-gradient(rgba(10,39,77,.72), rgba(10,39,77,.72)),
    url('../image/bg-baseball.jpg')
    center / cover no-repeat fixed;
}
/* 登入/忘記密碼頁：垂直水平完全居中 */
body.form-page.center-layout {
  justify-content: center;
}

.page-wrap {
  width: 100%; max-width: 860px;
  display: flex; flex-direction: column; gap: 1rem;
  animation: slideUp .4s ease both;
}
.page-wrap.wide   { max-width: 1000px; }
.page-wrap.wider  { max-width: 1200px; }
.page-wrap.narrow { max-width: 480px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════
   9. 球隊資訊卡 / 步驟導航
════════════════════════════════════════════════ */
.team-info-card { background: rgb(var(--white)); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-card); }
.team-info-header {
  display: flex; align-items: center; gap: 14px;
  padding: .875rem 1.4rem;
  background: rgb(var(--primary));
  position: relative; overflow: hidden;
}
.team-info-header::after {
  content: ''; position: absolute; top: 0; right: 0; width: 120px; height: 100%;
  background: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(255,255,255,.04) 5px, rgba(255,255,255,.04) 10px);
}
.team-logo {
  width: 100px; height: 100px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); background: rgb(var(--white));
  display: flex; align-items: center; justify-content: center; overflow: hidden; z-index: 1;
}
.team-info-title { z-index: 1; }
.team-info-title .team-name { font-size: 1.1rem; font-weight: 900; color: #fff; letter-spacing: .03em; line-height: 1.2; }
.team-info-title .team-meta { font-size: .75rem; color: rgba(255,255,255,.65); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-meta-sep { color: rgba(255,255,255,.3); }
.team-info-body { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid rgba(var(--black)/.08); }
@media (max-width: 600px) { .team-info-body { grid-template-columns: repeat(2,1fr); } }
.team-info-field { padding: .625rem 1.1rem; border-right: 1px solid rgba(var(--black)/.08); display: flex; flex-direction: column; gap: 2px; }
.team-info-field:last-child { border-right: none; }
.field-label { font-size: .68rem; font-weight: 700; color: rgba(var(--black)/.35); text-transform: uppercase; letter-spacing: .06em; }
.field-value { font-size: .825rem; font-weight: 700; color: rgb(var(--primary)); }

/* 步驟導航 */
/*.sys-nav { background: rgb(var(--white)); border-radius: 8px; box-shadow: var(--shadow-card); display: flex; overflow: hidden; }
.sys-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: .75rem .5rem; text-decoration: none;
  font-size: .78rem; font-weight: 700; color: rgba(var(--black)/.55);
  border-right: 1px solid rgba(var(--black)/.08);
  position: relative; transition: background var(--ease), color var(--ease);
  background: none; border-top: none; border-bottom: none; border-left: none;
  font-family: inherit; cursor: pointer;
}
.sys-nav-item:last-child { border-right: none; }
.sys-nav-item:hover { background: rgba(var(--black)/.02); color: rgb(var(--primary)); }
.sys-nav-item.done { color: rgb(var(--success)); }
.sys-nav-item.done::after { content: '✓'; position: absolute; top: 6px; right: 8px; font-size: .65rem; font-weight: 900; color: rgb(var(--success)); }
.sys-nav-item.active { color: rgb(var(--primary)); background: rgb(var(--primary-pale)); }
.sys-nav-item.active::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgb(var(--warning)); border-radius: 3px 3px 0 0; }
.nav-icon { width: 20px; height: 20px; color: rgba(var(--black)/.35); transition: color var(--ease); }
.sys-nav-item.active .nav-icon, .sys-nav-item.done .nav-icon { color: inherit; }
.nav-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-step { position: absolute; top: 6px; left: 8px; width: 16px; height: 16px; background: rgba(var(--black)/.12); border-radius: 50%; font-size: .62rem; font-weight: 900; color: rgba(var(--black)/.55); display: flex; align-items: center; justify-content: center; }
.sys-nav-item.active .nav-step { background: rgb(var(--warning)); color: #fff; }
.sys-nav-item.done   .nav-step { background: rgb(var(--success)); color: #fff; }
@media (max-width: 480px) { .sys-nav-item { padding: .625rem .25rem; font-size: .68rem; } .nav-icon { width: 16px; height: 16px; } }
*/
/* ════════════════════════════════════════════════
   10. 成功 Banner / 空白狀態
════════════════════════════════════════════════ */
.success-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 1rem 1.4rem;
  background: rgba(43,155,37,.08);
  border: 1.5px solid rgba(43,155,37,.25);
  border-radius: 8px; box-shadow: var(--shadow-card); flex-wrap: wrap;
}
.success-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  background: rgb(var(--success)); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.success-icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.success-text h2 { font-size: 1rem; font-weight: 900; color: rgb(30,100,28); margin-bottom: 2px; }
.success-text p  { font-size: .78rem; color: rgba(var(--black)/.55); margin: 0; }
.success-badge   { padding: 4px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; background: rgb(var(--success)); color: #fff; white-space: nowrap; }
.empty-state { text-align: center; padding: 2.5rem; color: rgba(var(--black)/.35); font-size: .825rem; }
.empty-state svg { width: 36px; height: 36px; stroke: rgba(var(--black)/.2); fill: none; stroke-width: 1.5; margin: 0 auto .75rem; display: block; }

/* ════════════════════════════════════════════════
   11. 上傳控件
════════════════════════════════════════════════ */
input[type="file"].hidden-file { display: none; }
.btn-upload {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px;
  background: rgb(var(--primary-pale));
  border: 1.5px solid rgba(var(--primary),.25);
  border-radius: var(--radius);
  cursor: pointer; font-size: .75rem; font-weight: 700;
  font-family: inherit; color: rgb(var(--primary));
  transition: all var(--ease);
}
.btn-upload svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-upload:hover { background: rgba(var(--primary),.12); }
.upload-block { display: flex; flex-wrap: wrap; gap: 1rem; }
.upload-block .upload-item { flex: 0 0 auto; display: flex; flex-direction: column; gap: 5px; min-width: 130px; }
.upload-item-label { font-size: .78rem; font-weight: 700; color: rgba(var(--primary),.85); }
.upload-item-spec  { font-size: .67rem; color: rgba(var(--black)/.35); margin-top: -3px; }
.upload-filename   { font-size: .68rem; color: rgba(var(--black)/.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)/.10); overflow: hidden; margin-top: 2px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview.has-img { display: block; }
.upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 1.5rem; background: rgba(var(--black)/.02);
  border: 2px dashed rgba(var(--black)/.18); border-radius: 8px;
  cursor: pointer; transition: all var(--ease); text-align: center;
}
.upload-zone:hover, .upload-zone.dragover { border-color: rgba(var(--primary),.5); background: rgb(var(--primary-pale)); }
.upload-zone svg { width: 28px; height: 28px; stroke: rgba(var(--black)/.2); fill: none; stroke-width: 1.5; }
.upload-zone:hover svg { stroke: rgb(var(--primary)); }
.upload-zone-label { font-size: .825rem; font-weight: 700; color: rgba(var(--black)/.55); }
.upload-zone:hover .upload-zone-label { color: rgb(var(--primary)); }
.upload-zone-hint { font-size: .7rem; color: rgba(var(--black)/.35); }
.upload-file-list { display: flex; flex-direction: column; gap: 6px; margin-top: .75rem; }
.upload-file-item { display: flex; align-items: center; gap: 8px; padding: .5rem .75rem; background: rgb(var(--white)); border: 1px solid rgba(var(--black)/.10); border-radius: var(--radius); font-size: .78rem; }
.upload-file-icon { width: 28px; height: 28px; border-radius: 4px; background: rgb(var(--primary-pale)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.upload-file-icon svg { width: 14px; height: 14px; stroke: rgb(var(--primary)); fill: none; stroke-width: 2; }
.upload-file-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file-size { font-size: .7rem; color: rgba(var(--black)/.35); flex-shrink: 0; }
.upload-file-del { width: 22px; height: 22px; padding: 0; background: none; border: none; cursor: pointer; color: rgba(var(--black)/.35); display: flex; align-items: center; justify-content: center; border-radius: 3px; transition: color var(--ease), background var(--ease); }
.upload-file-del:hover { color: rgb(var(--warning)); background: rgb(var(--red-pale)); }
.upload-file-del svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.upload-count-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.upload-count-badge.has-files { background: rgba(43,155,37,.1); color: rgb(43,155,37); border: 1px solid rgba(43,155,37,.25); }
.upload-count-badge.no-files  { background: rgba(var(--black)/.04); color: rgba(var(--black)/.55); border: 1px solid rgba(var(--black)/.12); }

/* ════════════════════════════════════════════════
   12. 人員欄 / expand-btn
════════════════════════════════════════════════ */
.person-cell { display: flex; align-items: center; gap: 8px; }
.person-avatar-wrap { position: relative; flex-shrink: 0; }
.person-avatar-wrap .avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(var(--black)/.12); display: block; }
.avatar-ph { width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--black)/.04); border: 2px dashed rgba(var(--black)/.18); display: flex; align-items: center; justify-content: center; }
.avatar-ph svg { width: 16px; height: 16px; stroke: rgba(var(--black)/.25); fill: none; stroke-width: 1.5; }
.avatar-reupload { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--ease); opacity: 0; }
.person-avatar-wrap:hover .avatar-reupload { background: rgba(0,0,0,.5); opacity: 1; }
.avatar-reupload svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2.5; }
.avatar-reupload-tip { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.75); color: #fff; font-size: .6rem; white-space: nowrap; padding: 2px 5px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity var(--ease); }
.person-avatar-wrap:hover .avatar-reupload-tip { opacity: 1; }
.person-name { font-weight: 700; font-size: .825rem; }
.expand-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(var(--primary),.1);
  border: 1.5px solid rgba(var(--primary),.2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--ease); color: rgb(var(--primary));
  font-family: inherit; padding: 0;
}
.expand-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; transition: transform var(--ease); }
.expand-btn:hover { background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #fff; }
.btn-del { width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--red-pale)); border: 1.5px solid rgba(var(--warning),.2); border-radius: var(--radius); color: rgb(var(--warning)); cursor: pointer; transition: all var(--ease); }
.btn-del:hover { background: rgba(var(--warning),.12); border-color: rgba(var(--warning),.4); }
.btn-del svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ════════════════════════════════════════════════
   13. 通用 radio / checkbox
════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════
   外框 Radio 統一樣式
   適用：登入身分/隊伍類型/性別/任何 radio 選項
   容器：.radio-group / .role-group / .radio-inline
   選項：.radio-item / .role-item
════════════════════════════════════════════════ */
.radio-group,
.role-group,
.radio-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
  margin-top: 0;
}

/* 選項外框 label */
.radio-item,
.role-item {
  display: inline-flex !important;  /* 強制覆蓋 Foundation label { display:block } */
  align-items: center !important;
  gap: 6px;
  padding: 10px 14px 6px;
  border: 1px solid rgba(var(--black)/.15);
  border-radius: var(--radius);
  background: rgb(var(--white));
  cursor: pointer;
  user-select: none;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(var(--black)/.8);
  line-height: 1.2;
  margin: 0 !important; /* 強制覆蓋 Foundation label { margin-bottom } */
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

/* hover */
.radio-item:hover,
.role-item:hover {
  border: 1px solid rgba(var(--warning)/.5);
  background: rgba(var(--warning)/.04);
  color: rgb(var(--warning));
}

/* 選中 */
.radio-item.is-checked,
.role-item.is-checked {
  border: 1px solid rgba(var(--warning)/.5);
  background: rgba(var(--warning)/.03);
  color: rgb(var(--warning));
  font-weight: 700;
}

/* radio 圓圈 — 全面覆蓋 Foundation / normalize input reset */
.radio-item input[type="radio"],
.role-item input[type="radio"] {
  /* 恢復原生 radio 外觀 */
  -webkit-appearance: auto !important;
  appearance: auto !important;
  /* 固定尺寸，覆蓋 Foundation min-height */
  width: 16px !important;
  height: 16px !important;
  min-height: unset !important;
  /* 清除所有 Foundation / normalize 給 input 的樣式 */
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  /* 對齊 */
  vertical-align: middle !important;
  flex-shrink: 0;
  /* 品牌色 */
  accent-color: rgb(var(--warning));
  cursor: pointer;
}

/* ════════════════════════════════════════════════
   14. 列印基礎
════════════════════════════════════════════════ */
/*.print-header { display: none; }
@media print {
  @page { size: A4; margin: 12mm 14mm; }
  body  { background: #fff !important; padding: 0; display: block; }
  .page-wrap { max-width: 100%; gap: 0; animation: none; }
  .team-info-card, .sys-nav, .action-bar, .save-row, .btn-group,
  .upload-section, .no-print { display: none !important; }
  .reg-card, .card { box-shadow: none !important; border-radius: 0; overflow: visible; border: none; }
  .reg-body, .card-section { padding: 0; }
  .print-header { display: block !important; }
  button, .button, .btn { display: none !important; }
}*/

/* ── 學校組合（縣市 + 學校名）── */
.school-combo {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ════════════════════════════════════════════════
   網站內頁表單容器（signup.htm 等 inner-page 用）
   替代 body.form-page 的獨立頁面全屏布局
════════════════════════════════════════════════ */
.form-cards-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: 1.5rem 0 2rem;
  /* 不需要背景圖和全屏置中，由網站 layout 處理 */
}
.form-cards-wrap .page-wrap {
  /* 若內容有 .page-wrap，移除獨立頁面的動畫和最大寬度限制 */
  max-width: 100%;
  animation: none;
}
