/* ==============================
   VARIABLES Y ESTILOS GLOBALES
============================== */
:root {
  --sf-bg: #0b1220;
  --sf-card: #0f172a;
  --sf-text: #e5e7eb;
  --sf-sub: #94a3b8;
  --sf-accent: #3b82f6;
  --sf-accent-2: #22d3ee;
  --sf-border: rgba(255, 255, 255, 0.08);
  --sf-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
}

/* ==============================
   CONTENEDOR FORMULARIO REGISTRO
============================== */
.sf-registro-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}

/* ==============================
   GRID FORMULARIO
============================== */
.sf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* ==============================
   LABELS
============================== */
.sf-registro-container label {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
}

/* ==============================
   INPUTS / SELECT / TEXTAREA
============================== */
.sf-registro-container input,
.sf-registro-container select,
.sf-registro-container textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

.sf-registro-container textarea {
  min-height: 120px;
  resize: vertical;
}

/* ==============================
   BOTONES (ESTILOS UNIFICADOS)
============================== */
.sf-sf-btn,
.sf-registro-container button[type=submit],
.user-panel button,
.board-panel button,
button,
input[type=submit] {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 20px 2px rgba(0, 0, 0, 0.3);
  background-color: #000aef47 !important;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 16px;
  text-align: center;
  margin-right: 8px;
  margin-bottom: 5px;
  min-width: 120px;
}

