﻿/* =========================================================
   ESTILO GENERAL
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fa;
    color: #263238;
}

.contenedor {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.encabezado {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    .encabezado h1 {
        margin: 0 0 18px 0;
        font-size: 32px;
    }

.datos-usuario {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
}

.dato {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .dato span {
        font-size: 13px;
        color: #78909c;
        text-transform: uppercase;
        font-weight: bold;
    }

    .dato strong {
        font-size: 17px;
    }


/* =========================================================
   TARJETAS
   ========================================================= */

.tarjeta {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    .tarjeta h2 {
        margin-top: 0;
        margin-bottom: 22px;
        font-size: 22px;
    }


/* =========================================================
   MENU
   ========================================================= */

.menu-botones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

    .menu-botones button {
        min-height: 75px;
        font-size: 16px;
        font-weight: bold;
    }


/* =========================================================
   BOTONES
   ========================================================= */

button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    background: #1976d2;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

    button:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
    }

    button:active {
        transform: translateY(0);
    }

#btnCerrarSesion {
    background: #546e7a;
}


/* =========================================================
   ESTADO DE INSCRIPCION
   ========================================================= */

.estado {
    margin-top: 20px;
    padding: 15px 18px;
    border-radius: 10px;
    background: #eceff1;
    font-weight: bold;
    font-size: 16px;
}


/* =========================================================
   PIE
   ========================================================= */

.pie {
    text-align: center;
    color: #90a4ae;
    font-size: 13px;
    margin-top: 30px;
}


/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 600px) {

    .contenedor {
        width: 94%;
        margin: 20px auto;
    }

    .encabezado {
        padding: 22px;
    }

        .encabezado h1 {
            font-size: 26px;
        }

    .datos-usuario {
        flex-direction: column;
        gap: 15px;
    }

    .tarjeta {
        padding: 20px;
    }

    .menu-botones {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   DEPORTISTAS
   ========================================================= */

.encabezado-pagina {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

    .encabezado-pagina h1 {
        margin: 0;
    }


/* =========================================================
   FORMULARIO
   ========================================================= */

#formularioDeportista {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    margin: 25px 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    #formularioDeportista h2 {
        margin-top: 0;
        margin-bottom: 25px;
    }

#formDeportista {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

    #formDeportista > div {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    #formDeportista label {
        font-size: 14px;
        font-weight: bold;
        color: #455a64;
    }

    #formDeportista input,
    #formDeportista select {
        width: 100%;
        padding: 11px 12px;
        border: 1px solid #cfd8dc;
        border-radius: 8px;
        background: #ffffff;
        font-size: 15px;
    }

        #formDeportista input:focus,
        #formDeportista select:focus {
            outline: none;
            border-color: #1976d2;
            box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
        }

    #formDeportista button {
        margin-top: 5px;
    }

        #formDeportista button[type="submit"] {
            background: #1976d2;
        }

#btnCancelar {
    background: #78909c;
}

#mensajeFormulario {
    margin-bottom: 0;
    font-weight: bold;
}


/* =========================================================
   MENSAJE / ESTADO
   ========================================================= */

#mensaje {
    font-weight: bold;
    color: #546e7a;
}

#btnNuevoDeportista:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btnEditar:disabled,
.btnEliminar:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =========================================================
   TABLA
   ========================================================= */

#tablaDeportistas {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    #tablaDeportistas th {
        background: #37474f;
        color: #ffffff;
        padding: 14px 12px;
        text-align: left;
        font-size: 14px;
    }

    #tablaDeportistas td {
        padding: 12px;
        border-bottom: 1px solid #eceff1;
        font-size: 14px;
    }

    #tablaDeportistas tbody tr:hover {
        background: #f5f8fa;
    }

    #tablaDeportistas tbody tr:last-child td {
        border-bottom: none;
    }

    #tablaDeportistas .btnEditar,
    #tablaDeportistas .btnEliminar {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 5px;
    }

    #tablaDeportistas .btnEliminar {
        background: #c62828;
    }


/* =========================================================
   ESTADO INSCRIPCIÓN
   ========================================================= */

#mensaje:not(:empty) {
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 10px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    #formDeportista {
        grid-template-columns: 1fr;
    }

    #tablaDeportistas {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

        #tablaDeportistas th,
        #tablaDeportistas td {
            padding: 10px;
        }
}
/* =========================================================
   USUARIOS
   ========================================================= */

#formularioUsuario {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

    #formularioUsuario h2 {
        margin-top: 0;
        margin-bottom: 25px;
    }

