* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f6f7f9;
  color: #202124;
}
.header {
  padding: 24px 20px 14px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}
h1, h2 { margin: 0; }
h1 { cursor: default; }
.subtitle, .muted { color: #6b7280; margin: 6px 0 0; }
main { padding: 20px; }
.page { max-width: 1400px; margin: 0 auto; }
.hidden { display: none !important; }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.narrow { max-width: 460px; }
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.row { display: flex; gap: 8px; margin-top: 6px; }
label { display: block; font-size: 13px; color: #374151; margin-bottom: 4px; }
input[type="text"], input[type="password"], input[type="number"], input:not([type]) {
  height: 34px;
  padding: 6px 8px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  background: white;
}
input[type="number"] { width: 58px; }
.name-input { min-width: 190px; }
.comment-input { min-width: 190px; }
button, .fileBtn {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .fileBtn:hover { opacity: .9; }
.ghost { background: #e5e7eb; color: #111827; }
.deleteBtn { background: #ef4444; }
.fileBtn input { display: none; }
.check { display: flex; gap: 6px; align-items: center; margin: 0; }
.table-wrap {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
}
table { border-collapse: collapse; width: 100%; }
th, td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px;
  text-align: center;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: #f3f4f6;
  z-index: 1;
  white-space: nowrap;
}
tr.top7 { background: #dcfce7; }
tr.out { background: #fed7aa; }
.admin-wrap { max-height: 72vh; }
.admin-table td:first-child { min-width: 220px; }
.monthBlock { min-width: 240px; max-width: 260px; }
.monthHeader {
  cursor: pointer;
  background: #f3f4f6;
  padding: 6px;
  border-radius: 8px;
  margin-bottom: 6px;
  user-select: none;
}
.dayGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.dayCell {
  font-size: 11px;
  color: #4b5563;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 4px;
}
.dayCell input {
  width: 100%;
  height: 28px;
  margin-top: 3px;
  text-align: center;
  padding: 2px;
}
.history {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 12px 12px 32px;
}
.history li { margin: 7px 0; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #111827;
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
@media (max-width: 760px) {
  main { padding: 12px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .row { flex-direction: column; }
  .controls { align-items: stretch; }
  .controls > * { width: 100%; }
  button, .fileBtn { width: 100%; }
}
