:root {
    color-scheme: light;
    --ink: #172026;
    --muted: #66717c;
    --line: #d8dee5;
    --panel: #ffffff;
    --page: #f6f8fb;
    --brand: #1f6feb;
    --brand-dark: #174ea6;
    --ok: #18794e;
    --warn: #9a6700;
    --idle: #6b7280;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

a:hover {
    text-decoration: underline;
}

.shell {
    min-height: 100vh;
}

.topbar {
    background: #101820;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.topbar-inner,
.main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar-inner {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,.76);
    font-size: 14px;
}

.nav a,
.nav button {
    color: #fff;
}

.main {
    padding: 28px 0 48px;
}

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

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
}

h1 {
    font-size: clamp(28px, 3vw, 40px);
}

h2 {
    font-size: 22px;
}

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

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

.panel {
    padding: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.card {
    display: block;
    padding: 18px;
    color: inherit;
}

.card:hover {
    text-decoration: none;
    border-color: #9ebbea;
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.status-completed {
    background: #dff5e8;
    color: var(--ok);
}

.status-incomplete {
    background: #fff0c2;
    color: var(--warn);
}

.status-not_started {
    background: #eef1f5;
    color: var(--idle);
}

.table-wrap {
    overflow-x: auto;
}

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

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

th {
    font-size: 13px;
    color: var(--muted);
}

.form {
    display: grid;
    gap: 16px;
}

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

label {
    font-weight: 700;
    font-size: 14px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #c8d0d9;
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

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

.button,
button {
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button:hover,
button:hover {
    background: var(--brand-dark);
    text-decoration: none;
}

.button-secondary {
    background: #e8edf4;
    color: var(--ink);
}

.button-secondary:hover {
    background: #dbe3ee;
}

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

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border: 1px solid #b8d7ff;
    background: #eaf3ff;
}

.notice-error {
    border-color: #f2b8b5;
    background: #fff1f0;
    color: var(--danger);
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(420px, 100%);
}

.attachment-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

@media (max-width: 700px) {
    .page-head,
    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .nav {
        justify-content: space-between;
    }
}
