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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 1em;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e9ecef;
}

.tab-btn.active {
    color: #667eea;
    background: white;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
    min-height: 400px;
}

.tab-content.active {
    display: block;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 0.9em;
    cursor: pointer;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

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

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    font-size: 0.9em;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit {
    background: #ffc107;
    color: #212529;
    padding: 6px 12px;
    font-size: 0.9em;
}

.btn-edit:hover {
    background: #e0a800;
}

.tasks-list, .goals-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-card, .goal-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    transition: all 0.3s;
}

.task-card:hover, .goal-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.task-card.priority-high {
    border-left-color: #dc3545;
}

.task-card.priority-medium {
    border-left-color: #ffc107;
}

.task-card.priority-low {
    border-left-color: #28a745;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.task-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #212529;
}

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

.task-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-subject {
    background: #e7f3ff;
    color: #0066cc;
}

.badge-priority {
    background: #ffeaa7;
    color: #d63031;
}

.badge-date {
    background: #e8f8f5;
    color: #16a085;
}

.task-description {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-actions {
    display: flex;
    gap: 8px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.timeline-date {
    min-width: 100px;
    text-align: center;
    padding: 10px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    height: fit-content;
}

.timeline-date .day {
    font-size: 2em;
    font-weight: bold;
}

.timeline-date .month {
    font-size: 0.9em;
}

.timeline-tasks {
    flex: 1;
}

.timeline-task {
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.timeline-task.priority-high {
    border-left-color: #dc3545;
}

.timeline-task.priority-medium {
    border-left-color: #ffc107;
}

.timeline-task.priority-low {
    border-left-color: #28a745;
}

.goal-card {
    border-left-color: #17a2b8;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.goal-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #212529;
}

.goal-description {
    color: #6c757d;
    margin-bottom: 15px;
}

.progress-section {
    margin-bottom: 15px;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85em;
    font-weight: 600;
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-actions {
    display: flex;
    gap: 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-controls select {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        flex-direction: column;
    }

    .timeline-date {
        width: 100%;
    }
}