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

body {
    background-color: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.todo-card {
    background-color: white;
    max-width: 460px;
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 
                0 8px 10px -6px rgb(0 0 0 / 0.1);
    border: 1px solid #f1f5f9;
    padding: 32px;
    overflow: hidden;
}

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

.priority-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.priority-low    { background-color: #4ade80; }
.priority-medium { background-color: #fbbf24; }
.priority-high   { background-color: #f87171; }

.priority-badge {
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
}

.priority-low    { background: #ecfdf5; color: #166534; }
.priority-medium { background: #fef9c3; color: #854d0e; }
.priority-high   { background: #fee2e2; color: #991b1b; }

.title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.3;
}

.description-wrapper {
    margin-bottom: 24px;
}

.description {
    color: #475569;
    font-size: 15.5px;
    line-height: 1.6;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.expand-toggle {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 0;
}

.status-time-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.status-badge {
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14.5px;
    font-weight: 600;
}

.status-pending       { background: #e0f2fe; color: #0369a1; }
.status-in-progress   { background: #fef9c3; color: #ca8a04; }
.status-done          { background: #d1fae5; color: #15803d; }

.time-remaining {
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14.5px;
    font-weight: 600;
    background: #ecfdf5;
    color: #10b981;
}

.time-remaining.completed {
    background: #f1f5f9;
    color: #64748b;
}

.overdue-indicator {
    padding: 6px 16px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}

.overdue-indicator.show {
    display: inline-block;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.checkbox-container input[type="checkbox"] {
    width: 26px;
    height: 26px;
    accent-color: #3b82f6;
}

.checkbox-label {
    font-size: 15.5px;
    color: #334155;
    cursor: pointer;
    font-weight: 500;
}

.status-control-container label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #64748b;
}

.status-control-container select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    list-style: none;
}

.tag {
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13.5px;
    font-weight: 500;
}

.tag-frontend { background: #dbeafe; color: #1e40af; }
.tag-urgent   { background: #fee2e2; color: #e11d48; }
.tag-design   { background: #f3e8ff; color: #7e22ce; }

.buttons-container {
    display: flex;
    gap: 12px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn {
    background: white;
    border: 2px solid #cbd5e1;
    color: #334155;
}

.delete-btn {
    background: white;
    border: 2px solid #fecaca;
    color: #ef4444;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* EDIT MODE */
.edit-mode form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.edit-mode label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.edit-mode input,
.edit-mode textarea,
.edit-mode select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
}

.edit-mode textarea {
    min-height: 110px;
    resize: vertical;
}

.edit-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.save-btn {
    background: #3b82f6;
    color: white;
    border: none;
}

.cancel-btn {
    background: white;
    border: 2px solid #94a3b8;
    color: #475569;
}

/* Focus Styles */
input:focus, textarea:focus, select:focus, button:focus {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
}

/* Done State */
.title.done {
    text-decoration: line-through;
    color: #64748b;
}

/* Responsiveness */
@media (max-width: 480px) {
    .todo-card { padding: 24px; border-radius: 20px; }
    .title { font-size: 23px; }
    .status-time-row { flex-direction: column; align-items: flex-start; }
}