:root {
  color-scheme: light;
  --ink: #17221d;
  --muted: #68756f;
  --paper: #ffffff;
  --canvas: #f2f5f3;
  --line: #d9e1dc;
  --brand: #176b4d;
  --brand-dark: #0e5038;
  --brand-soft: #e4f3ec;
  --danger: #a63d3d;
  --danger-soft: #fae9e9;
  --warning: #9a6515;
  --warning-soft: #fff3d8;
  --shadow: 0 18px 50px rgba(25, 54, 41, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--brand-dark); }

.site-header {
  background: var(--ink);
  color: white;
  padding: 1rem clamp(1rem, 4vw, 3rem);
}
.site-header__inner, .shell { max-width: 1180px; margin: 0 auto; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { margin: 0; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--brand); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }

.shell { padding: clamp(1rem, 4vw, 3rem); }
.public-shell { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.check-in-card { width: min(100%, 560px); padding: clamp(1.4rem, 5vw, 3rem); }
.check-in-card h1 { margin: .5rem 0; font-size: clamp(2rem, 7vw, 3rem); line-height: 1.02; }
.project-message { color: var(--muted); white-space: pre-wrap; line-height: 1.6; margin: .75rem 0 1.6rem; }

.stack { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 750; font-size: .9rem; }
input, textarea {
  width: 100%;
  border: 1px solid #bdc9c2;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: .72rem .8rem;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus { outline: 3px solid rgba(23, 107, 77, .18); border-color: var(--brand); }

.button {
  border: 0;
  border-radius: 9px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  padding: .72rem 1rem;
  text-decoration: none;
  text-align: center;
}
.button:hover { background: var(--brand-dark); }
.button:disabled { opacity: .55; cursor: wait; }
.button--secondary { color: var(--ink); background: #edf1ef; }
.button--secondary:hover { background: #e0e7e3; }
.button--danger { background: var(--danger); }
.button--danger:hover { background: #842e2e; }
.button--small { padding: .48rem .65rem; font-size: .82rem; }
.text-button { border: 0; background: transparent; padding: .25rem; color: var(--brand-dark); font-weight: 750; }
.text-button--danger { color: var(--danger); }

.notice { padding: .8rem 1rem; border-radius: 9px; line-height: 1.4; }
.notice[hidden] { display: none; }
.notice--success { color: var(--brand-dark); background: var(--brand-soft); }
.notice--error { color: #7a2828; background: var(--danger-soft); }
.notice--warning { color: #70490c; background: var(--warning-soft); }
.muted { color: var(--muted); }

.admin-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.admin-heading h1 { margin: .25rem 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.project-card { padding: 1.2rem; display: grid; gap: .9rem; }
.project-card h2 { margin: 0; font-size: 1.15rem; }
.project-card__top, .card-actions, .toolbar, .stat-row { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.project-card__top, .stat-row { justify-content: space-between; }
.pill { border-radius: 99px; padding: .28rem .55rem; background: #edf1ef; color: var(--muted); font-size: .75rem; font-weight: 800; }
.pill--confirmed { background: var(--brand-soft); color: var(--brand-dark); }
.pill--archived { background: var(--warning-soft); color: var(--warning); }

.dialog { width: min(94vw, 620px); border: 0; border-radius: 14px; padding: 0; box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(18, 29, 24, .58); }
.dialog__body { padding: 1.4rem; }
.dialog__body h2 { margin-top: 0; }
.dialog__actions { display: flex; justify-content: end; gap: .65rem; margin-top: 1rem; }

.detail-header { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.detail-header h1 { margin: 0; }
.status-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.status-card { background: white; border: 1px solid var(--line); border-radius: 10px; padding: .8rem; }
.status-card strong { display: block; font-size: 1.4rem; }
.panel { padding: 1.2rem; margin-bottom: 1rem; }
.panel h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem .55rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.row-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.paste-preview { max-height: 210px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: .6rem; }
.error-list { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--danger); }

@media (max-width: 700px) {
  .admin-heading { align-items: stretch; flex-direction: column; }
  .status-cards { grid-template-columns: 1fr; }
  .toolbar > * { flex: 1 1 auto; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}

