:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --text: #1e2422;
  --muted: #6c746f;
  --line: #ddd6cc;
  --panel: #fffdfa;
  --accent: #26725d;
  --accent-dark: #195242;
  --danger: #a7352b;
  --shadow: 0 18px 50px rgb(30 36 34 / 10%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: 1.05rem;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-dark);
}

.button.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.button.ghost:hover {
  border-color: #bfb5a6;
  background: #f3eee6;
}

.button.full {
  width: 100%;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.day-list {
  display: grid;
  gap: 14px;
}

.day,
.panel,
.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.day {
  padding: 18px;
}

.day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.day-heading span {
  color: var(--accent-dark);
  font-size: 1.3rem;
  font-weight: 850;
  white-space: nowrap;
}

.entries {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.entry {
  display: grid;
  grid-template-columns: 120px 86px 1fr;
  gap: 12px;
  align-items: baseline;
  color: var(--muted);
}

.entry strong {
  color: var(--text);
}

.entry p {
  overflow-wrap: anywhere;
}

.narrow {
  width: min(420px, 100%);
  margin: 8vh auto 0;
}

.auth h1 {
  margin-bottom: 20px;
}

.panel {
  padding: 18px;
}

.entry-form {
  align-self: start;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
  color: var(--text);
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid rgb(38 114 93 / 18%);
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 18px;
  align-items: start;
}

.recent h2 {
  margin-bottom: 12px;
}

.admin-entry {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.admin-entry:first-of-type {
  border-top: 0;
}

.admin-entry span,
.muted {
  display: block;
  color: var(--muted);
}

.admin-entry p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--danger);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.error {
  margin-bottom: 14px;
  color: var(--danger);
  font-weight: 700;
}

.empty {
  margin-bottom: 16px;
  padding: 24px;
}

.empty p,
.subtle-link {
  color: var(--muted);
}

.subtle-link {
  display: inline-block;
  margin-top: 16px;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 22px, 940px);
    padding-top: 22px;
  }

  .topbar,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-grid,
  .entry {
    grid-template-columns: 1fr;
  }

  .entry {
    gap: 2px;
  }

  .day-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}
