/* Torneos CardVerse — estilo KTS / Start.gg */
.page-torneos .store-main,
.page-torneo-detalle .store-main,
.page-torneo-ranking .store-main {
    background: #f6f7fb;
}

.torneos-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
    color: #fff;
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 12px 40px rgba(30, 27, 75, 0.25);
}

.torneos-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.torneos-hero-title i { color: #fbbf24; margin-right: 0.35rem; }

.torneos-hero-sub {
    color: rgba(255,255,255,0.82);
    margin: 0;
    font-size: 0.9rem;
}

.torneos-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.torneos-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.torneos-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.torneos-stat {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    text-align: center;
}

.torneos-stat strong { display: block; font-size: 1.35rem; font-weight: 800; }
.torneos-stat span { font-size: 0.72rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.04em; }

.card-torneos {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(15,23,42,0.05);
    margin-bottom: 1rem;
}

.torneos-filters { margin-bottom: 1rem; }

.torneo-card {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 0.75rem;
}

.torneo-card-body {
    flex: 1;
    min-width: 0;
}

.torneo-card-thumb {
    flex-shrink: 0;
    width: 112px;
    height: 84px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.torneo-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.torneo-card--has-img {
    padding: 0.85rem 1rem 0.85rem 0.85rem;
}

.torneo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15,23,42,0.1);
    color: inherit;
}

