body { font-family: system-ui, Arial, sans-serif; margin: 0; }
.container { max-width: 900px; margin: 0 auto; padding: 16px; }
.topbar { background: #111; color: #fff; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav a { color: #fff; margin-left: 12px; text-decoration: none; }
.nav .muted { margin-left: 12px; opacity: 0.8; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { border: 1px solid #ddd; padding: 8px; }
.panel { background: #f6f6f6; padding: 12px; border: 1px solid #ddd; margin: 12px 0; }

button { padding: 6px 10px; cursor: pointer; }
.messages { list-style: none; padding: 0; }
.messages li { padding: 10px; margin: 8px 0; border: 1px solid #ddd; }
.messages li.success { background: #eef9ee; }
.messages li.error { background: #fdeeee; }
.warn { color: #8a0000; }
.muted { color: #666; }

.nav form { display: inline; }
.nav button {
  background: none;
  border: none;
  color: #fff;
  padding: 0;
  margin-left: 12px;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.form-compact .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-compact .field label { display:block; font-size: 0.9em; margin-bottom: 4px; }
.form-compact input { width: 100%; padding: 8px; box-sizing: border-box; }
.form-compact .checks { margin: 12px 0; }
.form-compact .check { display:block; margin: 6px 0; }
.err { color:#8a0000; font-size: 0.9em; }
.form-errors { background:#fdeeee; border:1px solid #ddd; padding:10px; margin:10px 0; }
@media (max-width: 700px) { .form-compact .grid { grid-template-columns: 1fr; } }

/* bottoni azione */
button.btn {
  border: none;
  color: #fff;
  border-radius: 6px;
}

button.btn-add {
  background-color: #1f7a1f !important;
}

button.btn-remove {
  background-color: #b00020 !important;
}

/* form capitano/vice in griglia */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; margin-bottom: 4px; font-size: 0.9em; }
.field select, .field input { width: 100%; padding: 8px; box-sizing: border-box; }

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
}

.btn-save { background: #1f4fd8; color: #fff; }
.btn-save:disabled { background: #aaa; color: #666; cursor: not-allowed; }

.photo-cell { width: 56px; }
.player-photo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  border: 1px solid #ddd;
}
.player-photo.placeholder {
  background: #eee;
}

.stats { max-width: 260px; }


/* ingrandisci testo tabella, eccetto statistiche */
table td {
  font-size: 1.5rem;
}

table td.stats {
  font-size: 0.9rem;
  line-height: 1.35;
}

/* ===== Login / Auth ===== */

.auth-wrapper {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 8px;
}

.auth-intro {
  text-align: center;
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

.auth-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-size: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
}

.auth-footer a {
  font-weight: 600;
}

/* ===== Footer ===== */

.site-footer {
  margin-top: 48px;
  padding: 16px 0;
  background: #f3f3f3;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  width: 120px;
  height: auto;
}

.footer-title {
  font-weight: 600;
}

.footer-social a {
  margin-left: 12px;
  text-decoration: none;
  font-weight: 500;
}

.footer-social a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .footer-content {
    flex-direction: column;
    gap: 8px;
  }

  .footer-social a {
    margin-left: 0;
    margin-right: 12px;
  }
}

.footer-social {
  display: flex;
  gap: 14px;
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: #333;
  transition: fill 0.2s ease, transform 0.2s ease;
}

.social-link:hover svg {
  fill: #1f4fd8; /* colore hover */
  transform: scale(1.1);
}

.text-positivo { color: #1f7a1f; }
.text-negativo { color: #b00020; }