.btn-primary,
.bg-primary {
    background-color: #cc6666 !important;
    border-color: #cc6666 !important;
}

.btn-outline-red {
    background-color: #fff !important;
    color: #cc6666 !important;
    border-color: #cc6666 !important;
}

.btn-outline-red:hover {
    background-color: #cc6666 !important;
    color: #fff !important;
}

.text-primary {

    color: #cc6666 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

p {
    margin-bottom: 0.8rem;
}

hr {
        margin:  5px;
}

.table {
    table-layout: auto;
}

.dashboard-estadisticas-resumen td[data-stat],
.dashboard-estadisticas-resumen td[data-made] {
    font-size: 0.9em;
}

.estadisticas-partidos-body {
    background-color: #f8f9fa;
}

.estadisticas-partidos-resumen {
    height: 100%;
    padding: 0.5rem 0.25rem;
    border: 1px solid #e4e7eb;
    border-radius: 0.5rem;
    background: #fff;
}

.estadisticas-partidos-resumen span,
.estadistica-partido-metrica span {
    display: block;
    color: #6c757d;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
}

.estadisticas-partidos-resumen strong {
    display: block;
    color: #212529;
    font-size: 1rem;
}

.estadisticas-partido-card {
    overflow: hidden;
    border: 1px solid #e3e5e8;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
}

.estadisticas-partido-card + .estadisticas-partido-card {
    margin-top: 0.65rem;
}

.estadisticas-partido-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid #e9ecef;
}

.estadisticas-partido-categoria {
    color: #6c757d;
    font-size: 0.72rem;
    font-weight: 700;
}

.estadisticas-partido-fecha {
    color: #cc6666;
    font-size: 0.72rem;
    font-weight: 700;
}

.estadisticas-partido-resultado {
    flex: 0 0 auto;
    padding: 0.2rem 0.45rem;
    border: 1px solid #e3e5e8;
    border-radius: 0.35rem;
    background: #f8f9fa;
    color: #343a40;
    font-size: 0.72rem;
    font-weight: 700;
}

.estadisticas-partido-equipos {
    margin: 0;
    padding: 0.55rem 0.65rem 0.4rem;
    color: #343a40;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
}

.estadisticas-partido-metricas {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.35rem 0.55rem 0.6rem;
}

.estadisticas-partido-metrica {
    min-width: 0;
    padding: 0.3rem 0.1rem;
     font-size: 0.75rem;
    border: 1px solid #edf0f2;
    border-radius: 0.35rem;
    background: #f8f9fa;
    text-align: center;
}

