:root {
  color: #1c1917;
  background: #f7f5f2;
  font-family: "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }

body { margin: 0; }

.top {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: #1f2933;
  color: #f8fafc;
  padding: 0 16px;
  position: sticky;
  top: 0;
}

.brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 12px 12px 12px 0;
  margin-right: 8px;
  border-right: 1px solid #3d4a57;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
}

.bar a {
  color: #e7e5e4;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
}

.bar a:hover { background: #334155; color: #fff; }

.bar a.is-on {
  background: #f8fafc;
  color: #1f2933;
  font-weight: 600;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

h1 { margin: 0 0 8px; font-size: 1.8rem; }

h2 {
  margin: 28px 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #57534e;
}

.lead { margin: 0; max-width: 40rem; color: #44403c; }

.crumb { margin: 0 0 6px; color: #78716c; font-size: 0.85rem; }

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.cards a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 96px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.cards a:hover { border-color: #a8a29e; }

.cards span { color: #57534e; font-size: 0.92rem; }

.open {
  display: inline-block;
  margin-top: 16px;
  background: #1f2933;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
}

.note { color: #57534e; }

.clock-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 28px;
  margin-top: 18px;
}

.people, .sites { list-style: none; margin: 0 0 12px; padding: 0; }

.people a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.people a.is-on { border-color: #1f2933; }

.people span, .sites li { color: #57534e; font-size: 0.92rem; }

.inline-add { display: flex; gap: 8px; margin: 8px 0 18px; }

.inline-add input, .clock-layout select {
  padding: 8px 10px;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font: inherit;
}

.inline-add .open { margin-top: 0; border: 0; cursor: pointer; }

.clock-layout label {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #57534e;
}

.punch-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

.punch {
  border: 0;
  border-radius: 10px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.punch.in { background: #166534; }
.punch.out { background: #991b1b; }
.punch.break { background: #b45309; }
.punch.go { background: #1d4ed8; }

@media (max-width: 720px) {
  .clock-layout { grid-template-columns: 1fr; }
}

.drop { position: relative; }

.bar > .drop > a {
  position: relative;
  z-index: 2;
}

.menu {
  display: none;
  position: absolute;
  z-index: 30;
  min-width: 200px;
  padding: 6px;
  background: #111827;
  border-radius: 8px;
}

.bar > .drop > .menu {
  top: 100%;
  left: 0;
  margin-top: 10px;
}

.bar > .drop::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

.menu .drop > .menu {
  top: 0;
  left: calc(100% + 10px);
}

.menu .drop::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 8px;
  height: 100%;
}

.drop:hover > .menu,
.drop:focus-within > .menu { display: block; }

.menu a,
.menu .drop > a { display: block; white-space: nowrap; }

main.wide { max-width: 1100px; }

.flash {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ecfdf5;
}

.flash.error { background: #fef2f2; }

.filter { display: flex; align-items: center; gap: 8px; margin: 18px 0; }

.filter select,
.fields input,
.fields select {
  padding: 8px 10px;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font: inherit;
}

.editor {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.fields .grow { grid-column: span 2; }

.fields label,
.filter label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #57534e;
}

.fields .check input { width: 18px; height: 18px; }

.fields .open { border: 0; cursor: pointer; }

.cancel { margin-left: 8px; color: #57534e; }

.sheet {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 10px;
}

.sheet th,
.sheet td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f4;
  vertical-align: middle;
  font-size: 0.92rem;
}

.sheet th {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #57534e;
}

.muted { color: #78716c; }

.sheet code { font-size: 0.82rem; }

.actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }

.actions form,
.sheet td form { margin: 0; }

.pill, .linkish {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.pill { border-radius: 999px; padding: 4px 8px; font-size: 0.75rem; font-weight: 700; }

.pill.on { background: #dcfce7; color: #166534; }

.pill.off { background: #fee2e2; color: #991b1b; }

.linkish { color: #b91c1c; padding: 0; }
