/* Configuración General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
}

header h1 {
    text-align: center;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
}

/* Contenedor Principal */
main {
    max-width: 1000px;
    margin: 0 auto;
}

/* Fieldset y Formulario */
fieldset {
    border: 2px solid #2c3e50;
    border-radius: 8px;
    background-color: #fff;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

legend {
    font-weight: bold;
    padding: 0 10px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.instrucciones {
    font-style: italic;
    color: #7f8c8d;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #ecf0f1;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Tabla de resultados */
.tabla-datos {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tabla-datos tr:hover {
    background-color: #f9f9f9;
}

/* Inputs y Textarea */
input[type="text"], select, textarea {
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 90%;
}

textarea {
    height: 80px;
    resize: vertical;
}

.sugerencias-container {
    margin-top: 20px;
}

/* Botones */
.botones-container {
    margin-top: 20px;
    text-align: right;
}

input[type="submit"], input[type="reset"] {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-grabar {
    background-color: #27ae60;
    color: white;
}

.btn-grabar:hover {
    background-color: #2ecc71;
}

.btn-borrar {
    background-color: #e74c3c;
    color: white;
    margin-left: 10px;
}

/* Enlaces de Acción */
.link-edit { color: #2980b9; text-decoration: none; font-weight: bold; }
.link-delete { color: #c0392b; text-decoration: none; font-weight: bold; }
.link-edit:hover, .link-delete:hover { text-decoration: underline; }