:root {
  --green: #1D9E75; --green-light: #E1F5EE; --green-dark: #085041;
  --amber: #BA7517; --amber-light: #FAEEDA; --amber-dark: #412402;
  --red: #E24B4A; --red-light: #FCEBEB; --red-dark: #501313;
  --blue: #378ADD; --blue-light: #E6F1FB; --blue-dark: #042C53;
  --gray: #888780; --gray-light: #F1EFE8; --gray-dark: #2C2C2A;
  --purple: #7F77DD; --purple-light: #EEEDFE;
  --coral: #D85A30; --coral-light: #FAECE7;
  --bg: #f5f4f0; --surface: #ffffff;
  --text: #2C2C2A; --text-muted: #888780;
  --border: rgba(0,0,0,0.1);
  --radius: 12px; --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; margin: 0; padding: 0; }

/* HEADER */
.header { background: var(--gray-dark); color: white; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; z-index: 100; }
.header { background: var(--gray-dark); color: white; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; left: 0; width: 100%; z-index: 100; margin-top: 0; }
.logo { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 2px; color: #a8f0d4; }
.header-right { display: flex; align-items: center; gap: 1rem; }
.admin-badge { background: var(--amber); color: white; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; letter-spacing: 1px; }
.viewer-badge { background: var(--gray); color: white; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; letter-spacing: 1px; }
.btn-login { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: 'DM Sans', sans-serif; transition: all 0.2s; }
.btn-login:hover { background: rgba(255,255,255,0.1); }

/* NAV */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); display: flex; gap: 0; overflow-x: auto; }
.nav-btn { padding: 14px 24px; background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-muted); font-family: 'DM Sans', sans-serif; white-space: nowrap; transition: all 0.2s; }
.nav-btn.active { color: var(--green-dark); border-bottom-color: var(--green); }
.nav-btn:hover { color: var(--text); }

/* MAIN */
.main { max-width: 1500px; margin: 0 auto; padding: 1rem 0.75rem; }
@media (min-width: 640px) { .main { padding: 2rem 1rem; } }

/* CARDS */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-title { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 1px; color: var(--green-dark); margin-bottom: 1rem; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }

