/* ===== RESET ===== */
* {
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
}

/* ===== BODY ===== */
body {
    background: linear-gradient(135deg, #cbb0ff, #e5ccff, #f3e5ff);
    padding: 40px 15px;
}

/* ===== CONTENEDOR ===== */
.container {
    background: #fff;
    max-width: 1000px;
    margin: auto;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 6px 25px rgba(120, 73, 170, 0.25);
}

/* ===== TÍTULO ===== */
h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #5a31b8;
    font-weight: 600;
}

/* ===== FORMULARIO ===== */
.formulario {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.formulario input,
.formulario textarea,
.formulario select {
    padding: 12px;
    border: 1px solid #cbb0ff;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: #faf7ff;
}

.formulario input:focus,
.formulario textarea:focus,
.formulario select:focus {
    border-color: #8a63ff;
    box-shadow: 0 0 6px rgba(138, 99, 255, 0.3);
    background: #ffffff;
}

/* ===== FILA ===== */
.fila {
    display: flex;
    gap: 10px;
}

/* ===== BOTÓN CREAR ===== */
button[name="crear"] {
    background: linear-gradient(135deg, #8a63ff, #b28dff);
    border: none;
    color: white;
    padding: 12px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button[name="crear"]:hover {
    background: linear-gradient(135deg, #7048d6, #9b70ff);
    transform: scale(1.02);
}

/* ===== TABLA ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
}

thead {
    background: #8a63ff;
    color: white;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5d6ff;
}

tbody tr:nth-child(even) {
    background: #f5efff;
}

tbody tr:hover {
    background: #ece2ff;
    transition: 0.2s ease;
}

/* ===== BOTONES TABLA ===== */
.btn {
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: 0.3s ease;
}

.editar {
    background: #7c4dff;
}

.editar:hover {
    background: #6939d4;
}

.eliminar {
    background: #c62828;
}

.eliminar:hover {
    background: #a32020;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
    .fila {
        flex-direction: column;
    }

    table,
    thead,
    tbody,
    tr,
    td,
    th {
        display: block;
    }

    td {
        padding: 10px;
    }
}
