/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* FONDO GENERAL */
body {
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* CONTENEDOR */
.contenedor {
    max-width: 1100px;
    margin: 80px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,.08);
    animation: fadeIn .6s ease-in-out;
}

/* ANIMACIÓN SUAVE */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px);}
    to { opacity: 1; transform: translateY(0);}
}

/* TITULOS */
h1, h2 {
    text-align: center;
    margin-bottom: 25px;
    font-weight: 600;
}


/*MENÚ*/
.menu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px; /* zona sensible */
    z-index: 1000;
}

.menu {
    position: absolute;
    top: -70px; /* oculto */
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
    padding: 15px 0;
    transition: top 0.4s ease-in-out;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Cuando el mouse toca arriba */
.menu-wrapper:hover .menu {
    top: 0;
}

.menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 35px;
}

.menu a {
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Hover dinámico */
.menu a:hover {
    background: #00c6ff;
    color: #000;
    transform: translateY(-3px);
}



/* ========================= */
/* DASHBOARD TARJETAS */
/* ========================= */

.dashboard {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
}

.card {
    width: 220px;
    text-align: center;
    padding: 25px;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card img {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
}

.card a {
    display: inline-block;
    margin-top: 10px;
    background: #2563eb;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card a:hover {
    background: #1e40af;
    transform: scale(1.05);
}

/* ===================== */
/* BOTONES MODERNOS */
/* ===================== */

button {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all .3s ease;
    font-weight: 500;
}

button:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

button.eliminar {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

button.eliminar:hover {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
}

/* ===================== */
/* TABLAS MODERNAS */
/* ===================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

th {
    background: #1e3a8a;
    color: white;
    padding: 12px;
}

td {
    padding: 10px;
    background: #f8fafc;
    transition: 0.2s;
}

tr:nth-child(even) td {
    background: #e2e8f0;
}

tr:hover td {
    background: #cbd5e1;
}

/* ===================== */
/* FORMULARIOS */
/* ===================== */

form label {
    font-weight: 500;
    margin-top: 12px;
    display: block;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #ccc;
    transition: .3s;
}

input:focus, select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 10px rgba(37,99,235,.3);
    outline: none;
}

/* LINKS COMO BOTÓN */
.link-boton {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #15803d);
    padding: 8px 15px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: .3s;
}

.link-boton:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #15803d, #14532d);
}

/* MENSAJES */
.msg-ok {
    color: #16a34a;
    text-align: center;
}

.msg-error {
    color: #dc2626;
    text-align: center;
}
