:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #64717a;
  --line: #d9e0e4;
  --primary: #146c94;
  --primary-dark: #0d4c6a;
  --ok: #15803d;
  --warn: #b7791f;
  --bad: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--primary); text-decoration: none; }
h1, h2 { margin: 0 0 8px; letter-spacing: 0; }
p { color: var(--muted); margin: 0; line-height: 1.45; }

.topbar {
  min-height: 62px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

nav form { margin: 0; }
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.login-panel {
  max-width: 420px;
  margin: 60px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}

.stack { display: grid; gap: 14px; }
.grid { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.wide { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #26343c;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea { resize: vertical; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid #b8c5cc;
  border-radius: 6px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.primary:hover { background: var(--primary-dark); }
.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 0;
  color: var(--primary);
}
.actions, .inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.notice {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #eef6fb;
}
.notice.success { border-color: #9bd0b0; background: #eefaf2; }
.notice.error { border-color: #f0b2ad; background: #fff1f0; }

.checklist-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.task {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}
.task-title {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.task-title input, .confirm input { width: auto; }
.task-title strong {
  color: var(--bad);
  font-size: 12px;
}
.task p { margin: 8px 0 12px; }
.task-fields {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}
.confirm {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stats div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.stats strong { display: block; font-size: 28px; }
.stats span { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { color: #3d4b53; background: #f8fafb; }

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-right: 8px;
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

.user-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.user-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 14px 16px; }
  .shell { padding: 16px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .checklist-grid, .form-grid, .stats, .user-list { grid-template-columns: 1fr; }
  .task-fields { grid-template-columns: 1fr; }
  .inline input { flex: 1; min-width: 160px; }
}

.muted { color: var(--muted); font-weight: 400; }
