body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    width: 50%;
    margin: 50px auto;
    background: #fff;
    padding: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.auth-container {
    width: 40%;
    max-width: 400px;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

h1 {
    text-align: left;
    font-size: 28px;
    margin-bottom: 20px;
    margin-top: 0;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    width: 100%;
}

.btn-settings {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-settings:hover {
    background-color: #0056b3;
}

.btn-logout {
    padding: 10px 20px;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.btn-logout:hover {
    background-color: #c82333;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.auth-form input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.auth-form button {
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.auth-form button:hover {
    background-color: #218838;
}

.auth-container p {
    text-align: center;
    margin-top: 15px;
}

.auth-container a {
    color: #28a745;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

.nav-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.tab-link {
    padding: 15px 25px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 15px;
}

.tab-link:hover {
    color: #333;
}

.tab-link.active {
    color: #28a745;
    border-bottom-color: #28a745;
}

.form-gastos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.form-gastos input {
    flex: 1;
    min-width: 150px;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

.form-gastos button {
    padding: 12px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.form-gastos button:hover {
    background-color: #218838;
}

.form-ahorros {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.form-ahorros input,
.form-ahorros select {
    flex: 1;
    min-width: 150px;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

.form-ahorros button {
    padding: 12px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.form-ahorros button:hover {
    background-color: #218838;
}

.ahorros-list {
    margin-top: 40px;
}

.mes-ahorros {
    margin-bottom: 50px;
}

.mes-header-ahorro {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #1976d2;
    font-size: 20px;
    margin-bottom: 30px;
}

.semana-table {
    background-color: #f5f5f5;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.semana-table h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.ahorros-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
}

.ahorros-table thead {
    background-color: #28a745;
    color: white;
}

.ahorros-table th,
.ahorros-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
}

.ahorros-table tbody tr:hover {
    background-color: #f9f9f9;
}

.ahorros-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ahorros-table td:last-child {
    justify-content: flex-end;
    gap: 8px;
}

.mes-total-ahorro {
    background-color: #f3e5f5;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #7b1fa2;
    margin-top: 40px;
}

.mes-total-ahorro h3 {
    margin: 0;
    color: #7b1fa2;
    font-size: 18px;
}

.form-ayudas {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.form-ayudas input {
    flex: 1;
    min-width: 120px;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

.form-ayudas button {
    padding: 12px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.form-ayudas button:hover {
    background-color: #218838;
}

.ayudas-list {
    margin-top: 40px;
}

.año-ayudas {
    margin-bottom: 50px;
}

.año-header-ayuda {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #4caf50;
    font-size: 20px;
    margin-bottom: 30px;
}

.ayudas-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.ayudas-table thead {
    background-color: #4caf50;
    color: white;
}

.ayudas-table th,
.ayudas-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 15px;
}

.ayudas-table tbody tr:hover {
    background-color: #f9f9f9;
}

.año-total-ayuda {
    background-color: #e0f2f1;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #009688;
    margin-top: 40px;
}

.año-total-ayuda h3 {
    margin: 0;
    color: #00695c;
    font-size: 18px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}

form {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

form input {
    flex: 1;
    padding: 12px 15px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

form button {
    padding: 12px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

form button:hover {
    background-color: #218838;
}

.warning-box {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
}

.warning-box h2 {
    color: #ff6b6b;
    font-size: 28px;
    margin-bottom: 15px;
}

.warning-message {
    color: #856404;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.5;
}

.success-box {
    background-color: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
}

.success-box h2 {
    color: #155724;
    font-size: 28px;
    margin-bottom: 15px;
}

.success-message {
    color: #155724;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.5;
}

.total-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
}

.surprised-box {
    background-color: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 600px;
    margin: 50px auto;
}

.surprised-box h2 {
    color: #155724;
    font-size: 30px;
    margin-bottom: 10px;
}

.surprised-message {
    color: #155724;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.btn-continue {
    display: inline-block;
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.btn-continue:hover {
    background-color: #218838;
}

ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

ul li {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    gap: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mes-header {
    background-color: #e3f2fd;
    font-size: 18px;
    font-weight: bold;
    padding: 20px;
    border-bottom: 3px solid #1976d2;
    border-left: 5px solid #1976d2;
    margin-top: 30px;
    margin-bottom: 20px;
}

.mes-header:first-child {
    margin-top: 0;
}

.mes-total {
    background-color: #f3e5f5;
    font-size: 16px;
    font-weight: bold;
    padding: 20px;
    border-left: 5px solid #7b1fa2;
    margin-bottom: 30px;
    margin-top: 40px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.task-buttons {
    display: flex;
    gap: 10px;
}

.task-buttons form {
    margin: 0;
    display: inline;
}

.task-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
}

.btn-edit {
    background-color: #007bff;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    margin-right: 15px;
}

.btn-edit:hover {
    background-color: #0056b3;
}

.btn-delete {
    background-color: #dc3545;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Colores para categorías de gastos */
.gasto-luz {
    color: #FFD700;
    font-weight: bold;
}

.gasto-agua {
    color: #0088FF;
    font-weight: bold;
}

.gasto-gas {
    color: #8B4513;
    font-weight: bold;
}

.gasto-internet {
    color: #003366;
    font-weight: bold;
}

.gasto-otro {
    color: #FF4444;

    .gasto-compra {
        color: #28a745;
        font-weight: bold;
    }
    font-weight: bold;
}

.cantidad-gasto {
    color: #FF4444;
    font-weight: bold;
}

.cantidad-ahorro {
    color: #28a745;
    font-weight: bold;
}

.ahorro-nombre {
    color: #28a745;
    font-weight: bold;
}

/* Cantidades que son entradas a favor (ayudas) */
.cantidad-entrada {
    color: #28a745;
    font-weight: bold;
}

.ayudas-table td:last-child {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
}
