* {
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    margin: 0;
    background: linear-gradient(135deg, #111, #1b1b1b);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.card {
    width: 100%;
    max-width: 800px;
    background: #1f1f1f;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    margin: 0 auto;
}

h1 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #00c896;
    text-align: center;
}

h2 {
    color: #00c896;
    margin-top: 30px;
    margin-bottom: 20px;
    border-bottom: 2px solid #00c896;
    padding-bottom: 10px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #252525;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 600;
    color: #ddd;
}

input,
textarea,
button {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #333;
    background: #2a2a2a;
    color: #fff;
    font-size: 15px;
    font-family: 'Segoe UI', sans-serif;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #00c896;
    box-shadow: 0 0 0 2px rgba(0, 200, 150, 0.2);
}

button {
    margin-top: 10px;
    background: linear-gradient(45deg, #00c896, #00e0a8, #00c896);
    background-size: 200%;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.4s;
    border: none;
}

button:hover {
    background-position: right;
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(0, 200, 150, 0.4);
}

button#btnCancelar {
    background: linear-gradient(45deg, #ff6b6b, #ff8787, #ff6b6b);
    background-size: 200%;
}

button#btnCancelar:hover {
    background-position: right;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.4);
}

.categorias-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.categoria-item {
    background: #252525;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #00c896;
    transition: 0.3s;
}

.categoria-item:hover {
    background: #2a2a2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 200, 150, 0.2);
}

.categoria-item h3 {
    margin: 0 0 10px 0;
    color: #00c896;
}

.categoria-item p {
    margin: 0 0 15px 0;
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
}

.categoria-acciones {
    display: flex;
    gap: 10px;
}

.btn-editar,
.btn-eliminar {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.btn-editar {
    background: #3d6bff;
    color: white;
}

.btn-editar:hover {
    background: #4d7bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(61, 107, 255, 0.3);
}

.btn-eliminar {
    background: #ff4757;
    color: white;
}

.btn-eliminar:hover {
    background: #ff5767;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.volver {
    display: inline-block;
    margin-top: 20px;
    color: #00c896;
    text-decoration: none;
    font-weight: 600;
}

.volver:hover {
    text-decoration: underline;
}

.mensaje-vacio {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-size: 16px;
}

.seccion-categorias {
    margin-top: 30px;
}

@media (max-width: 600px) {
    .categorias-list {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    form {
        padding: 15px;
    }

    .categoria-acciones {
        flex-direction: column;
    }
}