.estadisticas-partido-metrica strong {
    display: block;
    overflow: hidden;
    color: #343a40;
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.estadisticas-partido-metrica.valoracion-positiva strong {
    color: #198754;
}

.estadisticas-partido-metrica.valoracion-negativa strong {
    color: #dc3545;
}

@media (min-width: 992px) {
  .table {
    table-layout: fixed;
  }
}


.container {
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.biblioteca-ejercicio-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.biblioteca-ejercicio-video {
    background-color: #111;
}

.biblioteca-ejercicio-video iframe {
    border: 0;
}

.biblioteca-ejercicio-screenshot-wrapper {
    padding: 6px;
    text-align: center;
    background-color: #f8f9fa;
}

.biblioteca-ejercicio-screenshot {
    max-width: 140px;
    height: 58px;
}

.biblioteca-ejercicio-descripcion {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 3rem;
}

.biblioteca-card {
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.biblioteca-card:hover {
    border: 1px solid rgba(204, 102, 102, 0.45);
    box-shadow: 0 4px 14px rgba(204, 102, 102, 0.12);
}

.biblioteca-tipo-badge {
    flex: 0 0 auto;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
}

.asignacion-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.asignacion-tipo {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.asignacion-progress {
    height: 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.asignacion-progress .progress-bar {
    background-color: #cc6666;
}

.asignacion-detalle {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.75rem;
}

.asignacion-detalle-titulo {
    display: block;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.asignacion-entrenador {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.asignacion-jugadores-grid {
    overflow-y: auto;
    max-height: 150px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.asignacion-jugador-estado {
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    display: flex;
    font-size: 0.75rem;
    justify-content: space-between;
    padding: 0.5rem;
}

.asignacion-jugador-foto {
    border-radius: 50%;
    height: 26px;
    object-fit: cover;
    width: 26px;
}

.asignacion-estado-badge {
    border-radius: 0.3rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.35rem;
    white-space: nowrap;
}

.asignacion-visto {
    background-color: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.asignacion-pendiente {
    background-color: rgba(255, 193, 7, 0.15);
    color: #9a7000;
}

.asignacion-plantilla-tabs {
    flex-wrap: nowrap;
    gap: 0.4rem;
    max-width: 100%;
    overflow-x: auto;
     word-wrap: break-word;
    padding-bottom: 0.35rem;
    flex-direction: column;
}

.asignacion-plantilla-tabs .nav-link {
    border: 1px solid rgba(204, 102, 102, 0.35);
    color: inherit;
    font-size: 0.78rem;
    white-space: nowrap;
    width: -webkit-fill-available;
    text-overflow: ellipsis;
  overflow: hidden;
}

.asignacion-plantilla-tabs .nav-link.active {
    background-color: #cc6666;
    border-color: #cc6666;
    color: #fff;
}

.asignacion-ejercicio-contenido {
    background-color: rgba(248, 249, 250, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    padding: 1rem;
}

.plantilla-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.plantilla-card:hover {
    border: 1px solid rgba(204, 102, 102, 0.45);
    box-shadow: 0 4px 14px rgba(204, 102, 102, 0.12);
}

.plantilla-ejercicios-count {
    white-space: nowrap;
    font-size: 0.7rem;
}

.plantilla-ejercicios-box {
    padding: 0.75rem;
    background-color: rgba(248, 249, 250, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
}

.plantilla-ejercicios-title {
    display: block;
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.plantilla-ejercicios-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plantilla-ejercicio-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    color: #495057;
    font-size: 0.75rem;
    line-height: 1.35;
}

.plantilla-ejercicio-item i {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: #cc6666;
}

.biblioteca-preview-image,
#biblioteca-ejercicio-video-preview img {
    max-width: 240px;
    max-height: 135px;
    object-fit: contain;
}

#biblioteca-ejercicio-video-preview .ratio {
    max-width: 320px;
    max-height: 180px;
}

.btn-primary {
    background-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}

.btn-remove {
    line-height: 18px;
    color: white;
    background-color: #bd1515;
}

.btn-remove:hover {
    line-height: 18px;
    color: white;
    background-color: #960d0d;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* Foto del jugador */
.jugador-foto {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    min-width: 50px;
    min-height: 50px;
}

/* Categorías */
.categoria-card {
    transition: all 0.3s ease;
}

.categoria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estado de documentos */
.estado-pendiente {
    background-color: #ffc107;
    color: #212529;
}

.estado-entregado {
    background-color: #198754;
    color: white;
}

.estado-vencido {
    background-color: #dc3545;
    color: white;
}

/* Visualización de documentos */
.doc-preview {
    max-height: 200px;
    max-width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Responsive ajustes */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* Form styles */
.form-label {
    font-weight: 500;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Navbar styles */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
}

/* Custom switch styling */
.form-switch .form-check-input {
    height: 1.25rem;
    width: 2.5rem;
}

/* Category badges */
.badge-category {
    font-size: 0.875rem;
    padding: 0.35em 0.65em;
    margin-right: 0.5em;
    margin-bottom: 0.5em;
    display: inline-block;
}

/* Document list */
.doc-list {
    list-style: none;
    padding-left: 0;
}

.doc-list-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Profile image in detail view */
#ver-jugador-foto {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


.color-option {
    display: inline-block;
    margin: 10px;
}

.color-option input[type="radio"] {
    display: none;
}

.color-box {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-option input[type="radio"]:checked+.color-box {
    border: 3px solid black;
    transform: scale(1.1);
}


.rojo {
    background-color: #df0808;
}

.blanco {
    background-color: #ffffff;
}

.azul {
    background-color: #1A1A9B;
}

.checkbox-grid-3columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;

}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.custom-modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 1rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.custom-modal-body {
    margin: 1rem 0;
}

.custom-modal-footer {
    text-align: right;
}

.close-btn {
    cursor: pointer;
    font-size: 1.5rem;
}

.btn-confirm {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.screen-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.table th {
    background-color: #fff;
    line-height: 35px;
}

.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


.progress-cell {
    background-color: #c7e1cd;
    border-radius: 4px;
    overflow: hidden;
    height: 28px;
    position: relative;
}

.progress-bar {
    background-color: #28a745;
    height: 100%;
    color: white;
    text-align: center;
    white-space: nowrap;
    transition: width 0.4s ease;
}

.progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    top: 0;
    left: 0;
    line-height: 28px;
    color: black;
}



.jugadores-disponibles {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

.jugadores-disponibles::-webkit-scrollbar {
    width: 6px;
}

.jugadores-disponibles::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.jugadores-disponibles::-webkit-scrollbar-thumb {
    background-color: #6c757d;
    border-radius: 3px;
}

.jugadores-seleccionados,
.jugadores-seleccionados {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

.jugadores-seleccionados::-webkit-scrollbar {
    width: 6px;
}

.jugadores-seleccionados::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.jugadores-seleccionados::-webkit-scrollbar-thumb {
    background-color: #6c757d;
    border-radius: 3px;
}

.tabla-jugadores-asistencia {
    scrollbar-width: thin;
    scrollbar-color: #6c757d #f8f9fa;
}

.escudo-logo {
  width: 100px;
  height: 120px;
  background: #e34c26; /* Naranja oficial */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  /* Fuente para el número */
  color: white;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 70px;
  
  /* Forma de escudo (Corte inferior) */
  clip-path: polygon(0% 0%, 100% 0%, 90% 90%, 50% 100%, 10% 90%);
}

/* Efecto de sombra para dar profundidad al naranja */
.escudo-logo::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1); /* Brillo en la mitad derecha */
  pointer-events: none;
}

.numero {
  font-family: 'Inter', sans-serif; /* Modern, bold font */
  font-size: calc(1em - 10px); 
  font-weight: 900;
  color: white;
  
  /* Refined 3D Look: Bottom shadow and subtle perspective */
  text-shadow: 
    0px 2px 0px #ccc, 
    0px 4px 0px #aaa, 
    0px 6px 1px rgba(0,0,0,0.1),
    0px 0px 5px rgba(0,0,0,0.1);
  
  /* Slight tilt to follow the shield's 3D split line */
  transform: translateY(-5px);
}

/* Modern visual layer */
:root {
    --app-ink: #203438;
    --app-muted: #687b7d;
    --app-surface: #ffffff;
    --app-background: #faf6f4;
    --app-red: #b83f45;
    --app-red-dark: #762d35;
    --app-coral: #df765f;
    --app-line: #eadbd7;
    --app-shadow: 0 12px 32px rgba(82, 38, 39, 0.1);
}

body {
    color: var(--app-ink);
    font-family: 'DM Sans', sans-serif;
    background-color: var(--app-background);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0;
}

.navbar {
    background: linear-gradient(100deg, var(--app-red-dark), var(--app-red)) !important;
    box-shadow: 0 4px 18px rgba(118, 45, 53, 0.22);
}

.navbar-brand img {
    border-radius: 10px;
    background: #fff;
    padding: 3px;
}

.nav-link {
    border-radius: 6px;
    margin: 0 2px;
    transition: background-color 160ms ease, color 160ms ease;
}

.nav-link:hover,
.nav-link:focus {
    background-color: rgba(255, 255, 255, 0.16);
}

.card,
.table-responsive {
    border: 1px solid var(--app-line);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
    background: var(--app-surface);
}

.card-header {
    color: var(--app-ink);
    background: #f8fbf9;
    border-bottom: 1px solid var(--app-line);
}

.btn-primary,
.bg-primary {
    background-color: var(--app-red) !important;
    border-color: var(--app-red) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--app-red-dark) !important;
    border-color: var(--app-red-dark) !important;
}

.btn-secondary {
    color: var(--app-ink);
    background-color: #e8efec;
    border-color: #e8efec;
}

.btn-outline-red {
    color: var(--app-coral) !important;
    border-color: var(--app-coral) !important;
}

.btn-outline-red:hover {
    background-color: var(--app-coral) !important;
    border-color: var(--app-coral) !important;
}

.text-primary {
    color: var(--app-red) !important;
}

.form-control,
.form-select {
    min-height: 42px;
    color: var(--app-ink);
    border-color: var(--app-line);
    border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-red);
    box-shadow: 0 0 0 0.2rem rgba(184, 63, 69, 0.14);
}

.form-label {
    color: var(--app-ink);
    font-weight: 600;
}

.table {
    --bs-table-striped-bg: #f7faf8;
    --bs-table-hover-bg: #edf5f1;
    color: var(--app-ink);
    margin-bottom: 0;
}

.table th {
    color: var(--app-muted);
    background-color: #f8fbf9;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#login-container,
#login-RePassword,
#login-recuperarPassword {
    min-height: 65vh;
    align-items: center;
}

#login-container .card,
#login-RePassword .card,
#login-recuperarPassword .card {
    overflow: hidden;
    border-top: 4px solid var(--app-coral);
}

#login-container .card-header,
#login-RePassword .card-header,
#login-recuperarPassword .card-header {
    padding: 1.5rem 1.25rem 0.75rem;
    background: var(--app-surface);
    border-bottom: 0;
}

#login-container .card-body,
#login-RePassword .card-body,
#login-recuperarPassword .card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.pagination .page-link {
    color: var(--app-red);
    border-color: var(--app-line);
}

.pagination .active .page-link {
    color: #fff;
    background-color: var(--app-red);
    border-color: var(--app-red);
}

@media (max-width: 768px) {
    .container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .card,
    .table-responsive {
        box-shadow: 0 6px 18px rgba(32, 52, 56, 0.07);
    }

    .table-responsive {
        overflow-x: auto;
    }
}