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

body {
    font-family: 'Inter', sans-serif !important;
    background-color: #fafafa;
    color: #0a0a0a;
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.calendar-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    overflow: hidden;
}

.tasks-sidebar {
    flex: 1;
    background: white;
    border-left: 2px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    background: #fafafa;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    transition: background-color 0.2s ease;
}

.sidebar-content.drag-over-unassign {
    background-color: rgba(239, 68, 68, 0.1);
    border: 2px dashed #ef4444;
    border-radius: 0.5rem;
}

/* Task cards in sidebar */
.external-task {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 0.75rem;
    user-select: none;
}

.external-task:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.external-task.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Color classes for tasks */
.color-blue { background-color: #93c5fd !important; border-color: #60a5fa !important; }
.color-purple { background-color: #c4b5fd !important; border-color: #a78bfa !important; }
.color-pink { background-color: #f9a8d4 !important; border-color: #f472b6 !important; }
.color-red { background-color: #fca5a5 !important; border-color: #f87171 !important; }
.color-orange { background-color: #fdba74 !important; border-color: #fb923c !important; }
.color-yellow { background-color: #fde047 !important; border-color: #facc15 !important; }
.color-green { background-color: #86efac !important; border-color: #4ade80 !important; }
.color-teal { background-color: #5eead4 !important; border-color: #2dd4bf !important; }
.color-cyan { background-color: #67e8f9 !important; border-color: #22d3ee !important; }
.color-indigo { background-color: #a5b4fc !important; border-color: #818cf8 !important; }

/* Status borders */
.status-todo { border: 2px solid transparent !important; }
.status-in-progress { border: 2px solid #6b7280 !important; }
.status-completed { border: 2px solid #000000 !important; }

.btn-primary {
    background: #667eea !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 0.75rem !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100%;
    justify-content: center !important;
}

.btn-primary:hover {
    background: #5568d3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.toggle-switch {
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 0.75rem;
    border: 1.5px solid #e5e7eb;
    margin-bottom: 1rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 0.875rem;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
}

.stats-mini {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.stat-mini {
    flex: 1;
    text-align: center;
}

.stat-mini-value {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #0a0a0a !important;
}

.stat-mini-label {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    margin-top: 0.25rem;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.3;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.input-field {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fafafa;
    color: #0a0a0a;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.select-field {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fafafa;
    color: #0a0a0a;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Color picker dropdown */
.color-selector-container {
    position: relative;
}

.color-selector-button {
    width: 100%;
    padding: 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.color-selector-button:hover {
    border-color: #667eea;
    background: white;
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 0.375rem;
    border: 2px solid #e5e7eb;
}

.color-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.color-dropdown.active {
    display: block;
}

.color-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #9ca3af;
}

.color-option.selected {
    border-color: #000;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px #000;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* FullCalendar customization */
.fc {
    font-family: 'Inter', sans-serif !important;
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: #e5e7eb !important;
}

.fc-daygrid-day.fc-day-today {
    background-color: rgba(102, 126, 234, 0.08) !important;
}

.fc-daygrid-day-number {
    font-weight: 600 !important;
    color: #374151 !important;
    padding: 0.5rem !important;
}

.fc-col-header-cell {
    background: #fafafa !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    padding: 0.75rem 0.5rem !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.fc-event {
    border-radius: 4px !important;
    padding: 2px 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    color: #1f2937 !important;
}

.fc-event-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #0a0a0a !important;
}

.fc-button {
    background: white !important;
    color: #374151 !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.fc-button:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

.fc-button-active {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

/* Reduce calendar height */
#calendar {
    height: calc(100vh - 180px) !important;
}

.fc .fc-view-harness {
    height: 100% !important;
}

/* Login page styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0a0a0a;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
}

.error-message.active {
    display: block;
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-button:hover {
    border-color: #667eea;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    min-width: 200px;
}

.user-dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item.danger {
    color: #dc2626;
}

.dropdown-item.danger:hover {
    background: #fee2e2;
}

/* Mobile Add Task Button */
.mobile-add-task-btn {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 900;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-add-task-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.mobile-add-task-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .calendar-section {
        flex: 1;
        width: 100%;
        padding: 1rem;
    }

    /* Hide tasks sidebar completely on mobile */
    .tasks-sidebar {
        display: none;
    }

    /* Show mobile add button */
    .mobile-add-task-btn {
        display: flex;
    }

    /* Adjust calendar height for mobile */
    #calendar {
        height: calc(100vh - 140px) !important;
    }

    /* Smaller header on mobile */
    .calendar-section .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-menu {
        align-self: flex-end;
    }
}
