/* Club Voting v1.8.17 */
/* ── Root ── */
#cv-root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1a1a1a; width: 100%; box-sizing: border-box; padding-bottom: 60px; }

/* ── Screens ── */
.cv-screen { display: none; }
.cv-active { display: block; }

/* ── Player-facing screens: narrow and centred ── */
#cv-home, #cv-tickets, #cv-2fa, #cv-forgot, #cv-reset, #cv-vote, #cv-voted {
  max-width: 480px; margin: 0 auto; box-sizing: border-box;
}
#cv-login { max-width: 560px; margin: 0 auto; box-sizing: border-box; }

/* ── Manager dashboard: full width ── */
#cv-dash, #cv-qr, #cv-trophy { width: 100%; box-sizing: border-box; }
#cv-tab-squad, #cv-tab-games, #cv-tab-results, #cv-tab-trophy {
  width: 100%; box-sizing: border-box; display: block;
}

/* ── Typography ── */
.cv-h1 { font-size: 22px; font-weight: 500; margin: 0 0 4px; }
.cv-h2 { font-size: 18px; font-weight: 500; margin: 0 0 12px; }
.cv-h3 { font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.cv-subtitle { font-size: 14px; color: #666; margin: 0 0 20px; }
.cv-muted { font-size: 13px; color: #666; margin: 0; }

/* ── Cards ── */
.cv-card { background: #fff; border: 0.5px solid #e0e0e0; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-sizing: border-box; width: 100%; display: block; }

/* ── Inputs ── */
.cv-input { display: block; width: 100%; padding: 10px 12px; border: 0.5px solid #ccc; border-radius: 8px; font-size: 15px; color: #1a1a1a; background: #fff; margin-bottom: 10px; box-sizing: border-box; font-family: inherit; }
.cv-input:focus { outline: none; border-color: #888; }

/* ── Buttons ── */
.cv-btn { display: block; width: 100%; padding: 12px; border: 0.5px solid #ccc; border-radius: 8px; font-size: 15px; font-family: inherit; color: #1a1a1a; background: transparent; cursor: pointer; margin-bottom: 8px; transition: background .15s, color .15s, border-color .15s; text-align: center; box-sizing: border-box; }
.cv-btn:hover { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.cv-btn:active { transform: scale(.98); }
.cv-btn-primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.cv-btn-primary:hover { background: #333; border-color: #333; }
.cv-btn-sm { display: inline-block; width: auto; padding: 6px 14px; font-size: 13px; margin-bottom: 0; }
.cv-btn-danger { border-color: #c0392b; color: #c0392b; background: transparent; }
.cv-btn-danger:hover { background: #c0392b; color: #fff; border-color: #c0392b; }
.cv-btn-gold { background: #BA7517; color: #fff; border-color: #BA7517; }
.cv-btn-gold:hover { background: #9a6012; border-color: #9a6012; }

/* ── Nav back ── */
.cv-back { font-size: 14px; color: #888; cursor: pointer; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 6px; }
.cv-back:hover { color: #1a1a1a; }

/* ── Alerts ── */
.cv-alert { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.cv-alert-error   { background: #fdf0f0; color: #c0392b; border: 0.5px solid #e88; }
.cv-alert-info    { background: #E6F1FB; color: #185FA5; border: 0.5px solid #85B7EB; }
.cv-alert-success { background: #EAF3DE; color: #27500A; border: 0.5px solid #97C459; }

/* ── Tabs ── */
.cv-tabs { display: flex; gap: 6px; margin-bottom: 16px; width: 100%; box-sizing: border-box; }
.cv-tab { flex: 1; padding: 8px 4px; border: 0.5px solid #ccc; border-radius: 8px; background: transparent; font-size: 13px; cursor: pointer; color: #888; font-family: inherit; }
.cv-tab-active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* ── Player rows ── */
.cv-player-row { display: block; padding: 10px 0; border-bottom: 0.5px solid #eee; width: 100%; box-sizing: border-box; text-align: left; }
.cv-player-row:last-child { border-bottom: none; }
.cv-player-row-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
.cv-player-name { display: flex; align-items: center; gap: 10px; text-align: left; }
.cv-player-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Avatar ── */
.cv-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex-shrink: 0; background: #deeaf7; color: #185FA5; }
.cv-avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.cv-avatar-lg { width: 54px; height: 54px; font-size: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 500; flex-shrink: 0; }

/* ── Anon note ── */
.cv-anon-note { display: flex; align-items: center; gap: 8px; background: #f5f5f5; border-radius: 8px; padding: 9px 12px; font-size: 13px; color: #666; margin-bottom: 14px; }

/* ── Vote progress ── */
.cv-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.cv-prog-pill { flex: 1; height: 5px; border-radius: 3px; background: #e0e0e0; transition: background .2s; }
.cv-prog-3 { background: #BA7517; }
.cv-prog-2 { background: #185FA5; }
.cv-prog-1 { background: #534AB7; }

/* ── Step header ── */
.cv-step-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cv-step-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex-shrink: 0; }
.cv-step-active   { background: #1a1a1a; color: #fff; }
.cv-step-done     { background: #EAF3DE; color: #27500A; }
.cv-step-inactive { background: #f0f0f0; color: #999; }

/* ── Vote cards ── */
.cv-vote-card { background: #fff; border: 2px solid #e0e0e0; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: border-color .12s, background .12s; width: 100%; box-sizing: border-box; }
.cv-vote-card:hover { border-color: #aaa; }
.cv-vc-3 { border-color: #BA7517; background: #FAEEDA; }
.cv-vc-2 { border-color: #185FA5; background: #E6F1FB; }
.cv-vc-1 { border-color: #534AB7; background: #EEEDFE; }
.cv-rank-badge { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.cv-badge-3 { background: #FAC775; color: #412402; }
.cv-badge-2 { background: #B5D4F4; color: #042C53; }
.cv-badge-1 { background: #CECBF6; color: #26215C; }

/* ── Confirm pills ── */
.cv-confirm-pill { flex: 1; border-radius: 8px; padding: 10px 8px; text-align: center; }

/* ── Leaderboard ── */
.cv-lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid #eee; width: 100%; box-sizing: border-box; text-align: left; }
.cv-lb-row:last-child { border-bottom: none; }
.cv-rank-num { font-size: 14px; font-weight: 500; min-width: 22px; text-align: center; }
.cv-pts { margin-left: auto; font-size: 14px; font-weight: 500; }

/* ── Game cards ── */
.cv-game-card { background: #fff; border: 1.5px solid #e0e0e0; border-radius: 12px; padding: 16px; margin-bottom: 14px; width: 100%; box-sizing: border-box; }
.cv-game-card-header { margin-bottom: 14px; }
.cv-game-round { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.cv-game-opponent { font-size: 20px; font-weight: 600; color: #1a1a1a; margin-bottom: 3px; line-height: 1.2; }
.cv-game-meta { font-size: 13px; color: #999; margin-bottom: 6px; }
.cv-game-status { font-size: 13px; font-weight: 500; }
.cv-game-manage-btn { margin-bottom: 10px; font-size: 16px; padding: 14px; }
.cv-game-secondary-actions { display: flex; gap: 6px; }
.cv-game-secondary-actions .cv-btn { flex: 1; font-size: 12px; padding: 7px 4px; margin-bottom: 0; }

/* ── Trophy ── */
.cv-trophy-1 { background: #FAEEDA; border: 2px solid #BA7517; border-radius: 12px; padding: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box; }
.cv-trophy-2 { background: #F1EFE8; border: 1.5px solid #B4B2A9; border-radius: 12px; padding: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box; }
.cv-trophy-3 { background: #F5EBE0; border: 1.5px solid #A0522D; border-radius: 12px; padding: 13px; margin-bottom: 10px; display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box; }
.cv-trophy-other { padding: 10px 0; border-bottom: 0.5px solid #eee; display: flex; align-items: center; gap: 12px; }
.cv-trophy-other:last-child { border-bottom: none; }

/* ── Stat cards ── */
.cv-stat-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.cv-stat { background: #f5f5f5; border-radius: 8px; padding: 10px 18px; text-align: center; }
.cv-stat-num { font-size: 22px; font-weight: 500; }
.cv-stat-lbl { font-size: 12px; color: #888; }

/* ── Spinner ── */
.cv-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #ddd; border-top-color: #555; border-radius: 50%; animation: cv-spin .6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes cv-spin { to { transform: rotate(360deg); } }
.cv-loading { text-align: center; padding: 24px; color: #888; font-size: 14px; }

/* ── Help button ── */
.cv-help-btn { width:30px;height:30px;border-radius:50%;border:1.5px solid #ccc;background:#fff;font-size:15px;font-weight:500;cursor:pointer;color:#888;display:flex;align-items:center;justify-content:center;flex-shrink:0; }
.cv-help-btn:hover { border-color:#1a1a1a;color:#1a1a1a; }

/* ── Help panel ── */
.cv-help-step { display:flex;gap:12px;margin-bottom:16px; }
.cv-help-step:last-child { margin-bottom:0; }
.cv-help-num { width:24px;height:24px;border-radius:50%;background:#1a1a1a;color:#fff;font-size:12px;font-weight:500;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px; }
.cv-help-step p { font-size:14px;color:#666;margin:4px 0 0; }
.cv-help-step strong { font-size:14px;color:#1a1a1a; }
.cv-help-step code { font-size:12px;background:#f0f0f0;padding:2px 6px;border-radius:4px;font-family:monospace; }
.cv-help-section { border-bottom:0.5px solid #eee;padding-bottom:16px; }
.cv-help-section:last-child { border-bottom:none; }

/* ── Game player checkboxes ── */
.cv-check-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:0.5px solid #eee; cursor:pointer; width:100%; box-sizing:border-box; text-align:left; }
.cv-check-row:last-of-type { border-bottom:none; }
.cv-check-row input[type=checkbox] { width:18px; height:18px; min-width:18px; flex-shrink:0; cursor:pointer; accent-color:#1a1a1a; margin:0; }
.cv-check-row .cv-avatar { flex-shrink:0; }
.cv-check-row span { text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
.cv-check-row:hover { background:#fafafa; }
