/* =================================================================
// ARCHIVO: style.css
// OBJETIVO: Prolijidad y atractivo visual (UI/UX básico).
// ================================================================= */

:root {
    --color-primary: #007bff; /* Azul profesional */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-bg-light: #f4f4f9;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg-light);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 700px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

h1 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 10px;
}

h2 {
    color: #555;
    margin-top: 35px;
    font-size: 1.5em;
}

/* --- Formulario de Agregar Tarea --- */
.add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.add-form input[type="text"] {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
}

.add-form button {
    background-color: var(--color-success);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.add-form button:hover {
    background-color: #1e7e34;
}

/* --- Tabla de Tareas y Listado --- */
.task-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.task-table tr:nth-child(even) {
    background-color: #f9f9fc;
}

.task-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.task-table td:first-child {
    width: 65%;
}

.task-table .date {
    font-size: 0.85em;
    color: #888;
    text-align: right;
    width: 20%;
}

.task-table .actions {
    text-align: right;
    width: 15%;
}

.delete-btn {
    color: white;
    background-color: var(--color-danger);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

.delete-btn:hover {
    background-color: #bd2130;
}

.no-tasks {
    text-align: center;
    padding: 25px;
    background-color: #e2f0ff;
    border: 1px solid #cce5ff;
    border-radius: 6px;
    color: #004085;
    font-weight: bold;
}

.tech-note {
    text-align: right;
    margin-top: 40px;
    font-size: 0.75em;
    color: #aaa;
}

/* --- Mensajes de Estado --- */
.success, .error {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}