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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 1.5rem;
}

.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.user-info {
    margin-right: 10px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success { background: #d4edda; border-left: 4px solid #28a745; color: #155724; }
.alert-danger { background: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; }
.alert-warning { background: #fff3cd; border-left: 4px solid #ffc107; color: #856404; }
.alert-info { background: #d1ecf1; border-left: 4px solid #17a2b8; color: #0c5460; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-card.stat-danger {
    background: linear-gradient(135deg, #fff 0%, #ffe0e0 100%);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.panel-card h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

.form-group textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

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

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

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Filters */
.filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    margin-bottom: 10px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: #555;
}

.filter-btn {
    padding: 6px 15px;
    margin: 0 3px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.3s;
}

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

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

/* Tasks List */
.tasks-list {
    max-height: 700px;
    overflow-y: auto;
}

.task-item {
    display: flex;
    align-items: start;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.task-item:hover {
    background: #f8f9fa;
}

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

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #999;
}

.task-item.overdue {
    border-left: 4px solid #dc3545;
    background: #fff5f5;
}

.task-checkbox {
    margin-right: 15px;
    flex-shrink: 0;
}

.checkbox-link {
    text-decoration: none;
}

.checkbox {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #667eea;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox:hover {
    background: #f0f0ff;
    transform: scale(1.1);
}

.task-content {
    flex: 1;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.task-title {
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
}

.task-priority {
    padding: 3px 10px;
    border-radius: 12px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.task-description {
    color: #666;
    font-size: 0.95rem;
    margin: 8px 0;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
}

.task-category {
    color: #667eea;
}

.task-due-date {
    color: #666;
}

.task-due-date.overdue-text {
    color: #dc3545;
    font-weight: 600;
}

.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #667eea;
}

.task-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
    flex-shrink: 0;
}

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

.empty-state p {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-hint {
    font-size: 1rem !important;
    color: #bbb;
}

/* Edit Container */
.edit-container {
    max-width: 800px;
    margin: 0 auto;
}

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

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

.tasks-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tasks-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.tasks-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
