* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f7f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: linear-gradient(90deg, #1e4228 0%, #2e5f38 100%);
    color: white;
    text-align: center;
    padding: 25px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative;
}

header .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

header img {
    width: 58px;
    height: 58px;
    border-radius: 10px;
}

header h1 {
    margin: 0;
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: 1.2px;
}

header p {
    margin: 8px 0 0;
    font-size: 1.15rem;
    color: #dbe7d6;
}

.login-btn {
    position: absolute;
    top: 20px;
    right: 30px;
}

.login-btn a {
    background-color: #3d8a4f;
    color: white;
    padding: 9px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
    transition: 0.25s ease;
}

.login-btn a:hover {
    background-color: #1e4228;
    transform: translateY(-3px) scale(1.04);
}

.login-btn .icono {
    font-size: 1.1rem;
}

nav {
    background-color: #3d8a4f;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 150;
    backdrop-filter: blur(6px);
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 8px 18px;
    border-radius: 8px;
    transition: 0.3s ease;
}

nav a:hover,
nav a.activo {
    background-color: #1e4228;
    transform: scale(1.05);
}

main {
    flex-grow: 1;
}

section {
    padding: 50px 12%;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    color: #1e4228;
    border-left: 7px solid #3d8a4f;
    padding-left: 18px;
    font-size: 1.9rem;
    margin-bottom: 22px;
    font-weight: 700;
}

form {
    background-color: #d7e4d2;
    padding: 38px;
    border-radius: 14px;
    max-width: 650px;
    margin: auto;
    border: 2px solid #1e4228;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.17);
}

form label {
    font-weight: bold;
    color: #1e4228;
    font-size: 1.05rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0 18px;
    border-radius: 6px;
    border: 1.7px solid #9a9a9a;
    font-size: 1rem;
    transition: 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3d8a4f;
    outline: none;
    box-shadow: 0 0 7px rgba(61, 138, 79, 0.5);
}

button {
    background-color: #1e4228;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.07rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

button:hover {
    background-color: #2e5f38;
    transform: scale(1.04);
}

.tabla-equipos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 28px;
}

.equipo {
    background-color: #d7e4d2;
    border: 1.7px solid #1e4228;
    border-radius: 12px;
    text-align: center;
    padding: 22px;
    transition: 0.3s;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.11);
}

.equipo:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.equipo img {
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
    border-radius: 8px;
}

.equipo h3 {
    color: #1e4228;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.equipo button {
    background-color: #1e4228;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 0.95rem;
}

.info-extra {
    display: none;
    margin-top: 12px;
    font-size: 0.95rem;
    color: #1e4228;
    background-color: #cfe0cf;
    padding: 12px;
    border-radius: 10px;
    text-align: left;
    animation: fadeIn 0.3s ease;
}

.equipo:hover .info-extra {
    display: block;
}

.contenedor-principal {
    display: flex;
    gap: 45px;
    padding: 55px 8% 70px;
    align-items: flex-start;
}

.sidebar {
    flex: 0 0 250px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 22px;
    height: fit-content;
    position: sticky;
    top: 25px;
}

.sidebar h3 {
    margin-top: 0;
    color: #1e4228;
    border-left: 6px solid #3d8a4f;
    padding-left: 12px;
    font-size: 1.25rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin-top: 18px;
}

.sidebar ul li {
    margin-bottom: 14px;
}

.sidebar ul a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 1.05rem;
}

.sidebar ul a:hover {
    background-color: #e6f2ea;
    color: #1e4228;
}

.sidebar ul a.activo-cat {
    background-color: #1e4228;
    color: #fff;
}

.contenido {
    flex: 1;
    background-color: #eef5ee;
    border-radius: 14px;
    padding: 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.noticias {
    background-color: #eef5ee;
    padding: 60px 12%;
    border-top: 2px solid #cfe0cf;
}

.noticias h2 {
    border-left: 7px solid #3d8a4f;
    padding-left: 18px;
    font-size: 2rem;
}

.contenedor-noticias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.noticia {
    background-color: #d7e4d2;
    border: 2px solid #1e4228;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.noticia:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
}

.noticia h3 {
    color: #1e4228;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.noticia a {
    text-decoration: none;
    color: #1e4228;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.3s;
}

.noticia a:hover {
    color: #3d8a4f;
}

.noticia p {
    color: #2b4630;
    font-size: 1rem;
    line-height: 1.55;
}

.footer {
    background-color: #1e4228;
    color: white;
    padding: 40px 20px 10px;
    margin-top: 50px;
}

.footer-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: auto;
}

