/* =========================================================
   A-LAB SHORTLIST — MATCH EXACTO CON JUGADORES (FULL WIDTH FIX)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Lamine Yamal Style Overhaul */
  --bg-deep: #0B0F19;
  /* Darker navy background */
  --bg-card: rgba(11, 15, 26, 0.8);
  /* Pure Navy/Slate background, no green tint */
  --bg-input: rgba(255, 255, 255, 0.03);
  --stroke: #1E293B;
  /* Subtle slate blue borders */

  --text-main: #FFFFFF;
  /* Pure White Headers */
  --text-muted: #94A3B8;
  /* Silver Slate Body */

  --accent: #34D399;
  /* Emerald Green (Success/High) */
  --accent-glow: rgba(52, 211, 153, 0.15);
  --accent-amber: #FBBF24;
  /* Amber (Average/Warning) */
  --accent-coral: #F87171;
  /* Coral Red (Low/Danger/Attacking) */

  /* 2. VARIABLES DE LAYOUT */
  --sb-w: 78px;
  /* Ancho de la sidebar colapsada */

  /* Colores de estado */
  --st-high: #34D399;
  --st-watch: #FBBF24;
  /* Cambiado a A-LAB Amber */
  --st-backup: #60A5FA;
  --st-discard: #F87171;
  /* A-LAB Coral */
}

/* =========================
   LAYOUT ENGINE
   ========================= */
* {
  box-sizing: border-box;
}

body.page-shortlist {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep) !important;
  /* Dark Grid Pattern Overlay */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center;
  color: var(--text-main) !important;
  margin: 0;
}

/* GRID PRINCIPAL: 78px (Sidebar) | Resto (Contenido) */
body.page-shortlist .app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sb-w) 1fr;
  gap: 0;
  background-color: transparent !important;
}

/* CONTENEDOR PRINCIPAL (.main) */
body.page-shortlist .main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  width: 100%;
  margin-left: 0 !important;
}

/* CONTENIDO INTERNO (.content) */
/* AQUÍ ESTÁ EL ARREGLO: align-items: stretch PARA QUE OCUPE TODO */
body.page-shortlist .content {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  width: 100% !important;
  padding: 0 !important;
  align-items: stretch !important;
  /* <--- ESTO SOLUCIONA QUE SE VEA CHICO */
}

/* Forzamos que los bloques sean 100% ancho */
.slHeader,
.slKpis,
.slToolbar,
.slCard {
  width: 100%;
}

/* ========== Workspace: sidebar carpetas + grid principal ========== */
.slWorkspace {
  display: grid;
  grid-template-columns: minmax(200px, 25%) 1fr;
  gap: 0;
  align-items: start;
  width: 100%;
  min-height: 420px;
  position: relative;
}

.slFoldersSidebar {
  background: rgba(8, 11, 18, 0.95);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px 14px 20px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  min-width: 0;
  max-height: calc(100vh - 200px);
  position: sticky;
  top: 88px;
  overflow-y: auto;
}

.slFoldersBackdrop {
  display: none;
}

.slFoldersMobileToggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.slFoldersMobileToggle:hover {
  background: var(--bg-input);
  border-color: rgba(52, 211, 153, 0.35);
}

.slFoldersMobileToggle i {
  color: var(--accent);
}

.btn-new-folder {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  margin-bottom: 16px;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  color: #04120c;
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-new-folder:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(52, 211, 153, 0.45);
}

.btn-new-folder i {
  font-size: 14px;
}

.slFoldersNav {
  margin: 0;
}

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

.slFolderItem {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.slFolderItem:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.slFolderItem.is-active {
  background: var(--accent-glow);
  border-color: rgba(52, 211, 153, 0.35);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12);
}

.slFolderItem__icon {
  width: 18px;
  text-align: center;
  color: var(--accent);
  opacity: 0.9;
  flex-shrink: 0;
}

.slFolderItem.is-active .slFolderItem__icon {
  opacity: 1;
}

