﻿/* ==========================================================================
   CONFUSA.top - Jogos de Clubes (Light Theme 2.0)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Share+Tech+Mono&display=swap');

:root {
  --primary-blue: #0284c7;
  --primary-hover: #0369a1;
  --bg-gradient: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(226, 232, 240, 0.95) 100%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: 1px solid rgba(0, 0, 0, 0.08);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #ef4444;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif !important;
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding-top: 60px !important;
  background-image: 
    linear-gradient(180deg, rgba(248, 250, 252, 0.85) 0%, rgba(226, 232, 240, 0.95) 100%),
    url("/images/confusa-blue.png") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  overflow-x: hidden;
}

.bg {
  display: none !important;
}

/* Header legados */
html body #logged-user {
  display: none !important;
}

html body #top-bar {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html body #bottom-bar {
  margin-top: auto !important;
  position: relative !important;
  background: rgba(15, 23, 42, 0.95) !important;
}

/* Container Principal */
.clubes-container {
  max-width: 1280px;
  width: 95%;
  margin: 2rem auto;
  flex: 1;
}

.clubes-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--card-border);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

/* Cabeçalho da Página */
.clubes-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.clubes-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clubes-title-icon {
  font-size: 2.2rem;
  color: var(--primary-blue);
}

.clubes-main-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.1;
}

.clubes-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
}

.clubes-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botões de Ação */
.btn-clubes-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none !important;
  border: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-clubes-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  color: #ffffff !important;
}

.btn-clubes-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #334155 !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-clubes-secondary:hover {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.4);
  color: #0284c7 !important;
  transform: translateY(-2px);
}

/* Barra de Filtro e Busca */
.search-wrapper-clubes {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 12px !important;
  padding: 4px 12px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.25s ease !important;
  min-width: 260px !important;
  max-width: 380px !important;
  box-sizing: border-box !important;
}

.search-wrapper-clubes:focus-within {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.search-wrapper-clubes input#caixa_pesquisa,
.search-wrapper-clubes .search-input-clubes,
#caixa_pesquisa {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  padding: 6px 8px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 0.9rem !important;
  color: #1e293b !important;
  flex: 1 !important;
  width: 100% !important;
  height: 32px !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.search-wrapper-clubes span.material-symbols-outlined,
.search-icon-clubes {
  color: #94a3b8 !important;
  font-size: 1.3rem !important;
  cursor: default !important;
  position: static !important;
  transform: none !important;
  flex-shrink: 0 !important;
}

/* Tabela de Jogos */
.tbl_user_data {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
}

table.clubes-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Montserrat', sans-serif;
}

table.clubes-table thead th {
  background: #f8fafc;
  color: #475569;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
}

table.clubes-table thead th.headings {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}

table.clubes-table thead th.headings:hover {
  background: rgba(2, 132, 199, 0.08) !important;
  color: #0284c7 !important;
}

table.clubes-table tbody td {
  padding: 12px 14px;
  color: #1e293b;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
  text-align: center;
  transition: background 0.15s ease;
}

table.clubes-table tbody tr:hover td {
  background: rgba(2, 132, 199, 0.03);
}

table.clubes-table tbody tr {
  cursor: pointer;
}

/* Células de Time */
.team-crest {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 6px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.team-name-link {
  font-weight: 600;
  color: #0f172a !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.team-name-link:hover {
  color: #0284c7 !important;
}

.score-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0284c7;
}

.penalty-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.btn-delete-match {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #fecdd3;
  color: #e11d48;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-match:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  transform: scale(1.05);
}

.btn-delete-match span {
  font-size: 1.1rem;
}

/* Setas e classes de ordenação */
th span.material-symbols-outlined.hidden,
span.material-symbols-outlined.hidden,
.hidden {
  display: none !important;
}

th span.material-symbols-outlined {
  font-size: 1.2rem !important;
  vertical-align: middle !important;
}

th span.material-symbols-outlined.ascending,
th span.material-symbols-outlined.descending {
  color: #0284c7 !important;
}

.highlighted {
  background-color: rgba(2, 132, 199, 0.08) !important;
  color: #0284c7 !important;
}

/* Paginação */
.pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.pagination-info {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
}

.pagination li button.pagination_link,
.pagination li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination li button.pagination_link:hover:not(:disabled),
.pagination li a:hover {
  background: #f8fafc;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
}

.pagination li button.pagination_link.active,
.pagination li.active a {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.sr-only {
  display: none !important;
}

/* ==========================================================================
   Detalhes da Partida (View)
   ========================================================================== */

.match-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 1rem;
}

