:root {
    --bg: #f6f4ee;
    --panel: #ffffff;
    --ink: #1f2a24;
    --muted: #617067;
    --line: #d8ddd4;
    --field: #eef3ed;
    --brand: #266147;
    --brand-dark: #1c4936;
    --accent: #b65f2a;
    --danger: #9d2f2f;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    line-height: 1.45;
}
a { color: var(--brand); text-decoration: none; }
.shell { max-width: 1180px; margin: 0 auto; padding: 18px; }
.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}
.brand { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}
.nav a {
    color: var(--ink);
    padding: 8px 10px;
    border-radius: 6px;
    white-space: nowrap;
}
.nav a.active, .nav a:hover { background: var(--field); }
.userline { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}
.metric { font-size: 2rem; font-weight: 800; }
.muted { color: var(--muted); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 8px 0 18px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.button, button {
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 10px 13px;
    font-weight: 700;
    cursor: pointer;
}
.button.secondary { background: var(--field); color: var(--ink); }
.button.danger { background: var(--danger); }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
textarea { min-height: 92px; resize: vertical; }
label { display: block; font-weight: 700; margin-bottom: 5px; }
.field { margin-bottom: 12px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 8px;
    background: var(--field);
    font-size: .85rem;
    color: var(--ink);
}
.pill.urgent, .pill.blocked { background: #ffe5df; color: #7a241d; }
.pill.active, .pill.high { background: #e3f3e8; color: #174c34; }
.pill.done { background: #e7ebef; color: #35414b; }
.flash { background: #fff5d8; border: 1px solid #eed28c; padding: 12px; border-radius: 8px; margin-bottom: 14px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.login-card { width: min(440px, 100%); }
.task-done { text-decoration: line-through; color: var(--muted); }
@media (max-width: 760px) {
    .topbar-inner { align-items: flex-start; flex-direction: column; }
    .cols-2, .cols-3, .form-grid { grid-template-columns: 1fr; }
    .shell { padding: 14px; }
    .card { padding: 14px; }
}