.slFolderItem__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slFolderItem__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.slFolderAction {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.slFolderAction:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.slFolderAction.danger:hover {
  color: #F87171;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

.slMainGrid {
  min-width: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slShowingLabel {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.slShowingLabel::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

/* Modal nueva carpeta */
.slModal {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.slModal[hidden] {
  display: none !important;
}

.slModalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.slModalBox {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.slModalTitle {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.slModalHint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.slModalInput {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--bg-input);
  color: #fff;
  font-size: 14px;
  margin-bottom: 20px;
  outline: none;
}

.slModalInput:focus {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.slModalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-new-folder-inline {
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  color: #04120c;
  transition: filter 0.2s, transform 0.15s;
}

.btn-new-folder-inline:hover {
  filter: brightness(1.06);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--stroke) !important;
}

.btn-glass.danger {
  border-color: rgba(248, 113, 113, 0.35) !important;
  color: #F87171 !important;
}

.btn-glass.danger:hover {
  background: rgba(248, 113, 113, 0.12) !important;
}

/* Select mover carpeta */
.folder-move-select {
  min-width: 140px;
  max-width: 180px;
  height: 34px;
  padding: 0 28px 0 10px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--bg-deep);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.folder-move-select:hover {
  border-color: rgba(52, 211, 153, 0.35);
  color: #fff;
}

.folder-move-select option {
  background: #0B0F17;
  color: #F1F5F9;
}

.btn-icon.danger:hover {
  color: #F87171 !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

/* =========================
   ESTILOS VISUALES (DEEP BLACK)
   ========================= */

/* 1. HEADER */
.slHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.slTitle {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slSub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.slActions {
  display: flex;
  gap: 12px;
}

/* Botones */
.btn-pro {
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke);
  background: var(--bg-input);
  color: #fff;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-pro:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* 2. KPIs */
.slKpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.slKpi {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.kpi-total .kpi-icon {
  background: var(--bg-input);
  color: #fff;
}

.kpi-high .kpi-icon {
  background: rgba(52, 211, 153, 0.1);
  color: var(--st-high);
  border: 1px solid rgba(52, 211, 153, 0.1);
}

.kpi-watch .kpi-icon {
  background: rgba(250, 204, 21, 0.1);
  color: var(--st-watch);
  border: 1px solid rgba(250, 204, 21, 0.1);
}

.kpi-backup .kpi-icon {
  background: rgba(96, 165, 250, 0.1);
  color: var(--st-backup);
  border: 1px solid rgba(96, 165, 250, 0.1);
}

.kpi-data .v {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.kpi-data .k {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

/* 3. TOOLBAR */
.slToolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 12px 20px;
}

.slTabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 10px;
}

.slTab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.slTab.active {
  background: var(--bg-input);
  color: #fff;
  border: 1px solid var(--stroke);
}

.slFilters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex-grow: 1;
}

.search-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}

.control-search,
.control-select {
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--stroke);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
}

.control-search {
  padding-left: 36px;
  min-width: 220px;
}

.control-select {
  padding: 0 30px 0 12px;
  cursor: pointer;
}

/* 4. TABLA */
.slCard {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 211, 153, 0.7) rgba(15, 23, 42, 0.8);
}

.table-responsive::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.9), rgba(16, 185, 129, 0.9));
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.9);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #34D399, #10B981);
}

.slTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 1020px;
}

.slTable th {
  text-align: left;
  padding: 16px 24px;
  background: #0f131a;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--stroke);
}

.slTable td {
  padding: 12px 24px;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  height: 52px;
}

.slTable tr:hover {
  background: var(--bg-input);
}

.sl-name {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}

.sl-name:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sl-team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sl-logo-mini {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sl-team-cell span {
  color: var(--text-muted);
  font-size: 12px;
}

.badge-pos {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.status-select {
  background: transparent;
  border: 1px solid;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  color: #fff;
  background: var(--bg-input);
  border-color: rgba(255, 255, 255, 0.2);
}

.slEmpty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 900px) {
  body.page-shortlist .app {
    grid-template-columns: 1fr;
  }

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

  .slFoldersMobileToggle {
    display: inline-flex;
  }

  .slFoldersSidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    max-height: none;
    z-index: 100010;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    border-radius: 0 16px 16px 0;
    margin-top: 0;
  }

  .slFoldersSidebar.is-open {
    transform: translateX(0);
  }

  .slFoldersBackdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100009;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
  }

  .slFoldersBackdrop[hidden] {
    display: none !important;
  }

  .slMainGrid {
    padding-left: 0;
  }

  .slKpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .slHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* =========================
   FIX DROPDOWN (ESTILO DARK)
   ========================= */

.status-select {
  background-color: var(--bg-deep);
  /* Fondo base */
  color: #fff;
  border: 1px solid var(--stroke);
  /* Borde sutil por defecto */
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

/* ESTO ES LO CLAVE: PINTAR LAS OPCIONES DE NEGRO */
.status-select option {
  background-color: #0B0F17;
  /* Fondo negro profundo */
  color: #F1F5F9;
  /* Texto claro */
  padding: 12px;
  /* Un poco de aire (aunque depende del navegador) */
}

/* Hover en el select */
.status-select:hover {
  background-color: var(--bg-input);
}