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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.5;
}

.app {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    margin-bottom: 1.5rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
}

.subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.25rem;
}

.add-section {
    margin-bottom: 1.5rem;
}

.add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.add-form input[type="text"],
.add-form input[type="date"],
.add-form select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #444;
    border-radius: 6px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.add-form input[type="text"] {
    flex: 1;
    min-width: 140px;
}

.add-form input:focus,
.add-form select:focus {
    outline: none;
    border-color: #e65f78;
    box-shadow: 0 0 0 2px rgba(230, 95, 120, 0.25);
}

.add-form button {
    padding: 0.5rem 1rem;
    background: #e65f78;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.add-form button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.add-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(200, 80, 80, 0.2);
    border: 1px solid #c44;
    border-radius: 6px;
    color: #f88;
    font-size: 0.9rem;
}

.filters {
    margin-bottom: 1rem;
}

.filters select {
    padding: 0.35rem 0.5rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.tasks .loading {
    color: #888;
    padding: 1rem 0;
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #252525;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s;
}

.task-item:hover {
    border-color: #444;
}

.task-item.done .task-title {
    text-decoration: line-through;
    color: #888;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-weight: 500;
    word-break: break-word;
}

.task-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.2rem;
}

.task-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.task-actions button {
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #333;
    color: #e0e0e0;
    transition: background 0.2s;
}

.task-actions button:hover {
    background: #444;
}

.task-actions button.done-btn {
    background: #2a5a2a;
    color: #9f9;
}

.task-actions button.done-btn:hover {
    background: #3a6a3a;
}

.task-actions button.delete-btn {
    background: #5a2a2a;
    color: #f99;
}

.task-actions button.delete-btn:hover {
    background: #6a3a3a;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #888;
    background: #252525;
    border-radius: 8px;
    border: 1px dashed #444;
}

@media (max-width: 520px) {
    .add-form {
        flex-direction: column;
        align-items: stretch;
    }
    .add-form input[type="text"] {
        min-width: 0;
    }
}
