@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --primary: #38bdf8;
    --text: #f8fafc;
    --danger: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background: var(--bg); color: var(--text); padding-bottom: 50px; min-height: 100vh; }

/* Navbar */
.navbar { padding: 1.5rem 5%; display: flex; justify-content: space-between; align-items: center; background: rgba(15, 23, 42, 0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #334155; }
.navbar h1 { color: var(--primary); font-size: 1.5rem; font-weight: 700; }

.container { max-width: 1000px; margin: 2rem auto; padding: 0 20px; }

/* Stats Grid */
.stats-section { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 2rem; }
.card { background: var(--surface); padding: 20px; border-radius: 12px; text-align: center; border: 1px solid #334155; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.card h2 { color: var(--primary); font-size: 1.5rem; }

/* Form */
.task-form { background: var(--surface); padding: 25px; border-radius: 12px; margin-bottom: 2rem; border: 1px solid #334155; }
.task-form input, .task-form textarea, .task-form select { 
    width: 100%; margin: 10px 0; padding: 12px; background: #0f172a; border: 1px solid #475569; border-radius: 8px; color: white; 
}

/* Tasks */
.tasks-section { background: var(--surface); padding: 25px; border-radius: 12px; border: 1px solid #334155; }
.task-card { background: #0f172a; padding: 15px; margin-bottom: 10px; border-radius: 8px; border-left: 4px solid var(--primary); display: flex; justify-content: space-between; align-items: center; }

/* Buttons */
button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s;
}
button:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4); }
.delete-btn { background: var(--danger); margin-left: 10px; }
.delete-btn:hover { background: #dc2626; box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4); }

/* Analytics */
.analytics-section { background: var(--surface); padding: 25px; border-radius: 12px; border: 1px solid #334155; margin-top: 2rem; text-align: center; }
#taskChart { max-width: 300px; margin: 1rem auto; display: block; }

/* Professional Task Card Polish */
.task-card {
    background: #1e293b;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border-left: 5px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.task-card:hover {
    transform: scale(1.01);
    background: #273548;
}

/* Button Container - Buttons ko dur-dur rakho */
.btn-group {
    display: flex;
    gap: 12px;
}

/* Responsive Search & Filter */
.filter-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

/* Calendar/Date Input Styling */
input[type="datetime-local"] {
    background: #1a202c !important; /* Dark background */
    color: #ffffff !important;      /* White text */
    border: 1px solid #4a5568;      /* Visible border */
    padding: 10px;
    border-radius: 8px;
    width: 100%;
}

/* Calendar icon aur dropdown ko visible banane ke liye */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Icon ko white karega taaki dark background pe dikhe */
    cursor: pointer;
}

/* Finalized Flatpickr Dark Mode UI Fix */
.flatpickr-calendar {
    background: #1e293b !important;
    border: 1px solid #475569 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5) !important;
}

/* Month and Year dropdown styling */
.flatpickr-monthDropdown-month, 
.flatpickr-current-month .numInputWrapper {
    display: inline-block !important;
    width: 48% !important; /* Dono ko barabar jagah */
    background: #1e293b !important;
    color: #ffffff !important;
    font-size: 14px !important;
    padding: 2px !important;
}

/* Dropdown list items */
.flatpickr-monthDropdown-month option {
    background: #1e293b !important;
    color: #ffffff !important;
}

/* Day and Week styling */
.flatpickr-day, 
.flatpickr-weekday, 
.flatpickr-current-month, 
.numInput {
    color: #ffffff !important;
}

.flatpickr-day:hover {
    background: #38bdf8 !important;
}

.flatpickr-day.selected {
    background: #38bdf8 !important;
    color: white !important;
}

/* Time picker styling */
.flatpickr-time {
    color: #ffffff !important;
    background: #1e293b !important;
}

.flatpickr-time input, 
.flatpickr-time .flatpickr-am-pm {
    color: #ffffff !important;
    background: transparent !important;
}