.sf-sf-btn:hover,
.sf-registro-container button[type=submit]:hover,
.user-panel button:hover,
.board-panel button:hover,
button:hover,
input[type=submit]:hover {
  background-color: #0d2740 !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.sf-sf-btn:active,
.sf-registro-container button[type=submit]:active {
  transform: translateY(1px);
}

/* Variantes de botones */
.sf-sf-btn-edit { background: #0a125c !important; }
.sf-sf-btn-delete { background: #8f2812 !important; }
.sf-sf-btn-save { background: #0a125c !important; }
.sf-sf-btn-update { background: #37474f !important; }
.sf-sf-btn-cancel { background: #c62828 !important; }

.sf-sf-btn-sm {
  padding: 8px 15px;
  font-size: 14px;
  min-width: auto;
}

.sf-sf-btn i {
  margin-right: 8px;
  font-size: 18px;
}

/* ==============================
   MENSAJES
============================== */
.sf-success {
  color: #10b981;
  margin-top: 10px;
}

.sf-error {
  color: #ef4444;
  margin-top: 10px;
}

/* ==============================
   NOTICIAS
============================== */
.sf-noticias-front {
  margin: 40px 0;
}

.sf-titulo-seccion {
  text-align: center;
  color: #fff;
  margin-bottom: 30px;
  font-size: 28px;
}

.sf-grid-noticias {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.sf-noticia-card {
  background: linear-gradient(145deg, #0d1526, #131d33);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid #1a2a4d;
  cursor: pointer;
}

.sf-noticia-card:hover {
  transform: translateY(-5px);
  border-color: #1e88e5;
  box-shadow: 0 8px 20px rgba(30, 136, 229, 0.2);
}

.sf-noticia-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.sf-noticia-etiqueta {
  background: #1e88e5;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.sf-noticia-fecha {
  color: #bbdefb;
  font-size: 12px;
}

.sf-noticia-titulo {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 18px;
  line-height: 1.4;
}

.sf-noticia-contenido {
  color: #e0e0e0;
  margin-bottom: 15px;
  line-height: 1.6;
}

.sf-noticia-leer-mas {
  color: #1e88e5;
  font-weight: bold;
  text-align: right;
  cursor: pointer;
}

.sf-noticia-leer-mas:hover {
  text-decoration: underline;
}

.sf-noticia-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.sf-noticia-popup {
  background: linear-gradient(145deg, #0d1526, #131d33);
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 80%;
  overflow-y: auto;
  color: #e0e0e0;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.sf-popup-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #bbdefb;
  font-size: 24px;
  cursor: pointer;
}

.sf-popup-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1a2a4d;
}

.sf-popup-etiqueta {
  background: #1e88e5;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
}

.sf-popup-fecha {
  color: #bbdefb;
}

.sf-noticia-popup h2 {
  color: #ffffff;
  margin-bottom: 20px;
}

.sf-popup-contenido {
  line-height: 1.8;
}

.sf-popup-contenido p {
  margin-bottom: 15px;
}

/* News cards layout (reinforced) */
.sf-news-container {
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.sf-news-card {
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
  overflow: hidden;
}

.sf-news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sf-news-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  margin: 0;
}

.sf-news-date {
  opacity: 0.7;
  font-size: 12px;
}

.sf-news-content {
  padding: 20px 16px;
  line-height: 1.55;
  padding-top: 20px;
}


.sf-news-content h4 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.sf-news-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

.sf-news-tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  opacity: 0.95;
}

/* ==============================
   PANEL PRINCIPAL
============================== */
.sf-panel-admin-modern,
.sf-panel-usuarios {
  max-width: 1200px;
  margin: 40px auto;
  padding: 30px;
  background: #0b1220;
  color: #e0e0e0;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

/* ==============================
   TABS
============================== */
.sf-admin-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 0px;
  border-bottom: 2px solid #1a2a4d;
  padding-top: 10px;
  padding-bottom: 15px;
  justify-content: center;
  align-items: center
}

.sf-tab {
  padding: 12px 25px;
  background: #0b122020:28 19/09/2025;
  border: 1px solid #000aef47;
  border-radius: 8px 8px 0 0;
  text-decoration: none;
  color: #bbdefb;
  font-weight: bold;
  transition: all 0.3s;
}

.sf-tab:hover {
  background: #0d47a1;
  color: white;
}

.sf-tab-active {
  background: #000aef47;
  color: white;
  border-bottom: 3px solid #1b00ffcf;
}

.sf-tab-content {
  margin-top: 20px;
}

/* ==============================
   TITULOS
============================== */
.sf-panel-admin-modern h3,
.sf-panel-usuarios h2 {
  font-size: 28px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  position: relative;
}

.sf-panel-admin-modern h3::after,
.sf-panel-usuarios h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, #1e88e5, transparent);
}

.sf-panel-admin-modern h4 {
  font-size: 20px;
  color: #bbdefb;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #1e88e5;
  position: relative;
}

.sf-panel-admin-modern h4::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: #1e88e5;
}

/* ==============================
   GRID ADMIN
============================== */
.sf-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.sf-admin-block {
  background: linear-gradient(145deg, #0d1526, #131d33);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #1a2a4d;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.sf-admin-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(30, 136, 229, 0.2);
  border-color: #1e88e5;
}

.sf-admin-block-full {
  grid-column: 1 / -1;
}

/* ==============================
   TABLAS
============================== */
.sf-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 15px;
  overflow: hidden;
  background: #0d1526;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sf-table th {
  background: linear-gradient(to bottom, #0a125c, #0a1c30);
  color: #ffffff;
  padding: 18px;
  text-align: left;
  font-weight: 600;
  font-size: 18px;
}

.sf-table td {
  padding: 15px;
  border-bottom: 1px solid #1a2a4d;
  font-size: 16px;
  vertical-align: middle;
  color: #e0e0e0;
}

.sf-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.sf-table tr:hover {
  background: rgba(30, 136, 229, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

/* ==============================
   INPUTS / FORM
============================== */
.sf-edit-input {
  width: 60%;
  padding: 10px;
  background: rgba(30, 136, 229, 0.1);
  border: 1px solid #1e88e5;
  border-radius: 5px;
  color: white;
  font-size: 15px;
}

.sf-edit-textarea {
  width: 60%;
  height: 200px;
  padding: 10px;
  background: rgba(30, 136, 229, 0.1);
  border: 1px solid #1e88e5;
  border-radius: 5px;
  color: white;
  font-size: 15px;
  resize: vertical;
  margin-bottom: 25px;
}

/* ==============================
   PERFIL DE USUARIO
============================== */
.sf-userpanel {
  padding: 24px;
  background: var(--sf-bg);
  color: var(--sf-text);
}

.sf-user-grid,
.sfv2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  padding-top: 30px;
}

.sf-col,
.sfv2-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sf-col.stagger,
.sfv2-stagger {
  margin-top: 56px;
}

.sf-card,
.sfv2-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid #1a2a4d;
  border-radius: 18px;
  box-shadow: var(--sf-shadow);
  overflow: hidden;
}

.sf-card .sf-card-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--sf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-card .sf-card-header h3 {
  margin: 0;
  font-size: 18px;
}

.sf-card .sf-card-content {
  padding: 18px;
}

.sf-welcome {
  text-align: center;
  padding: 8px 0 4px 0;
}

.sf-welcome .sf-avatar-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto 12px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--sf-border);
}

.sf-welcome img.sf-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sf-welcome .sf-avatar-edit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}

.sf-welcome .sf-avatar-wrap:hover .sf-avatar-edit {
  opacity: 1;
}

.sf-welcome .sf-avatar-edit .pencil {
  width: 28px;
  height: 28px;
  background: var(--sf-accent);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.sf-profile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-label {
  font-size: 12px;
  color: var(--sf-sub);
}

.sf-value {
  min-height: 40px;
  display: flex;
  align-items: center;
  background: #0b1426;
  border: 1px solid var(--sf-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.sf-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.sf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sf-stat {
  background: #0b1426;
  border: 1px solid var(--sf-border);
  border-radius: 12px;
  padding: 12px;
}

/* Ensure value display and inputs are separate */
.sf-input {
  display: none;
  background: #071022;
  border: 1px solid var(--sf-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.sf-profile.editing .sf-input {
  display: block;
}

.sf-profile.editing .sf-value {
  display: none;
}

.sf-profile .sf-input[style] {
  display: none;
}

.sf-profile.editing .sf-input[style] {
  display: block;
}

/* ==============================
   TABLERO
============================== */
.sf-tablero-v4 {
  width: 100%;
  max-width: 1200px;
  margin: 18px auto;
  padding: 12px;
  background: linear-gradient(180deg, #071025, #06141a);
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.sf-tablero-topcontrols {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  gap: 12px;
}

.sf-tablero-buttons .sf-sf-btn {
  margin-right: 6px;
}

.sf-tablero-body {
  width: 100%;
  padding: 10px;
}

#sf-campo-futbol {
  width: 100%;
  min-height: 480px;
  background: linear-gradient(180deg, #1a7f1a, #147014);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.06);
}

.sf-linea-central {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-50%);
}

.sf-area-porteria {
  position: absolute;
  width: 16%;
  height: 18%;
  top: 6%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.sf-porteria-izq {
  left: 2%;
}

.sf-porteria-der {
  right: 2%;
}

/* Banquillo en columnas */
.sf-banquillo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.sf-bench-column {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), #050f5e8a);
  padding: 8px;
  border-radius: 10px;
}

.sf-bench-column h4 {
  text-align: center;
  margin: 0 0 8px 0;
  font-size: 14px;
}

.sf-jugadores-disponibles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}

.sf-jugador-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.sf-jugador-item:active {
  cursor: grabbing;
}

.sf-thumb {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
}

.sf-jugador-meta {
  color: #fff;
}

.sf-jugador-nombre {
  font-size: 13px;
}

/* Jugadores en campo */
.sf-jugador-campo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0f2c0f, #06300b);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  cursor: move;
}

.sf-jugador-campo .sf-thumb-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 4px;
}

.sf-jugador-campo .sf-name {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
  text-align: center;
}

.sf-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.15);
}

/* prevent text selection while dragging across whole body */
body.sf-dragging,
.sf-tablero-entrenador {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* ==============================
   TOASTS / MENSAJES EMERGENTES
============================== */
.sf-toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sf-toast {
  min-width: 220px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.45);
  display: flex;
  gap: 10px;
  align-items: center;
  transform: translateX(110%);
  opacity: 0;
}

.sf-toast.show {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.36s;
}

.sf-toast .ico {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.sf-toast.success {
  background: linear-gradient(90deg, var(--sf-accent), var(--sf-accent-2));
}

.sf-toast.error {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.sf-toast .txt {
  flex: 1;
  font-size: 14px;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 992px) {
  .sf-admin-grid {
    grid-template-columns: 1fr;
  }
  
  .sf-admin-block-full {
    grid-column: 1;
  }
  
  .sf-user-grid,
  .sfv2-grid {
    grid-template-columns: 1fr;
  }
  
  .sf-profile-grid {
    grid-template-columns: 1fr;
  }
  
  .sf-news-container {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .sf-user-grid,
  .sfv2-grid {
    grid-template-columns: 1fr;
  }
  
  .sf-col.stagger,
  .sfv2-stagger {
    margin-top: 0;
  }
  
  .sf-profile-fields {
    grid-template-columns: 1fr;
  }
  
  .sf-two-col {
    grid-template-columns: 1fr;
  }
  
  .sfv2-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  #sf-campo-futbol {
    min-height: 380px;
  }
  
  .sf-banquillo-grid {
    grid-template-columns: 1fr;
    max-height: unset;
  }
}

@media (max-width: 768px) {
  .sf-panel-admin-modern,
  .sf-panel-usuarios {
    padding: 20px 15px;
  }
  
  .sf-table th,
  .sf-table td {
    padding: 12px;
    font-size: 14px;
  }
  
  .sf-sf-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
  }
  
  .sf-news-container {
    grid-template-columns: 1fr;
  }
  
  .sf-admin-block-full > div {
    grid-template-columns: 1fr !important;
  }
  
  .sf-panel-usuarios h2,
  .sf-panel-admin-modern h3 {
    font-size: 24px;
  }
  
  .sf-panel-usuarios .sf-news-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
  }
  
  .sf-panel-usuarios .sf-news-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .sf-panel-usuarios .sf-news-item {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  .sf-grid-noticias {
    grid-template-columns: 1fr;
  }
  
  .sf-noticia-popup {
    padding: 20px;
  }
}

@media (max-width: 720px) {
  .sf-grid {
    grid-template-columns: 1fr;
  }
  
  .sf-news-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}


/* Custom tablero background override: subtle diagonal gradient */
.sf-tablero-entrenador {
  background: linear-gradient(135deg, rgba(6,12,24,0.95) 0%, rgba(8,34,54,0.95) 100%);
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.5);
}
.sf-tablero-entrenador .sf-header {
  background: transparent;
  border-bottom: none;
}
