:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.5);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --success: #22c55e;

    --font-family: 'Outfit', sans-serif;
    --transition-speed: 0.3s;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Animation */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #ec4899;
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 50px) scale(1.1);
    }
}

/* Layout & Sidebar */
/* Layout & Sidebar */
.app-layout {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar {
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    border-radius: 0;
    border-right: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    /* Ensure readability */
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.brand h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.sidebar-bottom {
    margin-top: auto;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    /* Independent scrolling */
    padding: 2rem;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Scrollbar adjustment for main content */
.main-content::-webkit-scrollbar {
    width: 6px;
}

/* Profile styles update */
.profile-section {
    position: relative;
    width: 100%;
}

.profile-btn {
    width: 100%;
    height: auto;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-info {
    font-size: 0.95rem;
    font-weight: 500;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-dropdown {
    width: 100%;
    position: absolute;
    bottom: calc(100% + 10px);
    /* Pop UP with spacing */
    left: 0;
    right: 0;
    background: #1e293b;
    /* Fallback */
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.profile-dropdown.show {
    display: flex;
    animation: slideUpFade 0.2s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Drag and Drop Styles */


/* Mobile Responsive adjustment for new layout */
/* Filter Styles */
.filter-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.filter-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.filter-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
        border-radius: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: column;
        /* Stack details */
        align-items: stretch;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .sidebar-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .date-display {
        margin-bottom: 0;
    }

    .view-toggle {
        justify-content: center;
    }

    .sidebar-filters {
        display: none;
        /* Hide filters by default on mobile or create toggle */
        /* For now, let's just make them stack and visible but scrollable */
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .sidebar-filters .filter-input {
        min-width: 150px;
    }

    .sidebar-bottom {
        display: none;
        /* Hide profile bottom on mobile to save space, maybe add to top? */
        /* Or keep it simple */
    }

    .main-content {
        padding: 1rem;
        overflow-y: visible;
        height: auto;
    }

    .input-section {
        padding: 1rem;
    }

    #addTaskBtn {
        position: static;
        width: 100%;
        height: 48px;
        margin-top: 10px;
        border-radius: 8px;
    }

    .description-input {
        padding-right: 10px;
    }

    /* Ensure modal positioning resets for smaller screens */
    .modal-sidebar-position {
        transform: translate(-50%, -50%) !important;
        top: 50% !important;
        left: 50% !important;
    }
}

/* Glass Panel Utils */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Input Section */
.input-section {
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 2.5rem;
}

.input-section:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px var(--accent-glow);
    border-color: rgba(139, 92, 246, 0.3);
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
}

.input-row {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

/* Input Wrapper for Warnings */
.flex-col-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    /* Fix flex overflow */
}

.limit-warning {
    color: #ef4444;
    /* Tailwind red-500 */
    font-size: 0.75rem;
    margin-top: 4px;
    margin-left: 4px;
    display: none;
    animation: fadeIn 0.2s;
}

#taskInput {
    width: 100%;
    /* Changed from flex: 1 */
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-family);
    outline: none;
}

#taskInput::placeholder {
    color: var(--text-secondary);
}

#addTaskBtn {
    background: var(--accent-color);
    border: none;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    /* Circle shape works well for corner button */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: absolute;
    bottom: 1.2rem;
    right: 1.2rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    z-index: 5;
}

#addTaskBtn:hover {
    background: #7c3aed;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

#addTaskBtn:active {
    transform: scale(0.95);
}

.description-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    outline: none;
    padding: 5px;
    padding-right: 60px;
    /* Space for floating button */
    resize: none;
    height: 5rem;
    /* Approx 3-4 lines */
    overflow-y: auto;
}

.description-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

#taskDueDate,
#taskTime,
#editTaskDate,
#editTaskTime {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    font-family: var(--font-family);
    color-scheme: dark;
    cursor: pointer;
    transition: all 0.2s;
}

#taskDueDate:hover,
#taskDueDate:focus,
#taskTime:hover,
#taskTime:focus,
#editTaskDate:hover,
#editTaskDate:focus,
#editTaskTime:hover,
#editTaskTime:focus {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