/* STAT GRID */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 1.25rem; }
@media (min-width: 480px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 1.5rem; } }
.stat-card { background: var(--gray-light); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.stat-card.green { background: var(--green-light); }
.stat-card.amber { background: var(--amber-light); }
.stat-card.red { background: var(--red-light); }
.stat-card.blue { background: var(--blue-light); }
.stat-num { font-family: 'Bebas Neue', sans-serif; font-size: 32px; color: var(--green-dark); }
.stat-card.amber .stat-num { color: var(--amber-dark); }
.stat-card.red .stat-num { color: var(--red-dark); }
.stat-card.blue .stat-num { color: var(--blue-dark); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 2px; }

/* BUTTONS */
.btn { padding: 9px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: var(--gray-light); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e5e3de; }
.btn-danger { background: var(--red-light); color: var(--red-dark); border: 1px solid rgba(226,75,74,0.2); }
.btn-danger:hover { background: #f7c1c1; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-amber { background: var(--amber-light); color: var(--amber-dark); border: 1px solid rgba(186,117,23,0.2); }

/* FORM */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: 'DM Sans', sans-serif; background: var(--surface); color: var(--text); outline: none; transition: border 0.2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--green); }
.form-group input[type=number] { width: 100%; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { background: var(--gray-light); }
th { padding: 10px 12px; text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-light); }
.td-name { font-weight: 600; }
.td-actions { display: flex; gap: 6px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-amber { background: var(--amber-light); color: var(--amber-dark); }
.badge-blue { background: var(--blue-light); color: var(--blue-dark); }
.badge-red { background: var(--red-light); color: var(--red-dark); }
.badge-gray { background: var(--gray-light); color: var(--gray-dark); }
.badge-purple { background: var(--purple-light); color: #3C3489; }
.badge-coral { background: var(--coral-light); color: #4A1B0C; }

/* PITCH */
.pitch-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 500px) { .pitch-container { grid-template-columns: 1fr; } }
@media (max-width: 500px) { .pitch { min-height: 350px; } }
.pitch { background: linear-gradient(180deg, #2d7a3a 0%, #1f5c2a 100%); border-radius: var(--radius); padding: 1rem; position: relative; min-height: 400px; }
.pitch.team-white { background: linear-gradient(180deg, #e9eef3 0%, #cbd6e2 100%); }
.pitch.team-blue { background: linear-gradient(180deg, #0b3764 0%, #042c53 100%); }
.pitch.team-white .pitch-label, .pitch.team-white .pitch-score { color: var(--text); }
.pitch.team-white .pitch-line { border-color: rgba(4,44,83,0.25); }
.pitch.team-white .pitch-line::before { background: rgba(4,44,83,0.18); }
.pitch.team-white .pitch-center-circle, .pitch.team-white .pitch-penalty-area, .pitch.team-white .pitch-goal-area { border-color: rgba(4,44,83,0.18); }
.pitch.team-white .pitch-penalty-spot { background: rgba(4,44,83,0.35); }
.pitch-label { font-family: 'Bebas Neue', sans-serif; font-size: 14px; color: rgba(255,255,255,0.7); letter-spacing: 2px; text-align: center; margin-bottom: 0.5rem; }
.pitch-score { font-family: 'Bebas Neue', sans-serif; font-size: 28px; color: white; text-align: center; margin-bottom: 0.75rem; }
.pitch-line { border: 2px solid rgba(255,255,255,0.25); border-radius: 8px; height: 73%; min-height: 280px; position: relative; display: flex; flex-direction: column; padding: 14px; gap: 22px; justify-content: space-between; overflow: hidden; }
@media (max-width: 500px) { .pitch-line { gap: 12px; padding: 8px; min-height: 280px; } }
.pitch-row { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 38px; position: relative; z-index: 2; }
.pitch-row-count-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; width: 100%; gap: 12px; }
.pitch-row-count-3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; width: 100%; gap: 12px; }
.pitch-row-count-3 .player-chip:last-child { grid-column: 1 / -1; }
.pitch-row-midfield-wide { width: 100%; gap: 36px; }
.pitch-row-wrap-three { max-width: 250px; margin-left: auto; margin-right: auto; }

/* Field Markings */
.pitch-line::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: rgba(255,255,255,0.2); transform: translateY(-50%); pointer-events: none; z-index: 0; }
.pitch-center-circle { position: absolute; top: 50%; left: 50%; width: 50px; height: 50px; border: 2px solid rgba(255,255,255,0.2); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; }
@media (max-width: 500px) { .pitch-center-circle { width: 30px; height: 30px; } }
.pitch-half-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(255,255,255,0.2); pointer-events: none; z-index: 0; }
.pitch-penalty-area { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 65%; height: 40px; border: 2px solid rgba(255,255,255,0.2); border-top: none; pointer-events: none; z-index: 0; }
.pitch-penalty-area.bottom { top: auto; bottom: 8px; border-top: 2px solid rgba(255,255,255,0.2); border-bottom: none; }
.pitch-goal-area { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 35%; height: 20px; border: 2px solid rgba(255,255,255,0.2); border-top: none; pointer-events: none; z-index: 0; }
.pitch-goal-area.bottom { top: auto; bottom: 8px; border-top: 2px solid rgba(255,255,255,0.2); border-bottom: none; }
.pitch-penalty-spot { position: absolute; top: 55px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; background: rgba(255,255,255,0.5); border-radius: 50%; pointer-events: none; z-index: 0; }
.pitch-penalty-spot.bottom { top: auto; bottom: 55px; }
.player-chip { background: #fff; border-radius: 6px; padding: 7px 10px; min-width: 96px; max-width: 128px; text-align: center; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; position: relative; z-index: 3; opacity: 1; }
.player-chip > * { pointer-events: none; }
.player-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.16); }
.player-chip .pname { font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip .prole { font-size: 9px; color: var(--text-muted); }
.player-chip.gk { background: #FAEEDA; }
.player-chip.att { background: #FCEBEB; }
.player-chip.mid { background: var(--blue-light); }
.player-chip.def { background: var(--green-light); }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000; align-items: flex-end; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; padding: 1.5rem 1.25rem; width: 100%; max-width: 100%; max-height: 92vh; overflow-y: auto; }
.modal-title { font-family: 'Bebas Neue', sans-serif; font-size: 22px; color: var(--green-dark); margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; justify-content: flex-end; flex-wrap: wrap; }
.modal-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 1.25rem; }
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1rem; }
  .modal { border-radius: var(--radius); max-width: 680px; max-height: 90vh; }
  .modal-handle { display: none; }
}
.modal-wide { max-width: 900px; }

/* LOGIN */
.login-form { max-width: 340px; margin: 3rem auto; }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.section-title { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 1px; color: var(--text); }

/* MATCH WEEK SELECTOR */
.week-selector { display: flex; align-items: center; gap: 0.5rem; }
.week-selector select { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: 'DM Sans', sans-serif; }

/* TOAST */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--green-dark); color: white; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 14px; z-index: 2000; opacity: 0; transform: translateY(20px); transition: all 0.3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

/* DIVIDER */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* RANK TABLE */
.rank-num { font-family: 'Bebas Neue', sans-serif; font-size: 18px; color: var(--text-muted); }
.rank-1 .rank-num { color: #BA7517; }
.rank-2 .rank-num { color: #444441; }
.rank-3 .rank-num { color: var(--coral); }

/* TEAM BUILDER */
.team-section { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.team-box { border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.team-box.team-a { border-color: rgba(44,44,42,0.22); background: #fff; }
.team-box.team-b { border-color: rgba(4,44,83,0.35); background: #eef4fb; }
.team-box-title { font-weight: 700; font-size: 14px; margin-bottom: 0.75rem; }
.team-a .team-box-title { color: var(--text); }
.team-b .team-box-title { color: var(--blue-dark); }

.text-import-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; margin-bottom: 1rem; background: var(--gray-light); }
.text-import-toggle { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
.text-import-input { display: none; width: 100%; margin-top: 0.75rem; min-height: 110px; resize: vertical; font-family: 'DM Sans', sans-serif; font-size: 13px; line-height: 1.35; }
.text-import-box.enabled .text-import-input { display: block; }

.player-slot { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--gray-light); border-radius: var(--radius-sm); margin-bottom: 6px; cursor: pointer; transition: all 0.15s; }
.player-slot:hover { background: #e5e3de; }
.player-slot.selected { background: var(--green-light); border: 1px solid var(--green); }
.player-slot .slot-role { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); width: 22px; }
.player-slot .slot-name { font-size: 13px; font-weight: 500; flex: 1; }

.page { display: none; }
.page.active { display: block; }

.info-box { background: var(--blue-light); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 13px; color: var(--blue-dark); margin-bottom: 1rem; }
.warn-box { background: var(--amber-light); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 13px; color: var(--amber-dark); margin-bottom: 1rem; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 760px) { .two-col { grid-template-columns: minmax(0, 1.65fr) minmax(340px, 0.85fr); gap: 1.75rem; } }
@media (max-width: 640px) {
  .header { height: auto; min-height: 56px; padding: 8px 12px; gap: 10px; }
  .logo { font-size: 24px; line-height: 0.9; letter-spacing: 1.5px; max-width: 116px; }
  .header-right { gap: 8px; margin-left: auto; }
  .admin-badge, .viewer-badge { font-size: 10px; padding: 3px 8px; }
  .btn-login { padding: 6px 10px; font-size: 12px; }
  #btnSettings { width: 52px; padding-left: 0; padding-right: 0; }
  .nav { scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .team-section, .pitch-container { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-btn { padding: 9px 14px; font-size: 13px; }
  .card { padding: 0.85rem; margin-bottom: 0.75rem; }
  .match-card-inner { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 6px 10px; }
  .match-card-meta { min-width: 0; }
  .match-card-date { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .match-card-format { font-size: 16px; }
  .match-card-score { grid-column: 2; grid-row: 1 / span 2; min-width: 58px; }
  .match-card-score-num { font-size: 26px; letter-spacing: 1px; white-space: nowrap; }
  .match-card-winner { display: none; }
  .match-card-teams { grid-column: 1 / -1; min-width: 0; text-align: left; font-size: 12px; line-height: 1.3; }
  .match-card-team-a, .match-card-team-b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .detail-score-card { padding: 0.7rem; overflow: hidden; }
  .detail-score-main { display: grid; grid-template-columns: minmax(74px, 1fr) auto minmax(74px, 1fr); gap: 6px; }
  .detail-score-team { min-width: 0; font-size: 13px; line-height: 1.15; }
  .detail-score-num { font-size: 44px; letter-spacing: 2px; }
}

/* PARTITA STATS INLINE */
.pstat-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.pstat-name { font-weight: 600; font-size: 13px; flex: 1; }
.pstat-mini { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pstat-field { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pstat-field label { font-size: 16px; line-height: 1; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.pstat-field input { width: 44px; padding: 4px; text-align: center; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: 'DM Sans', sans-serif; }
.pstat-field input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--green); }
.pstat-cambio { min-width: 58px; }
.pstat-auto span { min-width: 44px; padding: 5px 6px; border-radius: 4px; background: var(--gray-light); color: var(--text); font-size: 13px; font-weight: 800; text-align: center; }
.partita-legend { margin-top: 0; margin-bottom: 0.75rem; }
.partita-score-grid { margin-bottom: 1rem; }
.team-stat-title { font-weight: 700; font-size: 14px; margin: 1rem 0 0.5rem; }
.team-stat-a { color: var(--text); }
.team-stat-b { color: var(--blue-dark); }

.match-card { cursor: pointer; }
.match-card-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.match-card-date { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.match-card-format { font-family: 'Bebas Neue', sans-serif; font-size: 18px; }
.match-card-score { text-align: center; }
.match-card-score-num { font-family: 'Bebas Neue', sans-serif; font-size: 36px; line-height: 1; }
.match-card-winner { font-size: 11px; color: var(--text-muted); }
.match-card-teams { font-size: 13px; text-align: right; min-width: 220px; }
.match-card-team-a { color: var(--text); font-weight: 600; }
.match-card-team-b { color: var(--blue-dark); font-weight: 600; margin-top: 4px; }

.detail-score-card { text-align: center; margin-bottom: 1.25rem; padding: 0.75rem; background: var(--gray-light); border-radius: var(--radius-sm); }
.detail-score-format { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.detail-score-main { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.detail-score-team { font-size: 13px; font-weight: 700; min-width: 120px; }
.detail-score-team-a { color: var(--text); text-align: right; }
.detail-score-team-b { color: var(--blue-dark); text-align: left; }
.detail-score-num { font-family: 'Bebas Neue', sans-serif; font-size: 52px; line-height: 1; letter-spacing: 4px; white-space: nowrap; }
.detail-score-winner { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* CAMPO DETTAGLIO */
.campo-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 500px) { .campo-wrap { grid-template-columns: 1fr; } }
.campo { background: linear-gradient(180deg, #2d7a3a 0%, #1f5c2a 100%); border-radius: 10px; padding: 10px; min-height: 320px; display: flex; flex-direction: column; }
.campo.team-white { background: linear-gradient(180deg, #e9eef3 0%, #cbd6e2 100%); }
.campo.team-blue { background: linear-gradient(180deg, #0b3764 0%, #042c53 100%); }
.campo.team-white .campo-team-name, .campo.team-white .campo-score, .campo.team-white .campo-pname { color: var(--text); text-shadow: none; }
.campo.team-white .campo-field { border-color: rgba(4,44,83,0.2); }
.campo-header { text-align: center; margin-bottom: 8px; }
.campo-team-name { font-family: 'Bebas Neue', sans-serif; font-size: 13px; color: rgba(255,255,255,0.75); letter-spacing: 2px; }
.campo-score { font-family: 'Bebas Neue', sans-serif; font-size: 32px; color: white; line-height: 1; }
.campo-field { border: 2px solid rgba(255,255,255,0.2); border-radius: 8px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 10px; gap: 14px; }
.campo-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; width: 100%; }
.campo-row-count-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; gap: 14px; }
.campo-row-count-3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; gap: 14px; }
.campo-row-count-3 .campo-player:last-child { grid-column: 1 / -1; }
.campo-row-midfield-wide { gap: 40px; }
.campo-player { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 86px; }
.campo-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(255,255,255,0.9); box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.campo-avatar.gk { background: #FAEEDA; }
.campo-avatar.def { background: #E1F5EE; }
.campo-avatar.mid { background: #E6F1FB; }
.campo-avatar.att { background: #FCEBEB; }
.campo-pname { font-size: 9px; font-weight: 700; color: white; text-shadow: 0 1px 3px rgba(0,0,0,0.7); text-align: center; max-width: 82px; line-height: 1.2; }
.campo-gol { font-size: 9px; color: #FFD700; font-weight: 700; }
.dashboard-match-link { appearance: none; border: 0; background: transparent; padding: 0; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; text-align: left; }
.dashboard-match-link:hover { text-decoration: underline; }

/* STAT TABLE MOBILE */
.stat-mobile-list { display: flex; flex-direction: column; gap: 0; }
.stat-mobile-row { display: flex; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.stat-mobile-row:last-child { border-bottom: none; }
.stat-mobile-name { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; }
.stat-mobile-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.stat-pill { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; }
.pill-gol { background: var(--red-light); color: var(--red-dark); }
.pill-ass { background: var(--blue-light); color: var(--blue-dark); }
.pill-cart { background: var(--amber-light); color: var(--amber-dark); }
.pill-sub { background: var(--green-light); color: var(--green-dark); }
.pill-aut { background: var(--purple-light); color: #3C3489; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 1rem; }
.empty p { font-size: 14px; }

/* PLAYER PROFILE */
.player-name-link { appearance: none; border: 0; background: transparent; padding: 0; color: var(--green-dark); cursor: pointer; font: inherit; font-weight: 700; text-align: left; }
.player-name-link:hover { text-decoration: underline; }
.player-field-link { appearance: none; border: 0; background: transparent; padding: 0; color: inherit; cursor: pointer; font: inherit; font-weight: 800; text-shadow: inherit; }
.player-field-link:hover { text-decoration: underline; }
.player-profile-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: linear-gradient(135deg, #ffffff 0%, #eef4fb 100%); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.player-profile-kicker { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.player-profile-name { font-family: 'Bebas Neue', sans-serif; font-size: 52px; line-height: 0.95; color: var(--text); letter-spacing: 1px; margin-top: 0.35rem; }
.player-profile-role { margin-top: 0.75rem; }
.player-profile-role .badge { font-size: 15px; padding: 8px 14px; border-radius: 999px; }
.player-profile-meta { display: flex; flex-direction: column; gap: 0.35rem; color: var(--text-muted); font-size: 13px; text-align: right; }
.player-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 1rem; }
.player-profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.player-profile-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.player-profile-value { margin-top: 4px; font-family: 'Bebas Neue', sans-serif; font-size: 30px; color: var(--green-dark); letter-spacing: 1px; line-height: 1; }
.player-profile-sub { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
@media (max-width: 640px) {
  .match-card-inner { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 6px 10px; }
  .match-card-meta { min-width: 0; }
  .match-card-date { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .match-card-format { font-size: 16px; }
  .match-card-score { grid-column: 2; grid-row: 1 / span 2; min-width: 58px; }
  .match-card-score-num { font-size: 26px; letter-spacing: 1px; white-space: nowrap; }
  .match-card-winner { display: none; }
  .match-card-teams { grid-column: 1 / -1; min-width: 0; text-align: left; font-size: 12px; line-height: 1.3; }
  .match-card-team-a, .match-card-team-b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .detail-score-card { padding: 0.7rem; overflow: hidden; }
  .detail-score-main { display: grid; grid-template-columns: minmax(74px, 1fr) auto minmax(74px, 1fr); gap: 6px; }
  .detail-score-team { min-width: 0; font-size: 13px; line-height: 1.15; }
  .detail-score-num { font-size: 44px; letter-spacing: 2px; }
}
@media (max-width: 500px) {
  .pitch-row { gap: 8px; }
  .player-chip { min-width: 78px; max-width: 104px; padding: 6px 8px; }
  .player-profile-hero { align-items: flex-start; flex-direction: column; padding: 1rem; }
  .player-profile-name { font-size: 40px; }
  .player-profile-meta { text-align: left; }
}
@media (max-width: 380px) {
  .detail-score-team { font-size: 12px; }
  .detail-score-num { font-size: 38px; letter-spacing: 1px; }
}
