body{
    background:#f5f5f5;
}
#sidebar{
    width:250px;
    min-height:100vh;
    background:#212529;
    color:white;
}
#sidebar button{
    color:white;
    text-align:left;
    width:100%;
}
#sidebar button:hover{
    background:#343a40;
}
#contenido{
    min-height:90vh;
}

/* =====================================================
   APPDEPORTES - TEMAS DEPORTES
   ===================================================== */

.deporte-header{
    position:relative;
    overflow:hidden;
    border:none;
    padding:16px 18px;
}

.deporte-header::after{
    content:"";
    position:absolute;
    top:-25px;
    right:-25px;
    width:90px;
    height:90px;
    background:rgba(255,255,255,.12);
    border-radius:50%;
}

.deporte-futbolito{
    background:linear-gradient(135deg,#16A34A,#15803D);
}

.deporte-padel{
    background:linear-gradient(135deg,#2563EB,#1D4ED8);
}

.deporte-tenis{
    background:linear-gradient(135deg,#0EA5E9,#0284C7);
}

.deporte-basquetbol{
    background:linear-gradient(135deg,#F59E0B,#D97706);
}

.deporte-voleibol{
    background:linear-gradient(135deg,#7C3AED,#5B21B6);
}

.deporte-default{
    background:linear-gradient(135deg,#6B7280,#4B5563);
}

/* Icono circular blanco */
.deporte-icono{
    width:46px;
    height:46px;
    border-radius:50%;
    background:#FFFFFF22;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    border:2px solid rgba(255,255,255,.25);
    backdrop-filter:blur(4px);
}

/* Card */
.card-partido{
    border:none;
    border-radius:18px;
    overflow:hidden;
    transition:transform .2s ease, box-shadow .2s ease;
}

.card-partido:hover{
    transform:translateY(-3px);
    box-shadow:0 12px 28px rgba(0,0,0,.12);
}

/* Avatar organizador */
.avatar-organizador{
    width:50px;
    height:50px;
    object-fit:cover;
    border:2px solid #FFFFFF;
    box-shadow:0 2px 8px rgba(0,0,0,.12);
}

/* Avatares participantes */
.avatar-participante{
    width:36px;
    height:36px;
    object-fit:cover;
    border:2px solid #FFFFFF;
    margin-left:-10px;
    box-shadow:0 2px 6px rgba(0,0,0,.12);
}

.avatar-participante:first-child{
    margin-left:0;
}

/* Badges */
.badge-estado{
    background:rgba(255,255,255,.22);
    color:#FFFFFF;
    border:1px solid rgba(255,255,255,.25);
    font-weight:600;
}

/* Información */
.info-item{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:10px;
}

.info-item i{
    width:18px;
    text-align:center;
    font-size:16px;
}

.info-label{
    color:#6B7280;
    font-size:13px;
}

.info-value{
    color:#111827;
    font-weight:600;
}

/* ===========================
   DASHBOARD
=========================== */
.dashboard-card{
    border:none;
    border-radius:18px;
    color:white;
    overflow:hidden;
    transition:.25s;
    cursor:pointer;
}
.dashboard-card:hover{
    transform:translateY(-6px);
    box-shadow:0 12px 25px rgba(0,0,0,.18);
}
.dashboard-icon{
    font-size:42px;
    opacity:.25;
}
.dashboard-number{
    font-size:42px;
    font-weight:bold;
}
.dashboard-title{
    font-size:16px;
}
.bg-dashboard-green{
    background:linear-gradient(135deg,#2ecc71,#27ae60);
}
.bg-dashboard-blue{
    background:linear-gradient(135deg,#3498db,#2980b9);
}
.bg-dashboard-orange{
    background:linear-gradient(135deg,#f39c12,#d35400);
}
.bg-dashboard-red{
    background:linear-gradient(135deg,#e74c3c,#c0392b);
}

/* ===========================
   MENÚ LATERAL
=========================== */
.menu-item{
    width:100%;
    text-align:left;
    border-radius:10px;
    margin-bottom:6px;
    transition:.2s;
}
.menu-item:hover{
    background:#f5f5f5;
}
.menu-item.active{
    background:#0d6efd;
    color:white !important;
    font-weight:bold;
}
.menu-item.active:hover{
    background:#0b5ed7;
}

/* ===========================
   TOAST APPDEPORTES
=========================== */
.app-toast {
    border: none;
    border-radius: 16px;
    min-width: 340px;
    background: white;
    box-shadow: 0 8px 25px rgba(0,0,0,.18);
    overflow: hidden;
}
.app-toast-header{
    background:#198754;
    color:white;
    font-weight:600;
    padding:12px 16px;
}
.app-toast-body{
    padding:16px;
    font-size:15px;
}
.app-toast-time{
    color:#777;
    font-size:12px;
    margin-top:10px;
}

.card-partido{
    border-width:3px;
    transition:.25s;
}
.card-partido:hover{
    transform:translateY(-4px);
    box-shadow:0 .7rem 1.4rem rgba(0,0,0,.15);
}

.dashboard-stat{
    border:none;
    border-radius:18px;
    transition:.25s;
    box-shadow:0 .25rem .75rem rgba(0,0,0,.08);
}
.dashboard-stat:hover{
    transform:translateY(-5px);
    box-shadow:0 .8rem 1.5rem rgba(0,0,0,.15);
}
.stat-icon{
    font-size:2rem;
    margin-bottom:10px;
}

/* ===========================
   BOTONES DE REDES SOCIALES
   =========================== */
.btn-whatsapp{
    background:#25D366;
    color:#fff;
    border-color:#25D366;
}
.btn-whatsapp:hover,.btn-whatsapp:focus{
    background:#1eb855;
    color:#fff;
}
.btn-telegram{
    background:#229ED9;
    color:#fff;
    border-color:#229ED9;
}
.btn-telegram:hover,.btn-telegram:focus{
    background:#1c87ba;
    color:#fff;
}
.btn-facebook{
    background:#1877F2;
    color:#fff;
    border-color:#1877F2;
}
.btn-facebook:hover,.btn-facebook:focus{
    background:#1462c4;
    color:#fff;
}
.btn-x{
    background:#000;
    color:#fff;
    border-color:#000;
}
.btn-x:hover,.btn-x:focus{
    background:#282828;
    color:#fff;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 991.98px) {
    body {
        overflow-x: hidden;
    }
    #sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1055;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    #sidebar.show {
        left: 0;
        box-shadow: 0 0 40px rgba(0,0,0,0.5);
    }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1050;
    }
    #sidebar-overlay.show {
        display: block;
    }
    main {
        width: 100%;
        padding: 1rem !important;
    }
    #topbar-mobile {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        background: #212529;
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 1040;
    }
    #btnMenuToggle {
        border: none;
        background: transparent;
        color: #fff;
        font-size: 1.5rem;
        padding: 0;
        line-height: 1;
    }
    .app-toast {
        min-width: 90vw;
    }
}

@media (min-width: 992px) {
    #topbar-mobile {
        display: none !important;
    }
    #sidebar-overlay {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.4rem;
    }
    .dashboard-number {
        font-size: 2.2rem;
    }
    .dashboard-icon {
        font-size: 2.2rem;
    }
    .dashboard-title {
        font-size: 0.95rem;
    }
    .card-partido {
        border-radius: 14px;
    }
    .avatar-organizador {
        width: 44px;
        height: 44px;
    }
    .avatar-participante {
        width: 32px;
        height: 32px;
    }
    .table {
        font-size: 0.9rem;
    }
    .table th,
    .table td {
        white-space: nowrap;
    }
    #adminPremium .card-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch !important;
    }
    #adminPremium .btn-group {
        width: 100%;
    }
    #adminPremium .btn-group .btn {
        flex: 1;
    }
    #listaNotificaciones .card,
    #listaMisPartidos .card,
    #listaPartidos .card,
    #dashboardPartidos .card {
        border-radius: 14px;
    }
    #notificaciones .btn,
    #mis-partidos .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    main {
        padding: 0.75rem !important;
    }
    .card-body {
        padding: 1rem;
    }
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }
    #filtrosPartidos .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================================
   MANTENEDOR DE DEPORTES
   ============================================================ */

/* Grilla de emojis del modal */
.grilla-emojis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.btn-emoji {
    font-size: 1.35rem;
    line-height: 1;
    padding: 6px 0;
    border: 1px solid #e9ecef;
    transition: transform .12s ease, background .12s ease;
}

.btn-emoji:hover {
    transform: scale(1.15);
    background: #e7f1ff;
}

/* Temas dinámicos para deportes creados desde el mantenedor.
   El frontend elige uno estable según un hash del código. */
.deporte-tema-1 { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.deporte-tema-2 { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.deporte-tema-3 { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.deporte-tema-4 { background: linear-gradient(135deg, #EC4899, #BE185D); }
.deporte-tema-5 { background: linear-gradient(135deg, #F97316, #C2410C); }
.deporte-tema-6 { background: linear-gradient(135deg, #22C55E, #15803D); }
.deporte-tema-7 { background: linear-gradient(135deg, #0EA5E9, #0369A1); }
.deporte-tema-8 { background: linear-gradient(135deg, #64748B, #334155); }

/* Tabla del mantenedor en mobile: el input de orden no debe estirarse */
#adminDeportes .table input[type="number"] {
    min-width: 64px;
}