.torneo-card h3 { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 700; color: #111827; }
.torneo-card-meta { font-size: 0.8rem; color: #6b7280; }
.torneo-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 0.65rem; }

.torneo-badge {
    display: inline-flex;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
}

.torneo-badge--inscripciones_abiertas { background: #dcfce7; color: #15803d; }
.torneo-badge--en_curso { background: #fef3c7; color: #b45309; }
.torneo-badge--finalizado { background: #e0e7ff; color: #4338ca; }
.torneo-badge--programado { background: #f3f4f6; color: #4b5563; }
.torneo-badge--cancelado { background: #fee2e2; color: #b91c1c; }

.torneo-detalle-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0.25rem 0; }
.torneo-detalle-head-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.torneo-detalle-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.torneo-live-link { margin-top: 1rem; max-width: 480px; }

.torneo-tabs .nav-link { border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: #4b5563; }
.torneo-tabs .nav-link.active { background: #4f46e5; color: #fff; }

.torneo-table { width: 100%; font-size: 0.82rem; }
.torneo-table th { background: #f9fafb; font-weight: 700; padding: 0.5rem; border-bottom: 1px solid #e5e7eb; }
.torneo-table td { padding: 0.5rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }

.torneo-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.torneo-qr-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 0.85rem;
    text-align: center;
}

.torneo-qr-card img { width: 120px; height: 120px; border-radius: 8px; }
.torneo-qr-card strong { display: block; font-size: 0.78rem; margin-top: 0.35rem; }

.torneo-user-results {
    position: absolute;
    z-index: 10;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.torneo-user-pick {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}
.torneo-user-pick:hover { background: #f3f4f6; }

.torneo-match-row {
    display: grid;
    grid-template-columns: 3rem 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.torneo-match-row select { max-width: 100px; font-size: 0.78rem; }

/* ═══════════════════════════════════════════════════════════════
   Modal Crear torneo — light premium SaaS
   ═══════════════════════════════════════════════════════════════ */

.t-create-modal .modal-dialog {
    max-width: 720px;
}

.t-create-modal-content {
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.t-create-modal-header {
    padding: 1.35rem 1.5rem 1.1rem;
    border-bottom: 1px solid #F1F3F8;
    align-items: flex-start;
}

.t-create-modal-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.t-create-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    border: 1px solid #ddd6fe;
    display: grid;
    place-items: center;
    color: #7C3AED;
    flex-shrink: 0;
}

.t-create-modal-icon [data-lucide] {
    width: 22px;
    height: 22px;
}

.t-create-modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.2rem;
}

.t-create-modal-subtitle {
    font-size: 0.85rem;
    color: #6B7280;
}

.t-create-modal-close {
    opacity: 0.45;
    transition: opacity 0.2s ease;
}

.t-create-modal-close:hover {
    opacity: 0.85;
}

.t-create-modal-body {
    padding: 1.25rem 1.5rem 1rem;
    background: #fff;
}

.t-create-section {
    margin-bottom: 1.15rem;
}

.t-create-hint {
    font-size: 0.8rem;
    color: #6b7280;
}

.t-premios-pozo-list {
    display: grid;
    gap: 0.5rem;
}

.t-premio-pozo-row {
    display: grid;
    grid-template-columns: 72px 110px 1fr 32px;
    gap: 0.45rem;
    align-items: center;
}

@media (max-width: 560px) {
    .t-premio-pozo-row { grid-template-columns: 1fr 1fr; }
    .t-premio-pozo-row .t-premio-etiqueta { grid-column: 1 / -1; }
    .t-premio-pozo-row .t-premio-rm { justify-self: end; }
}

.t-create-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.45rem;
}

.t-create-label [data-lucide] {
    width: 15px;
    height: 15px;
    color: #7C3AED;
}

.t-create-label-opt {
    font-weight: 500;
    color: #9ca3af;
}

.t-create-image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.t-create-image-upload {
    position: relative;
}

.t-create-image-drop {
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    background: #fafafa;
    min-height: 148px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.t-create-image-drop:hover,
.t-create-image-drop:focus-visible {
    border-color: #a78bfa;
    background: #f5f3ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.t-create-image-drop.is-dragover {
    border-color: #7c3aed;
    background: #ede9fe;
}

.t-create-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1.25rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

.t-create-image-placeholder [data-lucide] {
    width: 28px;
    height: 28px;
    color: #7c3aed;
}

.t-create-image-placeholder small {
    font-size: 0.72rem;
    color: #9ca3af;
}

.t-create-image-preview {
    position: relative;
    width: 100%;
    min-height: 148px;
    max-height: 220px;
}

.t-create-image-preview img {
    width: 100%;
    height: 100%;
    min-height: 148px;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.t-create-image-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.t-create-image-remove:hover {
    background: rgba(220, 38, 38, 0.9);
}

.t-create-image-remove [data-lucide] {
    width: 16px;
    height: 16px;
}

.t-create-input,
.t-create-modal .form-select.t-create-input,
.t-create-modal .form-control.t-create-input {
    height: 52px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 0.9rem;
    padding: 0 0.9rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.t-create-textarea {
    height: auto !important;
    min-height: 120px;
    padding: 0.75rem 0.9rem !important;
    resize: vertical;
}

.t-create-input:hover,
.t-create-modal .form-select.t-create-input:hover {
    border-color: #C4B5FD;
}

.t-create-input:focus,
.t-create-modal .form-select.t-create-input:focus,
.t-create-modal .form-control.t-create-input:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
    outline: none;
}

.t-create-grid {
    display: grid;
    gap: 0.85rem;
}

.t-create-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Tienda card */
.t-create-tienda-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    background: linear-gradient(135deg, #faf9ff 0%, #fff 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.t-create-tienda-card:hover {
    border-color: #C4B5FD;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
}

.t-create-tienda-card.is-picker {
    padding-right: 2.5rem;
}

.t-create-tienda-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7C3AED, #a78bfa);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 800;
    overflow: hidden;
}

.t-create-tienda-logo [data-lucide] {
    width: 24px;
    height: 24px;
}

.t-create-tienda-logo-text {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding: 0 4px;
    text-align: center;
    line-height: 1.1;
}

.t-create-tienda-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.t-create-tienda-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t-create-tienda-city {
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 600;
}

.t-create-tienda-hint {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7C3AED;
    margin-top: 0.15rem;
}

.t-create-tienda-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.t-create-tienda-card:not(.is-picker) .t-create-tienda-select {
    pointer-events: none;
    z-index: -1;
}

.t-create-tienda-card.is-picker::after {
    content: '';
    position: absolute;
    right: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #7C3AED;
    pointer-events: none;
    z-index: 1;
}

/* Aviso */
.t-create-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
    font-size: 0.82rem;
    color: #5b21b6;
    line-height: 1.45;
    margin-top: 0.25rem;
}

.t-create-notice [data-lucide] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Footer */
.t-create-modal-footer {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #F1F3F8;
    gap: 0.65rem;
    justify-content: flex-end;
}

.t-create-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 48px;
    padding: 0 1.15rem;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: #374151;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.t-create-btn-cancel:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    color: #111827;
}

.t-create-btn-cancel [data-lucide] {
    width: 16px;
    height: 16px;
}

.t-create-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 48px;
    padding: 0 1.35rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #7C3AED 0%, #9333ea 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.t-create-btn-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.4);
}

.t-create-btn-submit [data-lucide] {
    width: 17px;
    height: 17px;
}

@media (max-width: 767.98px) {
    .t-create-grid--3 {
        grid-template-columns: 1fr;
    }

    .t-create-modal-body {
        padding: 1rem 1.1rem;
    }

    .t-create-modal-footer {
        flex-direction: column-reverse;
    }

    .t-create-btn-cancel,
    .t-create-btn-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .t-create-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* —— Loaders —— */
.torneos-inline-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 3rem 1.5rem;
    color: #64748b;
    font-size: 0.92rem;
    min-height: 200px;
}

.torneos-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 58, 237, 0.15);
    border-top-color: #7C3AED;
    border-radius: 50%;
    animation: torneosSpin 0.75s linear infinite;
}

@keyframes torneosSpin {
    to { transform: rotate(360deg); }
}

.torneos-stat.is-loading strong {
    color: transparent;
    background: linear-gradient(90deg, rgba(255,255,255,0.15) 25%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.15) 75%);
    background-size: 200% 100%;
    animation: torneosShimmer 1.2s ease-in-out infinite;
    border-radius: 6px;
    min-width: 2rem;
    display: inline-block;
}

@keyframes torneosShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.torneos-list-wrap.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.t-create-btn-submit.is-saving,
.t-create-btn-submit:disabled {
    opacity: 0.88;
    cursor: wait;
    pointer-events: none;
}

.torneos-btn-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: torneosSpin 0.65s linear infinite;
    vertical-align: -0.12em;
    margin-right: 0.35rem;
}

/* ——— Dashboard torneos (tabs, grid, cards) ——— */

.tournaments-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 18px 50px;
}

.tournaments-hero {
    border-radius: 22px;
    padding: 28px;
    background: linear-gradient(135deg, #1238d8, #4c1d95, #6d28d9);
    box-shadow: 0 20px 45px rgba(76, 29, 149, 0.22);
}

.torneos-hero-intro {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.torneos-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: #fbbf24;
    flex-shrink: 0;
}

.tournaments-hero-stats {
    margin-top: 4px;
}

.torneos-stat--link {
    border: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background 0.2s, transform 0.15s;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.torneos-stat--link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.torneos-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    font-size: 1rem;
}

.torneos-stat-icon--prox { background: rgba(59, 130, 246, 0.35); color: #bfdbfe; }
.torneos-stat-icon--live { background: rgba(249, 115, 22, 0.35); color: #fed7aa; }
.torneos-stat-icon--done { background: rgba(34, 197, 94, 0.35); color: #bbf7d0; }

.torneos-stat--link strong {
    font-size: 1.75rem;
    line-height: 1.1;
}

.torneos-stat--link span {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
}

.torneos-stat--link em {
    font-style: normal;
    font-size: 0.72rem;
    opacity: 0.75;
    margin-top: 2px;
}

.btn-torneos-ranking {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.65);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.55rem 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-torneos-ranking:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.torneos-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-torneos-create {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: 0;
    color: #fff;
    font-weight: 800;
    border-radius: 12px;
    padding: 0.55rem 1.1rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-torneos-create:hover {
    filter: brightness(1.06);
    color: #fff;
}

.btn-torneos-create--amistoso {
    background: linear-gradient(135deg, #0d9488, #059669);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.28);
}

.tournament-tag-amistoso {
    background: rgba(13, 148, 136, 0.12) !important;
    border-color: rgba(13, 148, 136, 0.35) !important;
    color: #0f766e !important;
}

.btn-torneos-filter {
    background: linear-gradient(135deg, #2563eb, #6d28d9);
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.55rem 1rem;
}

.btn-torneos-filter:hover {
    filter: brightness(1.05);
    color: #fff;
}

.btn-torneos-clear {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #475569;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.55rem 1rem;
}

.btn-torneos-clear:hover {
    background: #f8fafc;
    color: #334155;
}

.tournament-tabs {
    margin-top: 18px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 8px;
    display: flex;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tournament-tab {
    border: 0;
    background: transparent;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tournament-tab i {
    font-size: 0.9rem;
    opacity: 0.85;
}

.tournament-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.35rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
}

.tournament-tab.active {
    background: #fff;
    color: #5b21b6;
    box-shadow: 0 8px 18px rgba(91, 33, 182, 0.12);
    border-bottom: 3px solid #ff6b00;
}

.tournament-tab.active .tournament-tab-count {
    background: #ede9fe;
    color: #5b21b6;
}

.tournaments-filters .form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tournaments-filters .form-label i {
    margin-right: 4px;
    color: #7c3aed;
}

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tournament-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
    z-index: 5;
}

.tournament-card--finished .progress-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.tournament-image {
    border-radius: 16px;
    overflow: hidden;
    min-height: 150px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

.tournament-image img {
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    display: block;
}

.tournament-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.tournament-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.players-count {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.tournament-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.tournament-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 8px;
}

.tournament-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tournament-meta i {
    color: #94a3b8;
    font-size: 0.78rem;
}

.tournament-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tournament-tags span {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-en-curso {
    background: #ffedd5;
    color: #ea580c;
}

.status-proximo {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-finalizado {
    background: #dcfce7;
    color: #15803d;
}

.status-cancelado {
    background: #f1f5f9;
    color: #64748b;
}

.round-timer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #fed7aa;
}

.round-timer--muted {
    justify-content: flex-start;
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    font-weight: 600;
}

.round-timer .timer-value {
    font-size: 16px;
    font-weight: 900;
    color: #ea580c;
    font-variant-numeric: tabular-nums;
}

.round-timer.is-warning {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
    animation: roundTimerPulse 1.2s ease-in-out infinite;
}

.round-timer.is-warning .timer-value {
    color: #dc2626;
}

@keyframes roundTimerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
}

.tournament-progress {
    margin-top: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 600;
}

.progress-bar {
    height: 7px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7a18, #ff4d00);
    transition: width 0.3s ease;
}

.tournament-card:not(.tournament-card--finished) .progress-fill {
    background: linear-gradient(90deg, #3b82f6, #7c3aed);
}

.tournament-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.tournament-action-btn {
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    color: #1e293b;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    transition: background 0.15s, border-color 0.15s;
}

.tournament-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.tournament-action-btn--primary {
    background: linear-gradient(135deg, #ff7a18, #ff4d00);
    color: #fff;
    border: 0;
}

.tournament-action-btn--primary:hover {
    background: linear-gradient(135deg, #ff8f30, #ff5500);
    color: #fff;
    filter: none;
}

.tournament-action-btn--danger {
    color: #dc2626;
    border-color: #fecaca;
}

.tournament-action-btn--danger:hover {
    background: #fef2f2;
}

.pagination-wrapper {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-summary {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 600;
}

.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #334155;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

.pagination-link.active {
    background: #5b21b6;
    color: #fff;
    border-color: #5b21b6;
}

.pagination-link.disabled,
.pagination-link:disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

.pagination-ellipsis {
    padding: 9px 6px;
    color: #94a3b8;
    font-weight: 700;
}

.tournaments-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 20px;
}

.tournaments-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #7c3aed;
}

.tournaments-empty h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px;
}

.tournaments-empty p {
    color: #64748b;
    margin: 0 0 18px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

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

@media (max-width: 768px) {
    .tournaments-page {
        padding: 16px 12px 40px;
    }

    .tournaments-hero {
        padding: 20px 18px;
    }

    .torneos-hero-stats {
        grid-template-columns: 1fr;
    }

    .tournament-card {
        grid-template-columns: 1fr;
    }

    .tournament-image {
        min-height: 120px;
    }

    .tournament-image img {
        min-height: 120px;
    }

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

    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pagination {
        justify-content: center;
    }
}

.torneos-store-filter-banner {
    margin-bottom: 0.75rem;
}

.torneos-store-filter-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #f5f3ff;
    border: 1px solid rgba(124, 58, 237, 0.15);
    font-size: 0.9rem;
}

.torneos-store-filter-banner__inner i {
    color: #7c3aed;
    margin-right: 0.35rem;
}

