:root {
  --green: #1f4d3a;
  --green-dark: #163a2b;
  --ink: #1d1d1b;
  --muted: #6b6b66;
  --paper: #f6f4ef;
  --card: #ffffff;
  --line: #dedbd2;
  --orange: #b85c00;
  --orange-bg: #fff1e0;
  --red: #b3261e;
  --red-bg: #fdeceb;
  --blue: #1d4e89;
  --person: #1f4d3a;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
}

.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: var(--green);
  color: #fff;
}
.shop { font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.now { margin-left: auto; font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 600; }
.status {
  font-size: 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}
.status.offline { background: var(--orange); }

main { flex: 1; overflow-y: auto; }
.screen { max-width: 1100px; margin: 0 auto; padding: 20px 24px 40px; position: relative; }
.center { text-align: center; padding: 80px 24px; }
.muted { color: var(--muted); }
h1 { font-size: 34px; margin: 12px 0 20px; text-align: center; }
h2 { font-size: 20px; margin: 0 0 10px; color: var(--muted); font-weight: 600; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:disabled { opacity: .45; cursor: default; }

.names {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.name {
  min-height: 110px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 12px solid var(--person);
  border-radius: 14px;
  font-size: 26px;
  font-weight: 600;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.name:active { background: #eef3ef; }

.problems { display: grid; gap: 8px; margin-bottom: 12px; }
.problem {
  display: flex; align-items: center; gap: 12px;
  background: var(--red-bg); color: var(--red);
  border: 1px solid #f3c4c0; border-radius: 10px;
  padding: 10px 14px; font-size: 18px;
}
.problem span { flex: 1; }
.small { padding: 8px 18px; border-radius: 8px; background: var(--red); color: #fff; font-weight: 600; }

.info { text-align: center; font-size: 20px; color: var(--blue); margin: 0 0 12px; }
.warn {
  text-align: center; font-size: 18px; color: var(--orange);
  background: var(--orange-bg); border-radius: 10px; padding: 10px; margin: 0 auto 16px; max-width: 640px;
}
.error { min-height: 1.4em; text-align: center; color: var(--red); font-size: 20px; margin: 8px 0; font-weight: 600; }
.error.big { font-size: 24px; }

.back {
  position: absolute; left: 24px; top: 24px;
  background: transparent; font-size: 22px; padding: 10px 14px; border-radius: 10px; color: var(--green);
}
.back:active { background: #e6ebe7; }

.keypad .prompt { text-align: center; font-size: 22px; color: var(--muted); margin: -8px 0 16px; }
.dots { display: flex; justify-content: center; gap: 14px; margin: 10px 0; }
.dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--green); display: grid; place-items: center;
  font-size: 20px; font-weight: 700; color: #fff;
}
.dot.on { background: var(--green); }
.pad {
  display: grid; grid-template-columns: repeat(3, 110px); gap: 14px;
  justify-content: center; margin-top: 12px;
}
.pad.waiting { opacity: .5; pointer-events: none; }
.key {
  height: 90px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  font-size: 36px; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.key:active { background: #e6ebe7; }
.key.del { font-size: 30px; color: var(--muted); }

.acts { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin: 10px 0 30px; }
.act {
  min-width: 260px; min-height: 140px; padding: 20px 30px; border-radius: 20px;
  font-size: 38px; font-weight: 700; color: #fff; background: var(--green);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
}
.act:active, .act.pressed { transform: scale(.98); }
.act-break_start, .act-break_end { background: var(--blue); }
.act-out { background: #5a2e1f; }

.shifts { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; max-width: 640px; margin: 0 auto; }
.shifts ul { list-style: none; padding: 0; margin: 0; }
.shifts li { display: flex; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 20px; }
.shifts li:first-child { border-top: 0; }
.shifts li.today { font-weight: 700; }
.shifts li.past { color: var(--muted); }
.shifts .day { width: 190px; }
.shifts .what { font-variant-numeric: tabular-nums; white-space: nowrap; }
.shifts .absence { color: var(--orange); }

.confirm { min-height: 100%; display: grid; place-items: center; cursor: pointer; }
.big-confirm { text-align: center; padding: 40px 20px; }
.big-confirm .tick {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 24px;
  background: var(--green); color: #fff; font-size: 64px; line-height: 110px; font-weight: 700;
}
.big-confirm.ev-break_start .tick, .big-confirm.ev-break_end .tick { background: var(--blue); }
.big-confirm.ev-out .tick { background: #5a2e1f; }
.big-confirm .line { font-size: 46px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-confirm .note {
  display: inline-block; margin-top: 18px; padding: 8px 20px; border-radius: 999px;
  background: var(--orange-bg); color: var(--orange); font-size: 30px; font-weight: 700;
}
.big-confirm .muted { margin-top: 16px; font-size: 20px; }

@media (max-width: 600px) {
  .bar { padding: 8px 14px; }
  .shop { font-size: 16px; }
  .now { font-size: 22px; }
  .screen { padding: 14px; }
  .back { position: static; }
  h1 { font-size: 28px; }
  .pad { grid-template-columns: repeat(3, 90px); }
  .key { height: 76px; }
  .act { min-width: 100%; min-height: 110px; font-size: 32px; }
  .big-confirm .line { font-size: 32px; }
  .shifts li { font-size: 17px; gap: 10px; }
  .shifts .day { width: auto; flex: 1; }
}
