:root {
    --bg-body: #f4f7f6;
    --primary: #0589f5;
    --accent: #0429fc;
    --text-main: #2d3436;
    --white: #ffffff;
    --error: #f51515;
    --success: #55efc4;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    background-color: var(--bg-body);
    font-family: 'Quicksand', sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- HEADER REESTILIZADO --- */
.header {
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    height: 80px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 50px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.menu ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.link {
    color: var(--primary);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px; /* Bordes redondeados modernos */
    transition: all 0.3s ease;
}

.link:hover {
    background: rgba(0, 67, 141, 0.1);
    color: var(--primary);
}

/* --- CONTENEDORES PRINCIPALES --- */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

h1, h2 {
    color: var(--primary);
    text-align: left;
    margin-top: 0;
    font-size: 1.8rem;
    border-left: 5px solid var(--accent);
    padding-left: 15px;
}

/* --- TABLA ESTILO DASHBOARD --- */
.tablita {
    overflow-x: auto;
}

.tabla {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* Espaciado entre filas */
}

.tabla th {
    background: transparent;
    color: #b2bec3;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 15px;
    border: none;
}

.tabla td {
    background: var(--white);
    padding: 15px;
    border-top: 1px solid #f1f2f6;
    border-bottom: 1px solid #f1f2f6;
}

.tabla tr td:first-child { border-left: 1px solid #f1f2f6; border-radius: 10px 0 0 10px; }
.tabla tr td:last-child { border-right: 1px solid #f1f2f6; border-radius: 0 10px 10px 0; }

.tabla tr:hover td {
    background: #f8fbff;
    border-color: var(--accent);
}

/* --- BOTONES ACCIÓN --- */
.submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 67, 141, 0.2);
}

.submit:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
}

/* Botón borrar específico */
button[onClick*="Borrar"], button[onClick*="borrar"] {
    background: #fab1a0;
    color: #d63031;
    box-shadow: none;
}

button[onClick*="Borrar"]:hover {
    background: #ff7675;
    color: white;
}

/* --- FORMULARIO GRID MODERNO --- */
.caja {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    border: none;
    padding: 0;
}

legend {
    display: none; /* Quitamos el legend antiguo */
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #636e72;
}

input {
    border: 2px solid #f1f2f6;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    background: #f0faff;
}

/* --- FOOTER --- */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 50px 0;
    text-align: center;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social {
    width: 35px;
    height: 35px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
    /* Esto quita cualquier borde azul de los links */
    text-decoration: none; 
}

.social:hover {
    transform: scale(1.2) rotate(5deg);
    filter: brightness(1.2);
}

/* Rutas a tus archivos reales */
.footer-fb { 
    background-image: url('../imagenes/fb.ico'); 
}
.footer-twitter { 
    background-image: url('../imagenes/twitter.ico'); 
}
.footer-instagram { 
    background-image: url('../imagenes/instagram.ico'); 
}
.footer-linkedin { 
    background-image: url('../imagenes/linkedin.ico'); 
}