:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #172033;
    --muted: #657083;
    --line: #d9dee7;
    --brand: #155eef;
    --danger: #c2410c;
    --danger-bg: #fff1eb;
    --today: #8a6100;
    --today-bg: #fff7d6;
    --ok: #137a3f;
    --ok-bg: #eaf7ef;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

a {
    color: var(--brand);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 28px;
    min-height: 64px;
    padding: 0 28px;
}

.brand {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    font-weight: 600;
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px;
}

.hero {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

h1 {
    font-size: 30px;
    margin: 0 0 6px;
}

h2 {
    font-size: 20px;
    margin: 0 0 16px;
}

.muted {
    color: var(--muted);
}

.stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.stat,
.panel,
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stat {
    padding: 18px;
}

.stat strong {
    display: block;
    font-size: 28px;
}

.panel {
    margin-bottom: 22px;
    padding: 20px;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button,
button {
    align-items: center;
    background: var(--brand);
    border: 0;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    min-height: 38px;
    padding: 8px 13px;
}

.button.secondary,
button.secondary {
    background: #eef2f8;
    color: var(--text);
}

.button.danger,
button.danger {
    background: var(--danger);
}

.list {
    display: grid;
    gap: 12px;
}

.card {
    border-left: 6px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px;
}

.card.overdue {
    background: var(--danger-bg);
    border-left-color: var(--danger);
}

.card.today {
    background: var(--today-bg);
    border-left-color: var(--today);
}

.card.done {
    opacity: .7;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
}

.meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pill {
    border-radius: 999px;
    color: white;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 9px;
}

.table {
    border-collapse: collapse;
    width: 100%;
}

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
    display: grid;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: var(--text);
    font-weight: 700;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
    min-height: 40px;
    padding: 9px 10px;
    width: 100%;
}

textarea {
    min-height: 110px;
}

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

.checkbox input {
    min-height: auto;
    width: auto;
}

.empty {
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

@media (max-width: 760px) {
    .topbar,
    .hero,
    .card {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        padding: 16px;
    }

    .page {
        padding: 18px;
    }

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

    .card {
        grid-template-columns: 1fr;
    }
}
