:root {
    --primary: #4facfe; --dark: #1e293b; --high: #ff4757;
    --secondary: #ff0000;
    --med: #ffa502; --low: #2ed573; --bg: #f8fafc;
    --water: rgba(79, 172, 254, 0.15);
}

body { margin: 0; font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--dark); overflow-x: hidden; }

/* --- Sidebar System --- */
.sidebar { 
    width: 260px; background: var(--dark); color: white; padding: 25px; 
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay { 
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; 
    backdrop-filter: blur(2px);
}

/* Mobile Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,0.2); }
    .sidebar-overlay.active { display: block; }
    .content { padding: 15px !important; }
}

@media (min-width: 769px) {
    .content { margin-left: 260px; transition: margin 0.3s; }
    .sidebar.hidden { transform: translateX(-100%); }
    .sidebar.hidden ~ .content { margin-left: 0; }
}

/* --- Sidebar Content --- */
.logo { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 40px; }
nav a, .menu-btn { display: block; width: 100%; padding: 12px; color: #94a3b8; text-decoration: none; border-radius: 10px; margin-bottom: 10px; border: none; background: none; text-align: left; cursor: pointer; font-size: 16px; transition: 0.2s; }
nav a.active { background: #334155; color: white; }
.add-btn { background: var(--primary) !important; color: white !important; text-align: center; font-weight: bold; }
.add-btn1 { background: var(--secondary) !important; color: white !important; text-align: center; font-weight: bold; }
.logout-link { position: absolute; bottom: 30px; color: #64748b; text-decoration: none; }

/* --- Header & Layout --- */
.content { padding: 40px; min-height: 100vh; }
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.header-left { display: flex; align-items: center; gap: 15px; }
.toggle-btn { background: white; border: 1px solid #e2e8f0; padding: 10px 15px; border-radius: 8px; cursor: pointer; font-size: 18px; }
.filter-group { display: flex; gap: 8px; }
.filter-btn { background: var(--dark); color: white; border: none; padding: 8px 15px; border-radius: 6px; }

/* --- Task List & Water Animation --- */
.todo-list { display: flex; flex-direction: column; gap: 15px; max-width: 850px; }
.task-item { 
    position: relative; background: white; border-radius: 15px; overflow: hidden; 
    border-left: 6px solid #ddd; cursor: pointer; transition: 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.task-item:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }

.water-bg {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: var(--water); transition: height 1s ease-in-out;
    z-index: 1; border-top: 1px solid rgba(79, 172, 254, 0.3);
}

.wave {
    position: absolute; top: -18px; left: 0; width: 200%; height: 20px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="%234facfe22"></path></svg>');
    background-size: 50% 100%;
    animation: wave-move 4s linear infinite;
}

@keyframes wave-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.task-content { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; }
.task-info h3 { margin: 0 0 5px 0; font-size: 17px; }
.prio-tag { font-size: 10px; font-weight: bold; padding: 4px 10px; border-radius: 20px; background: #f1f5f9; }

.task-item.high { border-left-color: var(--high); }
.task-item.medium { border-left-color: var(--med); }
.task-item.low { border-left-color: var(--low); }

/* --- Modals & Buttons --- */
.modal { display: none; position: fixed; inset: 0; background: rgba(30, 41, 59, 0.7); z-index: 2000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-content { background: white; padding: 30px; border-radius: 20px; width: 100%; max-width: 480px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 25px; }
.edit-btn { background: #3b82f6; color: white; border: none; padding: 10px 20px; border-radius: 8px; }
.del-btn { background: #ef4444; color: white; border: none; padding: 10px 20px; border-radius: 8px; }
.save-btn { background: #10b981; color: white; border: none; padding: 10px 20px; border-radius: 8px; }
.cancel-btn { background: #f1f5f9; color: #64748b; border: none; padding: 10px 20px; border-radius: 8px; }

input, textarea, select { width: 100%; margin-bottom: 15px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; font-family: inherit; }
.input-row { display: flex; gap: 10px; }


.pagination-ctrl {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.pag-btn {
    padding: 6px 15px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
    border: 1px solid #e2e8f0;
}

.pag-btn:hover:not(.disabled) {
    background: var(--dark);
    color: white;
}

.pag-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}


/* Add these to your style.css if not already there */
.task-item.income-item {
    border-left-color: var(--low) !important;
}

/* Ensure green buttons for income feel distinct */
.save-btn-income {
    background: var(--low);
    color: white;
}