.match-scoreboard-card {
  width: 100%;
  max-width: 850px;
  margin: 1.5rem auto;
  padding: 1.8rem 2rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scoreboard-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.scoreboard-crest {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s ease;
}

.scoreboard-crest:hover {
  transform: scale(1.08);
}

.scoreboard-team-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none !important;
}

.scoreboard-team-name:hover {
  color: #0284c7 !important;
}

.scoreboard-score-center {
  padding: 0 1.5rem;
  text-align: center;
}

.scoreboard-score-text {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 2px;
  line-height: 1;
}

.scoreboard-penalty {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 6px;
  display: inline-block;
}

/* Metadados */
.match-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 1.5rem auto;
  max-width: 850px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.meta-pill span.material-symbols-outlined {
  font-size: 1.1rem;
  color: #0284c7;
}

/* Eventos da Partida */
.match-events-box {
  max-width: 850px;
  margin: 2rem auto;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.events-box-title {
  background: #f8fafc;
  padding: 12px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #334155;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease;
}

.event-item-row:last-child {
  border-bottom: none;
}

.event-item-row:hover {
  background: rgba(2, 132, 199, 0.02);
}

.event-minute-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  min-width: 35px;
}

.event-icon-badge {
  font-size: 1.25rem !important;
}

.goal, .event-icon-badge.goal { color: #10b981 !important; }
.yellow-card, .event-icon-badge.yellow-card { color: #f59e0b !important; }
.red-card, .event-icon-badge.red-card { color: #ef4444 !important; }
.own-goal, .event-icon-badge.own-goal { color: #ef4444 !important; }

/* Escalações */
.lineups-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 2rem auto 0 auto;
}

.lineup-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.lineup-team-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 2px solid #0284c7;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.lineup-section-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  margin: 14px 0 8px 0;
  display: block;
}

.player-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 0.9rem;
}

.player-item-row:last-child {
  border-bottom: none;
}

.player-pos-tag {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  padding: 2px 4px;
  border-radius: 4px;
  margin-right: 8px;
}

.player-link-clean {
  color: #1e293b !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.player-link-clean:hover {
  color: #0284c7 !important;
}

.sub-tag-in {
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
}

.sub-tag-out {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
}

/* ==========================================================================
   Editor de Partida (Editar)
   ========================================================================== */

.editor-sticky-bar {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 12px 20px;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.editor-form-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.editor-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1.25rem;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-card-title span.material-symbols-outlined {
  color: #0284c7;
}

/* ==========================================================================
   Área de Importação / Dropzone (importar_jogo.php)
   ========================================================================== */
.centralize_text {
  text-align: center;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.box {
  font-size: 1.05rem;
  background-color: #ffffff;
  position: relative;
  padding: 80px 20px;
  border-radius: 16px;
  border: 2px dashed rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease-in-out;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

.box.has-advanced-upload {
  outline: none;
}

.box.is-dragover {
  background-color: rgba(2, 132, 199, 0.05);
  border-color: #0284c7;
  transform: scale(1.01);
}

.box__dragndrop,
.box__icon {
  display: inline;
}

.box.is-uploading .box__input,
.box.is-success .box__input,
.box.is-error .box__input {
  visibility: hidden;
}

.box__uploading,
.box__success,
.box__error {
  display: none;
}

.box.is-uploading .box__uploading,
.box.is-success .box__success,
.box.is-error .box__error {
  display: block;
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  transform: translateY(-50%);
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
}

.box__uploading {
  color: #0284c7;
  font-style: italic;
}

.box__success {
  color: #10b981;
  background: #ecfdf5;
  padding: 16px;
  border-radius: 12px;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid #a7f3d0;
}

.box__error {
  color: #ef4444;
  background: #fef2f2;
  padding: 16px;
  border-radius: 12px;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid #fecaca;
}

.box__file {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.box__file + label {
  max-width: 90%;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  display: inline-block;
  overflow: hidden;
  color: #334155;
  font-size: 1.05rem;
}

.box__file + label strong {
  color: #0284c7;
  font-weight: 700;
}

.box__file + label:hover strong {
  color: #0369a1;
  text-decoration: underline;
}

.box__button {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
  background-color: #0284c7;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  margin: 20px auto 0;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
  display: inline-block;
}

.box__button:hover {
  background-color: #0369a1;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .clubes-card {
    padding: 1.25rem;
  }

  .match-scoreboard-card {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 1rem;
  }

  .lineups-grid {
    grid-template-columns: 1fr;
  }

  .editor-sticky-bar {
    top: 45px;
    padding: 10px 14px;
  }
}