#taskDueDate::-webkit-calendar-picker-indicator,
#taskTime::-webkit-calendar-picker-indicator,
#editTaskDate::-webkit-calendar-picker-indicator,
#editTaskTime::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s;
}

#taskDueDate::-webkit-calendar-picker-indicator:hover,
#taskTime::-webkit-calendar-picker-indicator:hover,
#editTaskDate::-webkit-calendar-picker-indicator:hover,
#editTaskTime::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Modals */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--accent-color);
}

.btn-save {
    padding: 8px 15px;
    background: var(--accent-color);
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-cancel {
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
}

.btn-save:hover {
    background: #7c3aed;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* List Section */
.list-section {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.list-section::-webkit-scrollbar {
    width: 6px;
}

.list-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.list-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
    flex-shrink: 0;
}

.list-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.task-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

/* Task Item */
.task-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.3s ease-out forwards;
    flex-direction: row;
    border-left: 0;
    position: relative;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-item.completed {
    opacity: 0.6;
}

.task-category-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    margin-left: 10px;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.error-message {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    text-align: center;
    background: rgba(255, 77, 77, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-text {
    flex: 1;
    font-size: 1.05rem;
    word-break: break-all;
    transition: color 0.3s;
    color: var(--text-primary);
    cursor: pointer;
    /* Interaction hint */
}

.task-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-left: 36px;
    /* Align with text, indenting past checkbox */
    word-break: break-word;
    display: none;
    /* Hidden by default */
    margin-top: 0.2rem;
}

.task-description.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

.task-date-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.task-date-badge.overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.modal-input-glass {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-input-glass:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.modal-input-glass::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

select.modal-input-glass {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* View By Toggle */
.view-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.view-toggle-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.view-toggle-option {
    padding: 6px 16px;
    border-radius: 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-option.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.view-toggle-option:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Custom Checkbox */
.custom-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.task-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox:checked~.checkmark {
    background-color: var(--success);
    border-color: var(--success);
}

.checkmark svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.task-checkbox:checked~.checkmark svg {
    opacity: 1;
    transform: scale(1);
}

/* Task Actions */
.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    align-self: flex-start;
    /* Keep aligned with top */
    margin-top: -4px;
    /* Slight adjustment to align with checkbox/text visually */
}

.edit-btn,
.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    opacity: 0;
    transform: translateX(10px);
}

.task-item:hover .edit-btn,
.task-item:hover .delete-btn {
    opacity: 1;
    transform: translateX(0);
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .app-header h1 {
        font-size: 2.5rem;
    }

    .delete-btn {
        opacity: 1;
        transform: none;
    }
}

/* Priority Styles */
#prioritySelect {
    padding: 0 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: color 0.2s;
    border-right: 1px solid var(--glass-border);
}

#prioritySelect:hover,
#prioritySelect:focus {
    color: var(--text-primary);
}

#prioritySelect option {
    background: var(--bg-color);
    color: var(--text-primary);
}

.task-item {
    border-left: 4px solid transparent;
}

.task-item.priority-high {
    border-left-color: var(--danger);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.task-item.priority-medium {
    border-left-color: #f59e0b;
    /* Amber */
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.task-item.priority-low {
    border-left-color: var(--success);
}

/* Auth Styles */
.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.auth-header {
    text-align: center;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: var(--font-family);
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.auth-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: var(--accent-color);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-family);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
    background: #7c3aed;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--text-primary);
}

.auth-links .link-primary {
    color: var(--accent-color);
    font-weight: 600;
}

.auth-links .link-primary:hover {
    color: #a78bfa;
}

.btn-primary {
    padding: 12px;
    border-radius: 8px;
    background: var(--accent-color);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-family);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Custom Form Controls */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' 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 0.7rem center;
    background-size: 1em;
    padding-right: 2.5rem !important;
}

#prioritySelect,
#statusFilter,
#priorityFilter,
#dateFilter,
#editTaskPriority {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255, 255, 255, 0.05);
    /* Unified Glass */
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

#prioritySelect:hover,
#statusFilter:hover,
#priorityFilter:hover,
#dateFilter:hover,
#editTaskPriority:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

#prioritySelect:focus,
#statusFilter:focus,
#priorityFilter:focus,
#dateFilter:focus,
#editTaskPriority:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Date/Time Picker Unification */
input[type="date"],
input[type="time"] {
    appearance: none;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    outline: none;
    cursor: pointer;
    min-height: 42px;
    /* Consistency */
}

/* Specific overrides for task inputs to match height */
#taskDueDate,
#taskTime {
    height: 100%;
}

