.task-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.add-task-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-save {
    background-color: var(--secondary-color);

    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    background: none;
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: var(--primary-color);
    cursor: pointer;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.tasks-container {
    display: grid;
    gap: 1rem;
}

.task-item {
    background: var(--card-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.task-info {
    flex: 1;
}

.task-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.task-details {
    color: var(--text-light);
    font-size: 0.9rem;
}

.task-amount {
    font-weight: bold;
    color: var(--primary-color);
}

.task-actions {
    display: flex;
    gap: 1rem;
}

.task-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.task-btn:hover {
    background-color: var(--background-gray);
}

.btn-complete {
    color: #27ae60;
}

.btn-edit {
    color: #2980b9;
}

.btn-delete {
    color: #c0392b;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    margin: 2rem auto;
    position: relative;
    box-shadow: var(--shadow);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(21, 10, 68, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.completed {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.completed .task-title {
    text-decoration: line-through;
}

.task-details.clients {
    gap: 0.2rem;
    margin-top: 0.5rem;
}

.task-details-content {
    display: flex;
    margin-bottom: .5rem;
    gap: 1rem;
}

.client-details {
    display: flex;
    margin-bottom: .5rem;
    gap: 1rem;
}

.priority-badge {
    color: red;
}

/* Service status styles */
.service-date {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.service-date.expired {
    background-color: #fee2e2;
    color: #dc2626;
}

.service-date.expiring {
    background-color: #fef3c7;
    color: #d97706;
}

.service-date.active {
    background-color: #dcfce7;
    color: #16a34a;
}

.task-details-content span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar styles for mobile */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        background: var(--card-white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    margin: 5px auto;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Overlay for mobile menu */
.sidebar.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Improve sidebar navigation items on mobile */
@media (max-width: 1024px) {
    .sidebar-nav {
        padding: 1rem 0;
    }

    .nav-item {
        padding: 1rem 1.5rem;
        margin: 0.25rem 1rem;
    }

    .nav-text {
        font-size: 1rem;
    }
}

/* Payment cycle badge */
.service-cycle {
    text-transform: capitalize;
    font-weight: 500;
}

.task-content {
    display: flex;
    margin-bottom: .5rem;
    gap: .5rem;

}

.amount-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 10px;
    color: var(--text-dark);
    font-weight: 500;
}

.amount-input-group input {
    padding-left: 50px !important;
}

/* Estilos responsive */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .task-details-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .task-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .filter-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .task-item {
        flex-direction: column;
        gap: 1rem;
    }

    .task-actions {
        width: 100%;
        justify-content: space-around;
        padding-top: 1rem;
        border-top: 1px solid var(--background-gray);
    }

    .task-info {
        text-align: center;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 1rem;
    }

    .page-header {
        text-align: center;
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        top: 0.5rem;
        left: 0.5rem;
    }

    .task-details-content span {
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions button {
        width: 100%;
    }

    .task-btn {
        width: 32px;
        height: 32px;
    }

    .filter-btn {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .task-title {
        font-size: 1rem;
    }

    .task-details {
        font-size: 0.85rem;
    }
}

/* Add overlay for mobile menu */
@media (max-width: 1024px) {
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Mejorar la visibilidad del estado completado */
.task-btn.btn-complete {
    background-color: #f0f0f0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completed .task-btn.btn-complete {
    background-color: #27ae60;
    color: white;
}

/* Agregar tooltips para mejor UX */
.task-btn {
    position: relative;
}

.task-btn:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-dark);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1;
}