* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2f7;
    color: #172033;
}
button, input, select {
    font: inherit;
}
button {
    cursor: pointer;
}
.app {
    display: flex;
    justify-content: center;
    padding: 48px 20px;
}
.todo-card {
    width: 100%;
    max-width: 850px;
    padding: 32px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(23, 32, 51, 0.12);
}
header h1 {
    margin: 4px 0 8px;
}
.eyebrow {
    margin: 0;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #3159a6;
}
.todo-form {
    display: grid;
    grid-template-columns: 1fr 160px auto;
    gap: 16px;
    align-items: end;
    margin: 32px 0 20px;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-field label {
    font-weight: bold;
}
.form-field input,
.form-field select {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #aeb8c8;
    border-radius: 6px;
}
.form-field input:focus,
.form-field select:focus {
    outline: 3px solid rgba(49, 89, 166, 0.2);
    border-color: #3159a6;
}
.primary-button,
.secondary-button,
.delete-button {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
}
.primary-button {
    border: 1px solid #244987;
    background: #3159a6;
    color: white;
}
.secondary-button {
    margin-top: 20px;
    border: 1px solid #3159a6;
    background: white;
    color: #3159a6;
}
.delete-button {
    border: 1px solid #b32d2d;
    background: white;
    color: #9d2020;
}
.statistics {
    display: flex;
    gap: 24px;
    padding: 12px 16px;
    background: #f4f6fa;
    border-radius: 8px;
}
.statistics p {
    margin: 0;
}
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.todo-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d3d9e3;
    border-radius: 8px;
}
.todo-content {
    display: flex;
    gap: 12px;
    align-items: center;
}
.todo-content input {
    width: 20px;
    height: 20px;
}
.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #687386;
}
.priority {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
}
.priority-low { background: #e8f5ec; }
.priority-normal { background: #e8eef9; }
.priority-high { background: #fae7e7; }
.validation-error,
.error {
    color: #a32020;
}
.validation-error {
    grid-column: 1 / -1;
    margin: 0;
}
.message,
.empty-message {
    margin-top: 24px;
    padding: 14px;
    background: #f4f6fa;
    border-radius: 8px;
}
@media (max-width: 700px) {
    .todo-form {
        grid-template-columns: 1fr;
    }
    .todo-item {
        grid-template-columns: 1fr;
    }
    .statistics {
        flex-direction: column;
        gap: 6px;
    }
}