/* Dropdown Options */
option {
    background-color: #1e293b;
    /* Dark Slate */
    color: var(--text-primary);
}

/* Override width for Add Task Priority Select to fit in row */
#prioritySelect {
    width: auto !important;
    min-width: 100px;
    flex-shrink: 0;
}

/* Calendar View Styles */
.view-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    /* Remove border */
    border-radius: 8px;
    /* Slightly tighter radius inside the pill */
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    /* Subtle hover */
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.view-btn svg {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.view-btn.active svg {
    opacity: 1;
    stroke-width: 2.5px;
    /* Bolder icon when active */
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto repeat(6, 1fr);
    /* Header + 6 weeks max */
    gap: 1px;
    flex: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.1);
    /* Grid lines color */
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.calendar-day-header {
    background: rgba(30, 41, 59, 0.8);
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.calendar-day {
    background: rgba(30, 41, 59, 0.6);
    /* Cell bg */
    min-height: 80px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.calendar-day.today {
    background: rgba(139, 92, 246, 0.1);
}

.day-number {
    font-size: 0.85rem;
    font-weight: 500;
    align-self: flex-end;
    margin-bottom: 2px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-day.today .day-number {
    background: var(--accent-color);
    color: white;
}

.calendar-event {
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    border-left: 2px solid var(--text-secondary);
}

.calendar-event.priority-high {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.calendar-event.priority-medium {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.calendar-event.priority-low {
    border-left-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.calendar-event.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.cal-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.cal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cal-view-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.cal-view-btn:hover {
    color: var(--text-primary);
}

.cal-view-btn.active {
    background: var(--accent-color);
    color: white;
}

/* Avatar Uploader Hover Effect */
.avatar-upload:hover .avatar-overlay {
    opacity: 1 !important;
}

/* Transparent Calendar Overrides */
#calendarSection .glass-panel {
    background: rgba(30, 41, 59, 0.2) !important;
    backdrop-filter: blur(8px) !important;
}

.calendar-grid {
    background: transparent !important;
    border: none !important;
}

.calendar-day-header {
    background: rgba(30, 41, 59, 0.3) !important;
}

.calendar-day {
    background: transparent !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


/* Custom Date/Time Picker Styles */
.modal {
    z-index: 1000;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-sidebar-position {
    transform: none !important;
    /* Position will be set via JS */
    margin: 0;
}

.custom-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    /* Increased gap for better visual separation */
    margin-top: 10px;
    width: 100%;
}

.custom-date-grid .calendar-day-header {
    background: transparent;
    padding: 5px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.picker-day {
    width: 100%;
    aspect-ratio: 1;
    /* Keeps them square */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    /* Circle shape for cleaner look */
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s;
    user-select: none;
}

.picker-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.picker-day.selected {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
    transform: scale(1.05);
    /* Slight pop */
}

/* Ensure no override interferes from other classes since we removed calendar-day */

.picker-day.today {
    border: 1px solid var(--accent-color);
}

.picker-day.empty {
    cursor: default;
    background: transparent !important;
}

.time-picker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: 200px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.time-col {
    height: 100%;
    width: 60px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 80px 0;
    /* Padding to center the scroll area */
    scrollbar-width: none;
    /* Firefox */
}

.time-col::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.time-item {
    padding: 10px;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s;
    font-weight: 500;
}

.time-item.selected {
    opacity: 1;
    transform: scale(1.2);
    color: var(--accent-color);
}

.btn-cancel,
.btn-save {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: var(--font-family);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-save {
    background: var(--accent-color);
    color: white;
}

.btn-save:hover {
    background: #7c3aed;
    box-shadow: 0 0 10px var(--accent-glow);
}