/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #4a5568;
    font-size: 2.2rem;
    font-weight: 700;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: #fc8181;
    color: white;
}

.btn-danger:hover {
    background: #f56565;
    transform: translateY(-2px);
}

.btn-success {
    background: #68d391;
    color: white;
}

.btn-success:hover {
    background: #48bb78;
    transform: translateY(-2px);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    flex: 1;
    margin-bottom: 20px;
}

/* Panel Styles */
.left-panel, .right-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.left-panel h2, .right-panel h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.left-panel h2 i, .right-panel h2 i {
    color: #667eea;
    margin-right: 10px;
}

/* Tasks Header */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Card Styles */
.goal-card, .task-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #e2e8f0;
}

.goal-card:hover, .task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.task-card.overdue {
    border-left-color: #fc8181;
    background: #fef5e7;
}

.task-card.upcoming {
    border-left-color: #f6e05e;
    background: #fffbf0;
}

.task-card.completed {
    border-left-color: #68d391;
    background: #f0fff4;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Task Status Colors */
.task-overdue {
    border-left-color: #fc8181 !important;
    background: #fef5e7 !important;
}

.task-upcoming {
    border-left-color: #f6e05e !important;
    background: #fffbf0 !important;
}

.task-completed {
    border-left-color: #68d391 !important;
    background: #f0fff4 !important;
}

/* Card Content */
.goal-header, .task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.goal-title, .task-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.goal-progress, .task-meta {
    font-size: 0.9rem;
    color: #718096;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-meta i {
    color: #667eea;
}

.priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #fed7d7;
    color: #c53030;
}

.priority-medium {
    background: #feebc8;
    color: #dd6b20;
}

.priority-low {
    background: #c6f6d5;
    color: #2f855a;
}

/* Progress Bar */
.goal-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.goal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.card-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Bottom Panel */
.bottom-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.progress-section h3, .timeline-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.progress-section h3 i, .timeline-section h3 i {
    color: #667eea;
    margin-right: 10px;
}

/* Progress Stats */
.progress-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Timeline */
.timeline-container {
    max-height: 200px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    min-width: 100px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.timeline-tasks {
    flex: 1;
    margin-left: 15px;
}

.timeline-task {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 2px 5px 2px 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #4a5568;
    font-size: 1.4rem;
    font-weight: 600;
}

.close {
    color: #a0aec0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 25px 30px 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .bottom-panel {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .tasks-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .task-filters {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for task cards */
.task-card {
    animation: slideInUp 0.3s ease;
}

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