/* Panini Mundial 2026 — paleta */
:root {
    --rojo: #e63946;
    --azul: #1d3557;
    --verde: #2a9d8f;
    --amarillo: #ffd166;
    --blanco: #f1faee;
    --gris: #a8a8a8;
    --texto: #1d1d1d;
}

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--texto);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    background: linear-gradient(90deg, #d80027, #006847 50%, #0a3161);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.brand { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.brand a { color: white; text-decoration: none; }
.brand .ball { font-size: 1.1rem; }
.topbar nav { display: flex; align-items: center; gap: 12px; }
.topbar nav a { color: white; text-decoration: none; font-weight: 500; font-size: 0.85rem; }
.topbar nav a:hover { text-decoration: underline; }
.topbar .logout { color: #ffd166 !important; }

.user-pill {
    color: white;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

main { flex: 1; max-width: 1280px; margin: 0 auto; padding: 14px; width: 100%; }

footer { text-align: center; padding: 12px; color: var(--gris); font-size: 0.75rem; }

.page-title { color: var(--azul); font-size: 1.3rem; margin: 4px 0 12px; }
.section-title { color: var(--azul); font-size: 0.95rem; border-left: 4px solid var(--rojo); padding-left: 8px; margin: 18px 0 10px; }
.section-title.green { border-color: var(--verde); }
.section-title.blue { border-color: var(--azul); }

/* Login */
.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 75vh; }
.login-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    padding: 28px;
    width: 320px;
    border-top: 6px solid var(--rojo);
}
.login-header { text-align: center; }
.login-header h1 { margin: 6px 0 2px; color: var(--azul); font-size: 1.3rem; }
.login-header p { color: var(--gris); margin: 0; font-size: 0.85rem; }
.trophy { font-size: 2.2rem; }
.login-form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.login-form label { font-weight: 600; font-size: 0.8rem; color: var(--azul); }
.login-form input {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}
.login-form input:focus { outline: none; border-color: var(--rojo); }
.login-form button {
    margin-top: 8px;
    padding: 10px;
    background: var(--rojo);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
}
.login-form button:hover { background: #c1121f; }
.alert { background: #ffe5e5; color: #c1121f; padding: 8px; border-radius: 6px; margin: 8px 0; font-size: 0.85rem; }
.alert.ok { background: #d1fae5; color: #065f46; }

/* Perfil */
.perfil-card { background: white; padding: 18px 20px; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); max-width: 480px; }
.perfil-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.perfil-form { display: flex; flex-direction: column; gap: 6px; }
.perfil-form label { font-weight: 600; font-size: 0.85rem; color: var(--azul); margin-top: 6px; }
.perfil-form input { padding: 9px 12px; border: 2px solid #e0e0e0; border-radius: 6px; font-size: 0.9rem; }
.perfil-form input:focus { outline: none; border-color: var(--rojo); }
.perfil-form button { margin-top: 12px; padding: 10px; background: var(--rojo); color: white; border: none; border-radius: 6px; font-weight: 700; cursor: pointer; }
.perfil-form button:hover { background: #c1121f; }

/* User pill clickable */
.user-pill-link { text-decoration: none; }
.user-pill-link .user-pill { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.user-pill-link:hover .user-pill { transform: scale(1.05); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }

/* Dashboard resumen */
.resumen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.r-card {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 3px solid var(--azul);
}
.r-card.r-progress { border-color: var(--verde); align-items: stretch; }
.r-num { font-size: 1.5rem; font-weight: 800; color: var(--azul); line-height: 1.1; }
.r-lbl { color: var(--gris); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; }
.r-progress .r-num, .r-progress .r-lbl { text-align: center; }

.bar { background: #eaeaea; border-radius: 999px; height: 6px; overflow: hidden; margin-top: 6px; }
.bar.small { height: 4px; }
.bar-fill { background: linear-gradient(90deg, var(--verde), var(--amarillo)); height: 100%; transition: width 0.3s; }

.album-cta {
    display: inline-block;
    background: var(--azul);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.album-cta:hover { background: #142949; }

/* Grupos grid */
.grid-grupos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.grupo-card {
    color: white;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: transform 0.15s, box-shadow 0.15s;
    min-height: 92px;
}
.grupo-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
.g-letra { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.g-nombre { font-size: 0.7rem; opacity: 0.95; line-height: 1.3; }
.g-paises { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.g-pais {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.97;
}
.g-flag {
    width: 16px;
    height: 11px;
    object-fit: cover;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.35);
    flex-shrink: 0;
}
.g-avance { font-size: 0.8rem; font-weight: 700; opacity: 0.95; }
.g-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 6px; flex-wrap: wrap; }
.g-llenos-badge {
    background: linear-gradient(135deg, #fff5b8, #ffd700);
    color: #6b3a2a;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.grupo-card.all-llenos {
    background: linear-gradient(135deg, #fff5b8 0%, #ffd700 50%, #d4a847 100%) !important;
    color: #4a2c2a;
    box-shadow: 0 3px 12px rgba(212,168,71,0.55);
}
.grupo-card.all-llenos .g-letra,
.grupo-card.all-llenos .g-nombre { color: #4a2c2a; }

/* Stat card "Países llenos" en dashboard */
.r-card.r-paises-llenos {
    border-bottom-color: #d4a847;
    background: linear-gradient(180deg, white 70%, #fef9e7 100%);
}
.r-card.r-paises-llenos .r-num { color: #b8860b; }
.r-card.r-paises-llenos .r-num small { font-size: 0.7rem; color: #6b7280; font-weight: 600; }

/* Comunidad: stat de paises llenos */
.usuario-paises { font-size: 0.85rem; color: #6b3a2a; margin-top: 2px; }
.usuario-paises b { color: #b8860b; font-weight: 800; font-size: 1rem; }

/* Banner cuando vez la pagina de un pais que ya completaste */
.team-completo-banner {
    background: linear-gradient(135deg, #fff7c0 0%, #ffd700 50%, #d4a847 100%);
    padding: 12px 18px;
    border-radius: 10px;
    margin: 0 0 12px;
    color: #4a2c2a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(212,168,71,0.4), inset 0 1px 0 rgba(255,255,255,0.7);
    border: 1px solid #d4a847;
}
.tc-stars { font-size: 1.4rem; line-height: 1; }
.tc-text { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.tc-text strong { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 900; letter-spacing: 0.5px; }
.tc-text small { font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; opacity: 0.75; }

/* Album: seccion de un pais ya completo */
.album-seccion.sec-completo .album-titulo {
    background: linear-gradient(135deg, #fff7c0 0%, #ffd700 50%, #d4a847 100%) !important;
    color: #4a2c2a;
    box-shadow: 0 2px 6px rgba(212,168,71,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid #d4a847;
}
.album-seccion.sec-completo .seccion-flag { box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.seccion-completo-tag {
    background: rgba(255,255,255,0.55);
    color: #6b3a2a;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-left: auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Celebracion al completar un pais */
.celebracion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    animation: ce-fade-in 0.3s ease-out;
}
.celebracion-overlay.fade-out { animation: ce-fade-out 0.4s ease-in forwards; }
.celebracion-box {
    background: linear-gradient(135deg, #fff7c0 0%, #ffd700 50%, #d4a847 100%);
    padding: 32px 48px;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55),
                0 0 0 4px rgba(255,255,255,0.8),
                inset 0 2px 0 rgba(255,255,255,0.9);
    text-align: center;
    min-width: 280px;
    max-width: 92vw;
    transform: scale(0);
    animation: ce-bounce-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.celebracion-stars {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 6px;
}
.celebracion-stars .cs {
    font-size: 2.6rem;
    filter: drop-shadow(0 3px 6px rgba(212,168,71,0.6));
    display: inline-block;
}
.celebracion-stars .cs.s1 { animation: ce-spin 1.2s ease-in-out infinite alternate; animation-delay: 0s; }
.celebracion-stars .cs.s2 { animation: ce-bob 1s ease-in-out infinite alternate; animation-delay: 0.1s; transform: scale(1.2); }
.celebracion-stars .cs.s3 { animation: ce-spin 1.2s ease-in-out infinite alternate-reverse; animation-delay: 0.2s; }
.celebracion-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 900;
    color: #4a2c2a;
    margin: 8px 0 2px;
    letter-spacing: 1px;
}
.celebracion-sub {
    font-size: 1.05rem;
    font-weight: 800;
    color: #6b3a2a;
    letter-spacing: 4px;
}
.celebracion-tip {
    font-size: 0.78rem;
    color: rgba(74,44,42,0.7);
    margin-top: 10px;
    font-weight: 600;
}
@keyframes ce-bounce-in {
    0%   { transform: scale(0) rotate(-12deg); opacity: 0; }
    55%  { transform: scale(1.18) rotate(3deg); opacity: 1; }
    80%  { transform: scale(0.96) rotate(-1deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes ce-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ce-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes ce-spin { from { transform: rotate(-12deg) scale(1); } to { transform: rotate(12deg) scale(1.08); } }
@keyframes ce-bob  { from { transform: translateY(-4px) scale(1.2); } to { transform: translateY(4px) scale(1.25); } }

/* Equipos */
.grupo-header {
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.grupo-header h1 { margin: 0; font-size: 1.15rem; font-weight: 700; }

.grid-equipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.equipo-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    color: var(--texto);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border-top: 3px solid var(--azul);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.equipo-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
/* Equipo completo (20/20): dorado por todos lados */
.equipo-card.completo {
    background: linear-gradient(135deg, #fff7c0 0%, #ffd700 50%, #d4a847 100%) !important;
    border-top-color: #b8860b;
    border: 2px solid #d4a847;
    box-shadow: 0 2px 8px rgba(212,168,71,0.45), inset 0 1px 0 rgba(255,255,255,0.6);
    color: #4a2c2a;
}
.equipo-card.completo:hover {
    box-shadow: 0 6px 18px rgba(212,168,71,0.6), inset 0 1px 0 rgba(255,255,255,0.7);
}
.equipo-card.completo .e-codigo { color: #6b3a2a; font-weight: 800; }
.equipo-card.completo .e-nombre { color: #4a2c2a; font-weight: 800; }
.e-completo-tag {
    background: rgba(255,255,255,0.55);
    color: #6b3a2a;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.equipo-flag {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}
.equipo-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.e-codigo { font-size: 0.65rem; color: var(--gris); letter-spacing: 1.5px; font-weight: 700; }
.e-nombre { font-size: 0.95rem; font-weight: 700; color: var(--azul); }
.e-avance { color: var(--verde); font-weight: 700; font-size: 0.8rem; }

/* Cromos — chicos y compactos */
.breadcrumb { margin-bottom: 10px; font-size: 0.85rem; }
.breadcrumb a { color: var(--azul); text-decoration: none; font-weight: 600; }
.grid-cromos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 108px));
    gap: 6px;
    justify-content: start;
}
.grid-cromos.compacto { grid-template-columns: repeat(auto-fill, minmax(82px, 100px)); gap: 5px; justify-content: start; }
.cromo-card {
    background: #fafafa;            /* blanco/grisaceo casi blanco = NO pegado, mas B/N */
    border-radius: 8px;
    padding: 0 5px 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid #d1d5db;       /* gris mas marcado en el borde */
    transition: background 0.18s, border-color 0.18s, box-shadow 0.12s, transform 0.12s;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 92px;
}
.cromo-strip {
    height: 3px;                    /* franja fina, no banda gorda */
    margin: 0 -5px 2px;
    background: linear-gradient(90deg, var(--cteam, #d1d5db), var(--cteam2, #e5e7eb));
    opacity: 0.35;                  /* mas atenuada cuando NO esta pegada */
    filter: grayscale(70%);         /* mas B/N */
    transition: opacity 0.18s, filter 0.18s;
}
.cromo-card:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.08); }
.cromo-card.pegado {
    background: #bbf7d0;             /* verde saturado, se nota claro que esta pegada */
    border-color: #16a34a;           /* borde verde fuerte */
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.18);
}
.cromo-card.pegado .cromo-strip {
    opacity: 1;
    filter: none;                    /* recupera el color del equipo */
}
.cromo-card.pegado::after {
    content: "✓";
    position: absolute;
    top: 3px; right: 6px;
    color: #15803d;
    font-weight: 900;
    font-size: 0.9rem;               /* mas grande */
}
.cromo-codigo-grande {
    font-size: 1.15rem;
    font-weight: 800;
    color: #9ca3af;            /* gris claro = NO pegado, mas atenuado */
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin: 4px 0 2px;
    transition: color 0.18s;
}
.cromo-card.pegado .cromo-codigo-grande { color: #14532d; }   /* verde oscuro mas fuerte */
.cromo-jugador {
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #1f2937;
    padding: 1px 3px;
    background: rgba(255,255,255,0.92);
    border-radius: 3px;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    overflow: hidden;
}
.cromo-jugador .jug-nombre {
    font-size: 0.48rem;
    line-height: 1;
    font-weight: 500;
    opacity: 0.75;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cromo-jugador .jug-apellido {
    font-size: 0.6rem;
    line-height: 1.05;
    font-weight: 800;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cromo-card.mode-comunidad .cromo-jugador,
.cromo-card.no-actions .cromo-jugador { bottom: 4px; }
.cromo-card.pegado .cromo-jugador { background: rgba(255,255,255,0.94); color: #14532d; }
.cromo-equipo {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--azul);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cromo-detalle {
    font-size: 0.6rem;
    color: var(--gris);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}
.cromo-bottom {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: auto;
    padding-top: 5px;
    justify-content: center;
    min-height: 24px;
}
.btn-mini {
    background: var(--azul);
    color: white;
    border: none;
    width: 22px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.68rem;
    transition: background 0.12s;
    padding: 0;
}
.btn-mini.plus { background: var(--verde); }
.btn-mini.plus:hover { background: #228074; }
.btn-mini.minus { background: #d62828; }
.btn-mini.minus:hover { background: #a51717; }
.btn-mini:disabled { opacity: 0.5; cursor: wait; }
.rep-num {
    font-weight: 800;
    color: var(--azul);
    min-width: 14px;
    text-align: center;
    font-size: 0.85rem;
}
.rep-badge {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 22px;
    height: 20px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2px;
    font-size: 0.7rem;
}
.rep-badge:hover { background: #f5f5f5; }
.hist-icon { font-size: 0.85rem; }

/* Modal historial */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal-box {
    background: white;
    border-radius: 12px;
    padding: 18px 22px;
    width: min(420px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}
.modal-close {
    position: absolute;
    top: 6px; right: 10px;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--gris);
}
.modal-box h3 { margin: 0 0 12px; color: var(--azul); font-size: 1rem; }
.hist-list { display: flex; flex-direction: column; gap: 4px; }
.hist-row {
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    border-left: 3px solid var(--gris);
    background: #f8f9fa;
}
.hist-row.in { border-left-color: var(--verde); }
.hist-row.out { border-left-color: var(--rojo); }
.hist-action { font-weight: 600; }
.hist-fecha { color: var(--gris); font-size: 0.72rem; }

/* Admin assets */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.asset-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.asset-cod {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.asset-imgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.asset-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.asset-block small { color: var(--gris); font-size: 0.7rem; }
.asset-block img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 4px;
    padding: 4px;
    border: 1px solid #ddd;
}
.asset-block input[type="file"] { font-size: 0.7rem; max-width: 100%; }
.asset-block button { padding: 4px 8px; font-size: 0.72rem; margin: 0; }

/* Comunidad: bloque de intercambios (matches) */
.trade-block {
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 10px 0 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.trade-block .section-title { margin-top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.match-count {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(16,185,129,0.35);
    letter-spacing: 0.3px;
}
.match-count.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 1px 3px rgba(59,130,246,0.35);
}
@keyframes pulse-match {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
/* Grilla de equipos: 2-3 columnas para usar el ancho */
.trade-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px 12px;
    margin-top: 4px;
}
.trade-section { display: flex; flex-direction: column; }
.trade-team-bar {
    color: white;
    padding: 4px 10px;
    border-radius: 6px 6px 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.trade-team-bar .seccion-flag { width: 16px; height: 12px; }
.trade-team-bar .seccion-count { margin-left: auto; background: rgba(0,0,0,0.25); padding: 1px 6px; border-radius: 999px; font-size: 0.62rem; }
/* Chips en grilla de 5 columnas — agrupa todo en bloques uniformes */
.trade-chips {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 4px 4px 0;
    background: #fafafa;
    border-radius: 0 0 6px 6px;
}
.trade-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 3px 2px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid;
    transition: transform 0.12s;
    user-select: none;
    line-height: 1.15;
    text-align: center;
    overflow: hidden;
    min-width: 0;
}
.trade-chip:hover { transform: translateY(-1px); }
.trade-chip small {
    font-size: 0.58rem;
    color: inherit;
    opacity: 0.85;
    font-weight: 700;
    margin-top: 1px;
}
.trade-chip.match {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
    box-shadow: 0 0 0 1px rgba(16,185,129,0.2), 0 1px 3px rgba(16,185,129,0.25);
}
.trade-chip.match-blue {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59,130,246,0.2), 0 1px 3px rgba(59,130,246,0.25);
}
.trade-chip.ya {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
    opacity: 0.7;
}
.m-tag {
    background: #10b981;
    color: white;
    font-size: 0.55rem;
    padding: 1px 5px;
    border-radius: 999px;
    margin-left: 3px;
    letter-spacing: 0.5px;
}
.m-tag.blue { background: #3b82f6; }

/* Mini leyenda inline (verde / azul / gris) */
.legend-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    margin: 2px 4px 2px 0;
    border: 1px solid;
}
.legend-chip.match    { background: #d1fae5; color: #065f46; border-color: #10b981; }
.legend-chip.match-blue { background: #dbeafe; color: #1e40af; border-color: #3b82f6; }
.legend-chip.ya       { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }

/* Comunidad: lista de usuarios */
.usuarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    margin: 12px 0;
}
.usuario-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--texto);
    display: flex;
    gap: 12px;
    align-items: center;
    transition: transform 0.15s, box-shadow 0.15s;
    border-left: 4px solid var(--azul);
}
.usuario-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.usuario-pill {
    width: 44px; height: 44px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.usuario-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.usuario-stats { font-size: 0.95rem; color: var(--azul); margin-top: 2px; }

.otro-header {
    background: white;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 6px 0 8px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.otro-resumen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: white;
    border-radius: 8px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-size: 0.9rem;
}
.otro-resumen b { color: var(--azul); font-size: 1rem; }
.album-cta.inline { margin-left: auto; padding: 6px 12px; font-size: 0.82rem; }

/* Grupo card en read-only no clickeable */
.grupo-card.readonly { cursor: default; }
.grupo-card.readonly:hover { transform: none; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.g-equipos-list { display: flex; flex-direction: column; gap: 1px; font-size: 0.7rem; opacity: 0.95; line-height: 1.3; }
.g-equipo-link { color: white; text-decoration: none; }
.g-equipo-link:hover { text-decoration: underline; }

/* Card en modo comunidad: read-only, sin click, badge FALTA si no pegado */
.cromo-card.mode-comunidad { cursor: default; }
.cromo-card.mode-comunidad:hover { transform: none; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.cromo-card.mode-comunidad.falta {
    background: linear-gradient(180deg, #fff 0%, #fff 60%, #fee2e2 100%);
    border-color: #fecaca;
}
.cromo-falta-tag {
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #dc2626;
    margin: 2px 0 4px;
    background: #fee2e2;
    padding: 2px 6px;
    border-radius: 4px;
    align-self: center;
}

/* Modal confirm generico del sistema */
.confirm-box { width: min(420px, 92vw); }
.confirm-box h3 { color: var(--azul); margin: 0 0 10px; font-size: 1.05rem; }
.confirm-msg { font-size: 0.88rem; color: #444; margin: 0 0 18px; line-height: 1.4; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-confirm-cancel,
.btn-confirm-ok {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: opacity 0.12s, transform 0.12s;
}
.btn-confirm-cancel { background: #e5e7eb; color: #1f2937; }
.btn-confirm-cancel:hover { background: #d1d5db; }
.btn-confirm-ok { background: var(--verde); color: white; }
.btn-confirm-ok:hover { background: #228074; }
.btn-confirm-ok.danger { background: var(--rojo); }
.btn-confirm-ok.danger:hover { background: #c1121f; }

/* Modal venta/cambio — chips */
.chip-options { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip {
    background: #f1f3f5;
    border: 2px solid transparent;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.12s;
    color: #333;
}
.chip:hover { background: #e9ecef; }
.chip.active {
    background: var(--rojo);
    color: white;
    border-color: var(--rojo);
    box-shadow: 0 2px 8px rgba(230,57,70,0.3);
}
.motivo-detalle { background: #f8f9fa; padding: 12px; border-radius: 8px; margin-top: 8px; }
.motivo-detalle.hidden { display: none; }
.recibidos-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.recibido-chip {
    background: var(--verde);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.recibido-chip button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0 0 4px;
}
.input-full { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.85rem; }

.btn-confirm {
    width: 100%;
    background: var(--rojo);
    color: white;
    border: none;
    padding: 9px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 12px;
}
.btn-confirm:hover { background: #c1121f; }
.btn-confirm:disabled { background: #ccc; cursor: not-allowed; }
.btn-secondary {
    background: var(--azul);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
}
.btn-secondary.small { padding: 5px 10px; font-size: 0.75rem; }
.btn-secondary:hover { background: #142949; }
.hist-nota { color: var(--gris); font-style: italic; font-weight: 400; font-size: 0.72rem; }

/* Modal picker multi-step */
.modal-box.wide { width: min(640px, 95vw); }
.picker-bread {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.bread-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    color: #666;
    cursor: pointer;
}
.bread-btn.active { background: var(--azul); color: white; border-color: var(--azul); }
.bread-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.bread-arrow { color: var(--gris); font-size: 0.9rem; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pick-grupo, .pick-pais {
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.12s;
}
.pick-grupo:hover, .pick-pais:hover { transform: translateY(-2px); }
.pg-letra { font-size: 1.4rem; font-weight: 900; }
.pg-nom { font-size: 0.7rem; opacity: 0.95; line-height: 1.2; }
.pp-flag { font-size: 1.6rem; }
.pp-nom { font-size: 0.95rem; font-weight: 700; }
.pp-cod { font-size: 0.7rem; opacity: 0.85; }
.picker-cromos { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 5px; max-height: 50vh; overflow-y: auto; padding-right: 4px; }
.pickc {
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 6px 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    position: relative;
    transition: all 0.12s;
}
.pickc:hover:not(:disabled) { border-color: var(--azul); }
.pickc.sel { border-color: var(--rojo); background: #fff0f1; box-shadow: 0 0 0 2px rgba(230,57,70,0.2); }
.pickc.disabled { opacity: 0.35; cursor: not-allowed; background: #f0f0f0; }
.pickc-cod { font-size: 0.72rem; font-weight: 800; color: var(--azul); }
.pickc-num { font-size: 0.65rem; color: var(--gris); }
.pickc-tag { position: absolute; top: 1px; right: 2px; font-size: 0.55rem; font-weight: 700; }
.pickc-tag.green { color: var(--verde); }
.pickc-tag.amber { background: var(--amarillo); color: var(--azul); padding: 0 4px; border-radius: 6px; }
.picker-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; gap: 12px; }
.picker-foot .btn-confirm { width: auto; min-width: 140px; margin-top: 0; }

.muted-tip { color: var(--gris); padding: 0 6px; font-size: 1.1rem; }

/* Imagen del cromo (opcional, si fue subida): B/N hasta pegar, color al pegar */
.cromo-img {
    width: 100%;
    max-width: 80px;
    height: auto;
    aspect-ratio: 1 / 1.4;
    object-fit: contain;
    margin: 4px auto 2px;
    display: block;
    filter: grayscale(1) brightness(0.95) contrast(1.05);
    opacity: 0.55;
    transition: filter 0.4s ease, opacity 0.4s ease;
}
.cromo-card.pegado .cromo-img {
    filter: none;
    opacity: 1;
}

/* Badge "+N" de repes — solo aparece si tiene repes. N = cuántas tienes para intercambiar (sin contar la pegada). */
.cromo-stock {
    align-self: center;
    background: #fef3c7;          /* amarillo muy suave */
    color: #92400e;               /* texto ámbar oscuro */
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    padding: 2px 7px;
    border: 1px solid #fde68a;
    border-radius: 999px;
    letter-spacing: 0.3px;
    margin: 2px 0 3px;
}
/* Sin halo extra cuando tiene repes — el badge ya lo indica */
.cromo-card.stocked.pegado { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* Boton despegar (X chiquito) */
.btn-mini.despegar {
    background: #94a3b8;
    color: white;
    font-size: 0.9rem;
    line-height: 1;
}
.btn-mini.despegar:hover { background: #64748b; }

/* Animacion al click acumulativo */
.cromo-card.just-clicked {
    animation: clickPulse 0.45s ease-out;
}
@keyframes clickPulse {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.06); box-shadow: 0 4px 14px rgba(42,157,143,0.4); }
    100% { transform: scale(1); }
}

/* Botones bulk en pagina de equipo */
.bulk-actions {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}
.btn-bulk {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    transition: transform 0.12s, box-shadow 0.12s;
}
.btn-bulk.pegar {
    background: var(--verde);
    color: white;
}
.btn-bulk.pegar:hover { background: #228074; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(42,157,143,0.4); }
.btn-bulk.reset {
    background: white;
    color: var(--rojo);
    border: 2px solid var(--rojo);
}
.btn-bulk.reset:hover { background: #fff0f1; }
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    font-size: 0.88rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.warn { background: #d62828; }

/* Header de equipo con escudo + bandera grande */
.team-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.team-escudo-big {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: white;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.team-flag-big {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid white;
}
.team-grupo-tag {
    margin-left: auto;
    background: rgba(0,0,0,0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Lotes */
.lote-form { background: white; padding: 16px; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); margin-bottom: 14px; }
.lote-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--azul); margin-bottom: 4px; }
.lote-label.red { color: var(--rojo); }
.lote-label.green { color: var(--verde); }
.lote-input { width: 100%; padding: 8px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.88rem; margin-bottom: 12px; }
.lote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.lote-col textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    resize: vertical;
}
.lote-submit {
    width: 100%;
    background: var(--azul);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
}
.lote-submit:hover { background: #142949; }
.lote-resultado { margin-top: 16px; }
.rl-box { background: white; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border-left: 4px solid var(--gris); }
.rl-box.red { border-left-color: var(--rojo); background: #fff4f4; }
.rl-box.green { border-left-color: var(--verde); background: #f0fbf8; }
.rl-box.yellow { border-left-color: var(--amarillo); background: #fffbe6; }
.rl-box h3 { margin: 0 0 6px; font-size: 0.9rem; color: var(--azul); }
.rl-box ul { margin: 0; padding-left: 18px; font-size: 0.82rem; }
.muted.small { font-size: 0.8rem; }

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

/* Album completo */
.album-toolbar {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.album-toolbar input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
}
.album-toolbar .check { font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
.album-seccion { margin-bottom: 14px; }
.album-titulo {
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    margin: 0 0 6px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}
.seccion-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.seccion-count {
    margin-left: auto;
    background: rgba(0,0,0,0.25);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Intercambios */
.trade-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.trade-card {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border-left: 4px solid var(--gris);
}
.trade-card.give { border-left-color: var(--verde); background: #f0fbf8; }
.trade-card.take { border-left-color: var(--azul); background: #f0f4fb; }
.trade-cromo { font-size: 0.85rem; margin-bottom: 4px; }
.trade-detail { font-size: 0.78rem; color: #555; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.empty { color: var(--gris); padding: 10px; font-size: 0.85rem; }

/* Admin form */
.form-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; align-items: center; }
.form-row input[type="text"], .form-row input[type="password"] { padding: 6px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 0.85rem; }
.form-row input[type="color"] { width: 40px; height: 32px; border: 1px solid #ccc; border-radius: 5px; padding: 2px; }
.form-row .check { display: flex; align-items: center; gap: 4px; font-size: 0.85rem; }
.form-row button {
    background: var(--rojo);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.user-list { display: flex; flex-direction: column; gap: 6px; }
.user-row { background: white; padding: 8px 12px; border-radius: 6px; display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); font-size: 0.85rem; flex-wrap: wrap; }
.reset-pwd-form { display: flex; gap: 4px; margin-left: auto; }
.reset-pwd-form input { padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.78rem; width: 130px; }
.reset-pwd-form button { padding: 4px 10px; background: var(--amarillo); color: var(--azul); border: none; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 0.78rem; }
.muted { color: var(--gris); font-size: 0.8rem; }
.badge { background: var(--amarillo); color: var(--azul); padding: 1px 6px; border-radius: 999px; font-size: 0.65rem; font-weight: 700; }
.badge.admin { background: var(--rojo); color: white; }

@media (max-width: 700px) {
    .resumen { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .topbar { flex-direction: column; gap: 6px; padding: 8px; }
    .topbar nav { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .topbar nav a { font-size: 0.78rem; }
    main { padding: 10px; }
    .page-title { font-size: 1.15rem; }
    .grid-cromos { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
    .grid-cromos.compacto { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 5px; }
    /* Cards mas altas en mobile para que entre overlay del jugador + botones sin solaparse */
    .cromo-card { min-height: 110px; padding: 0 4px 4px; }
    .cromo-codigo-grande { font-size: 1rem; margin: 3px 0 1px; }
    .cromo-stock { font-size: 0.9rem; }
    /* Overlay jugador: subido para no chocar con cromo-bottom */
    .cromo-jugador { bottom: 30px; padding: 0 3px; }
    .cromo-card.no-actions .cromo-jugador,
    .cromo-card.mode-comunidad .cromo-jugador { bottom: 4px; }
    .cromo-jugador .jug-nombre { font-size: 0.5rem; }
    .cromo-jugador .jug-apellido { font-size: 0.62rem; }
    /* Botones bottom mas chicos para que entren */
    .cromo-bottom { gap: 3px; padding-top: 2px; min-height: 24px; }
    .cromo-bottom .btn-mini,
    .cromo-bottom .rep-badge { height: 22px; min-width: 24px; width: auto; padding: 0 6px; font-size: 0.72rem; line-height: 1; }
    .grid-grupos { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .grupo-card { padding: 10px; min-height: 80px; }
    .g-letra { font-size: 1.4rem; }
    .g-nombre { font-size: 0.65rem; }
    .g-pais { font-size: 0.62rem; gap: 4px; }
    .g-flag { width: 13px; height: 9px; }
    .grid-equipos { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .equipo-card { padding: 8px; gap: 8px; }
    .equipo-flag { width: 36px; height: 26px; }
    .e-nombre { font-size: 0.85rem; }
    .album-cta { font-size: 0.82rem; padding: 7px 12px; }
    .lote-grid { grid-template-columns: 1fr; }
    .btn-mini, .rep-badge { width: 26px; height: 24px; font-size: 0.78rem; }
    .cromo-bottom { gap: 4px; }
    .bulk-actions { flex-direction: column; }
    .btn-bulk { width: 100%; padding: 10px; }
    .album-toolbar { flex-direction: column; align-items: stretch; gap: 6px; }
    .album-toolbar input[type="text"] { width: 100%; }
    .modal-box { padding: 14px 16px; }
    .picker-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .picker-cromos { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
    .team-header h1 { font-size: 1.1rem; }
    .team-flag-big, .team-escudo-big { width: 42px; height: 42px; }
    .team-flag-big { height: 32px; }
    .otro-header { padding: 10px; flex-wrap: wrap; }
    .usuario-card { padding: 10px; }
    .usuario-pill { width: 36px; height: 36px; font-size: 1rem; }
}

/* Touch targets bigger en pantallas táctiles */
@media (hover: none) and (pointer: coarse) {
    .btn-mini, .rep-badge { min-height: 28px; min-width: 28px; }
    .cromo-card { padding-bottom: 6px; }
    .topbar nav a { padding: 6px 4px; }
}

/* ===== Export (botoncitos chicos) ===== */
.btn-export-chico {
    display: inline-block;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--rojo);
    color: white;
    border-radius: 5px;
    text-decoration: none;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1.4;
    border: 1px solid transparent;
    transition: background 0.1s;
}
.btn-export-chico:hover { background: #c1121f; }
.btn-export-chico.txt { background: #e5e7eb; color: #1f2937; border-color: #d1d5db; font-size: 0.7rem; padding: 3px 7px; }
.btn-export-chico.txt:hover { background: #d1d5db; }

/* Dropdown en /usuarios/{id} */
.export-menu { position: relative; display: inline-block; margin-left: 8px; }
.export-menu summary { list-style: none; cursor: pointer; user-select: none; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-menu-pop {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.14);
    padding: 6px;
    min-width: 240px;
    z-index: 10;
    display: flex;
    flex-direction: column;
}
.export-menu-pop a {
    padding: 6px 10px;
    font-size: 0.82rem;
    color: #1f2937;
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
}
.export-menu-pop a:hover { background: #f3f4f6; }
.export-menu-pop a.txt { font-size: 0.72rem; color: #6b7280; padding-left: 22px; }

/* ===== Admin jugadores ===== */
.jugadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}
.jug-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.jug-card:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.08); }
.jug-flag { width: 28px; height: 20px; object-fit: cover; border-radius: 3px; }
.jug-titulo { font-weight: 600; font-size: 0.88rem; }
.jug-progreso { font-size: 0.75rem; color: #6b7280; }
.jug-progreso.done { color: #16a34a; font-weight: 700; }

.jugadores-tabla {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 14px;
}
.jugadores-tabla th, .jugadores-tabla td { padding: 6px 10px; text-align: left; border-bottom: 1px solid #eee; }
.jugadores-tabla th { background: #f9fafb; font-size: 0.78rem; text-transform: uppercase; color: #6b7280; }
.jugadores-tabla input[type="text"] { width: 100%; padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.85rem; }
.jugadores-tabla input[type="text"]:focus { outline: none; border-color: var(--rojo); }
.jugadores-tabla .codigo-cell { font-family: monospace; min-width: 90px; }
