* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #2b2e2e 0%, #262929 100%);
  color: #ede9e3;
  font-family: 'Inter', sans-serif;
}

.board {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

header { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

h1 {
  font-family: 'Caveat', cursive;
  font-size: 52px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9d98;
}

.form-col { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

input, select, button { font-family: 'Inter', sans-serif; }

#text { flex: 2; min-width: 160px; }
#due { flex: 1; min-width: 140px; }

input, select {
  background: #363a38;
  border: 1px solid #464a47;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ede9e3;
  font-size: 14px;
}

::placeholder { color: #9a9d98; }

.chalk-btn {
  background: #d9b45c;
  color: #2b2e2e;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.chalk-btn:hover { filter: brightness(1.15); }

.danger-btn {
  background: transparent;
  color: #ffb3a7;
  border: 1px solid #c1493f;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.danger-btn:hover { background: rgba(193,73,63,0.15); }

.error-box {
  background: rgba(193,73,63,0.2);
  border: 1px solid #c1493f;
  color: #ffb3a7;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.table-wrap {
  background: #2f3231;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #3c403d;
}

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

th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9a9d98;
  padding: 12px 14px;
  border-bottom: 1px solid #3c403d;
}

td {
  padding: 12px 14px;
  font-size: 14px;
  color: #ede9e3;
  vertical-align: middle;
  border-bottom: 1px solid #34373580;
}

tr:hover td { background: rgba(237,233,227,0.05); }

tr.overdue td { background: rgba(193,73,63,0.16); }
tr.overdue .due-line { color: #ffb3a7; }

.due-line { font-size: 14px; }
.who-line { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }

.overdue-tag {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #c1493f;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: #d9b45c; }

.person-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.person-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #464a47;
  background: #363a38;
  color: #c9ccc7;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.person-toggle input { accent-color: #d9b45c; }
.person-toggle.active { border-color: #d9b45c; color: #ede9e3; }

.empty-row { padding: 20px 14px; text-align: center; color: #9a9d98; font-size: 14px; }

.divider { border-top: 1px dashed #464a47; margin: 22px 0; }

.link-btn {
  background: none;
  border: none;
  color: #d9b45c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
}
a.link-btn { text-decoration: none; display: inline-block; }

.done-row td { text-decoration: line-through; opacity: 0.6; }
.done-row td:nth-child(2), .done-row td:nth-child(3) { text-decoration: none; opacity: 1; }

.notif-text { font-size: 13px; color: #c9ccc7; }
.notif-note { font-size: 12px; color: #7d807c; margin-top: 6px; line-height: 1.5; }

.footer-link { margin-top: 30px; font-size: 13px; }
.footer-link a { color: #9a9d98; }

/* Admin page */
.person-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #34373580;
}
.person-row:last-child { border-bottom: none; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 10px; }
.person-name { display: flex; align-items: center; font-size: 14px; }

:focus-visible { outline: 2px solid #ede9e3; outline-offset: 2px; }

@media (max-width: 640px) {
  .form-row { flex-direction: column; align-items: stretch; }
  h1 { font-size: 40px; }
  header { flex-direction: column; }
}