#formUsuario {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

    #formUsuario > div {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    #formUsuario label {
        font-size: 14px;
        font-weight: bold;
        color: #455a64;
    }

    #formUsuario input,
    #formUsuario select {
        width: 100%;
        padding: 11px 12px;
        border: 1px solid #cfd8dc;
        border-radius: 8px;
        background: #ffffff;
        font-size: 15px;
    }

        #formUsuario input:focus,
        #formUsuario select:focus {
            outline: none;
            border-color: #1976d2;
            box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
        }

    #formUsuario button {
        margin-top: 5px;
    }

        #formUsuario button[type="submit"] {
            background: #1976d2;
        }

#mensajeFormulario {
    margin-bottom: 0;
    font-weight: bold;
}


/* =========================================================
   TABLA USUARIOS
   ========================================================= */

#tablaUsuarios {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

    #tablaUsuarios th {
        background: #37474f;
        color: #ffffff;
        padding: 14px 12px;
        text-align: left;
        font-size: 14px;
    }

    #tablaUsuarios td {
        padding: 12px;
        border-bottom: 1px solid #eceff1;
        font-size: 14px;
    }

    #tablaUsuarios tbody tr:hover {
        background: #f5f8fa;
    }

    #tablaUsuarios tbody tr:last-child td {
        border-bottom: none;
    }

    #tablaUsuarios .btnEditar,
    #tablaUsuarios .btnEliminar {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 5px;
    }

    #tablaUsuarios .btnEliminar {
        background: #c62828;
    }


/* =========================================================
   MENSAJE
   ========================================================= */

#mensaje:not(:empty) {
    margin: 8px 0 0 0;
    color: #546e7a;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {

    #formUsuario {
        grid-template-columns: 1fr;
    }

    #tablaUsuarios {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

        #tablaUsuarios th,
        #tablaUsuarios td {
            padding: 10px;
        }
}
/* =========================================================
   LOGIN
   ========================================================= */

.login-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f6fa;
}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.login-contenedor {
    width: 100%;
    max-width: 430px;
    padding: 25px;
}


/* =========================================================
   TARJETA
   ========================================================= */

.login-tarjeta {
    background: #ffffff;
    border-radius: 18px;
    padding: 40px 38px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    text-align: center;
}


/* =========================================================
   LOGO
   ========================================================= */

.login-logo {
    width: 130px;
    height: 130px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .login-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }


/* =========================================================
   ENCABEZADO
   ========================================================= */

.login-encabezado h1 {
    margin: 0;
    font-size: 30px;
    color: #263238;
}

.login-encabezado p {
    margin: 8px 0 30px;
    font-size: 16px;
    color: #78909c;
}


/* =========================================================
   CAMPOS
   ========================================================= */

.login-campo {
    text-align: left;
    margin-bottom: 20px;
}

    .login-campo label {
        display: block;
        margin-bottom: 7px;
        font-size: 14px;
        font-weight: bold;
        color: #455a64;
    }

    .login-campo input {
        width: 100%;
        padding: 13px 14px;
        border: 1px solid #cfd8dc;
        border-radius: 9px;
        background: #ffffff;
        font-size: 15px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .login-campo input:focus {
            outline: none;
            border-color: #1976d2;
            box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
        }


/* =========================================================
   BOTÓN INGRESAR
   ========================================================= */

.login-boton {
    width: 100%;
    margin-top: 8px;
    padding: 13px 18px;
    border: none;
    border-radius: 9px;
    background: #1976d2;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .login-boton:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 14px rgba(0, 0, 0, 0.15);
    }

    .login-boton:active {
        transform: translateY(0);
    }


/* =========================================================
   MENSAJE
   ========================================================= */

.login-mensaje {
    min-height: 22px;
    margin: 18px 0 0;
    font-size: 14px;
    font-weight: bold;
    color: #c62828;
}


/* =========================================================
   PIE
   ========================================================= */

.login-pie {
    margin-top: 25px;
    font-size: 12px;
    color: #90a4ae;
}


/* =========================================================
   CELULAR
   ========================================================= */

@media (max-width: 500px) {

    .login-contenedor {
        padding: 15px;
    }

    .login-tarjeta {
        padding: 32px 25px;
    }

    .login-logo {
        width: 110px;
        height: 110px;
    }

    .login-encabezado h1 {
        font-size: 26px;
    }
}


.password-contenedor {
    position: relative;
    display: flex;
    align-items: center;
}

.password-contenedor input {
    width: 100%;
    padding-right: 45px;
    box-sizing: border-box;
}

.password-ojo {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #546e7a;
}

.password-ojo:hover {
    background: transparent;
    box-shadow: none;
}
.password-contenedor {
    position: relative;
    display: flex;
    align-items: center;
}

.password-contenedor input {
    width: 100%;
    padding-right: 45px;
}

.password-mostrar {
    position: absolute;
    right: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}