.footer h3,
.footer h4 {
    margin-bottom: 10px;
}

.footer a {
    color: #b9e0c5;
    text-decoration: none;
    font-size: 15px;
}

.footer a:hover {
    text-decoration: underline;
}

.redes-sociales {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.icono {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #ffffff44;
    padding-top: 10px;
    font-size: 14px;
}

.btn-aceptar {
    background: #2e7d32;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-aceptar:hover {
    background: #27642a;
}

.btn-rechazar {
    background: #c62828;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-rechazar:hover {
    background: #8e1c1c;
}

.btn-entregado {
    background: #1565c0;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-entregado:hover {
    background: #0d4c89;
}

.btn-detalles {
    background: #455a64;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-detalles:hover {
    background: #37474f;
}

.estado.aprobado {
    background: #2e7d32;
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.estado.rechazado {
    background: #c62828;
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.estado.pendiente {
    background: #fbc02d;
    color: #333;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.tabla-contenedor {
    width: 100%;
    overflow-x: auto;
    margin-top: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #cfe0cf;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.tabla thead th {
    background-color: #1e4228;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 3px solid #3d8a4f;
}

.tabla tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
}

.tabla tbody tr:nth-child(even) {
    background-color: #f7f7f7;
}

.tabla tbody tr:hover {
    background-color: #e6f2ea;
}

.tabla tbody td {
    padding: 12px 15px;
    color: #333;
    font-size: 0.95rem;
}


.perfil-btn {
    position: absolute;
    top: 20px;
    right: 30px;
}

.perfil-btn button {
    background-color: #3d8a4f;
    color: white;
    padding: 10px 14px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
    transition: 0.25s ease;
}

.perfil-btn button:hover {
    background-color: #1e4228;
    transform: translateY(-3px) scale(1.05);
}

.menu-perfil {
    position: absolute;
    right: 30px;
    top: 75px;
    background-color: #ffffff;
    border-radius: 12px;
    width: 210px;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.22);
    border: 1.5px solid #1e4228;
    display: none;
    animation: fadeIn 0.25s ease;
    z-index: 200;
}

.menu-perfil a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #1e4228;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.25s ease;
}

.menu-perfil a:hover {
    background-color: #d7e4d2;
    color: #2e5f38;
    padding-left: 25px;
}

.menu-perfil .logout {
    color: #b71c1c;
    font-weight: 700;
}

.menu-perfil .logout:hover {
    background-color: #f5d0d0;
    color: #8b0000;
}

.menu-perfil.activo {
    display: block;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 8px 18px;
    border-radius: 8px;
    transition: 0.3s ease;
    background-color: transparent;
    cursor: pointer;
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; 
    left: 0;
    background-color: #ffffff; 
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    overflow: hidden;
    z-index: 200; 
}

.dropdown-content a {
    color: #000; 
    padding: 12px 16px;
    text-decoration: none;
    display: block; 
    background-color: #ffffff;
    border-bottom: 1px solid #eee; 
}

.dropdown-content a:hover {
    background-color: #ddd; 
}


.dropdown:hover .dropdown-content {
    display: block; 
}

.dropdown:hover .dropbtn {
    background-color: rgba(255, 255, 255, 0.1);
}


@media (max-width: 992px) {
    section, .noticias {
        padding: 40px 5%;
    }
    
    .contenedor-principal {
        padding: 40px 5% 50px;
        flex-direction: column;
        gap: 30px;
    }

    nav {
        gap: 15px;
        padding: 12px 5%;
        overflow-x: auto;
        justify-content: flex-start;
    }
    nav a {
        padding: 6px 12px;
        font-size: 1rem;
    }
    
    .sidebar {
        flex: 1 1 100%;
        position: static;
    }

    .tabla-equipos {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .footer-contenido {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .login-btn, .perfil-btn {
        right: 15px;
    }
}

@media (max-width: 576px) {
    header {
        padding: 20px 10px;
    }
    header h1 {
        font-size: 1.8rem;
    }
    header p {
        font-size: 1rem;
    }
    
    .login-btn, .perfil-btn {
        position: static;
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .contenedor-principal {
        padding: 20px 20px 30px;
    }

    .contenido {
        padding: 20px;
    }
    h2 {
        font-size: 1.5rem;
        padding-left: 10px;
    }
    
    .tabla-equipos {
        grid-template-columns: 1fr;
    }

    form {
        padding: 25px;
    }
    
    .footer-contenido {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .redes-sociales {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
    .footer-col {
        padding-bottom: 15px;
        border-bottom: 1px solid #ffffff22;
    }
    .footer-col:last-child {
        border-bottom: none;
    }
}