/* Big, plain and calm: large text, one thing at a time, colour plus a picture for every status. */
:root {
  --bg: #f6f8f7;
  --card: #ffffff;
  --text: #1b1f1d;
  --muted: #4c5752;
  --line: #cfd8d4;
  --green: #17803d;
  --green-soft: #e3f4e8;
  --blue: #1d4ed8;
  --blue-soft: #e4ecfd;
  --amber: #a15c00;
  --amber-soft: #fdf1dc;
  --red: #b42318;
  --red-soft: #fde7e5;
  --grey-soft: #eef1f0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 20px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
main { max-width: 34rem; margin: 0 auto; padding: 1rem 16px 3rem; }

.top {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 16px; background: var(--green); color: #fff; font-size: 1.1rem; font-weight: bold;
}
.logo { font-size: 1.4rem; }

h1 { font-size: 1.6rem; margin: 0.6rem 0 1rem; }
.small { font-size: 0.85rem; color: var(--muted); }
.hint { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.9rem; }

/* Sign in */
.step { display: flex; gap: 0.8rem; margin-bottom: 1.4rem; }
.step-number {
  flex: 0 0 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: bold; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.step-body { flex: 1; min-width: 0; }
label { display: block; font-weight: bold; font-size: 1.15rem; }
input {
  width: 100%; font: inherit; font-size: 1.5rem; letter-spacing: 0.08em;
  padding: 0.5rem 0.7rem; border: 3px solid var(--line); border-radius: 12px; background: #fff; color: var(--text);
}
input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.good { color: var(--green); font-weight: bold; margin: 0.3rem 0 0; }
.problem {
  background: var(--red-soft); color: var(--red); border-left: 6px solid var(--red);
  padding: 0.7rem 0.9rem; border-radius: 8px; font-weight: bold;
}

.big-button {
  width: 100%; font: inherit; font-size: 1.3rem; font-weight: bold;
  padding: 0.9rem; border: 0; border-radius: 14px; background: var(--green); color: #fff; cursor: pointer;
}
.big-button:disabled { opacity: 0.6; cursor: default; }
.big-button:focus-visible, .call-button:focus-visible, .plain-button:focus-visible { outline: 4px solid var(--blue); outline-offset: 3px; }
.call-button {
  display: block; text-align: center; text-decoration: none; margin: 0.6rem 0;
  font-size: 1.2rem; font-weight: bold; padding: 0.8rem; border-radius: 14px;
  background: var(--blue); color: #fff;
}
.plain-button {
  display: block; margin: 1.5rem auto 0; font: inherit; font-size: 1rem;
  background: none; border: 2px solid var(--line); border-radius: 10px; padding: 0.5rem 1.2rem; color: var(--muted); cursor: pointer;
}

.help-box { margin-top: 2rem; padding: 1rem; background: var(--card); border: 2px solid var(--line); border-radius: 14px; }
.help-box p { margin: 0.2rem 0; }

/* Repairs */
.repair { background: var(--card); border: 3px solid var(--line); border-radius: 16px; padding: 1rem; margin-bottom: 1.2rem; }
.repair h2 { font-size: 1.3rem; margin: 0 0 0.6rem; }
.repair .ticket { font-size: 0.85rem; color: var(--muted); margin: -0.4rem 0 0.6rem; }
.state { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem; border-radius: 12px; }
.state-icon { font-size: 2.2rem; line-height: 1; }
.state-words strong { display: block; font-size: 1.3rem; }
.state-words span { font-size: 0.95rem; }

.state.ready { background: var(--green-soft); color: var(--green); }
.repair.ready { border-color: var(--green); }
.state.working { background: var(--blue-soft); color: var(--blue); }
.state.waiting { background: var(--amber-soft); color: var(--amber); }
.state.call { background: var(--red-soft); color: var(--red); }
.repair.call { border-color: var(--red); }
.state.done { background: var(--grey-soft); color: var(--muted); }

/* Progress: checked in, working, ready, picked up */
.progress { display: flex; gap: 0.3rem; margin: 0.9rem 0 0.3rem; }
.progress span { flex: 1; height: 0.6rem; border-radius: 99px; background: var(--grey-soft); }
.progress span.on { background: var(--green); }
.progress-words { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }

.charges { width: 100%; border-collapse: collapse; margin-top: 0.9rem; font-size: 0.95rem; }
.charges td { padding: 0.35rem 0.2rem; border-bottom: 1px solid var(--line); }
.charges tr:nth-child(even) td { background: #f7faf8; }
.charges td:last-child { text-align: right; white-space: nowrap; }
.charges .total td { font-weight: bold; font-size: 1.1rem; border-bottom: 0; }
.charges-note { font-size: 0.8rem; color: var(--muted); margin: 0.3rem 0 0; }

/* A repair whose status changed while the page was open */
.changed-note {
  display: inline-block; margin: 0 0 0.6rem; padding: 0.25rem 0.7rem; border-radius: 99px;
  background: var(--blue); color: #fff; font-weight: bold; font-size: 0.9rem;
}
.repair.changed { box-shadow: 0 0 0 4px var(--blue-soft); animation: arrive 1.2s ease-out 1; }
@keyframes arrive { from { transform: scale(0.97); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .repair.changed { animation: none; } }

/* Calm message on the sign-in screen (for example after being signed out) */
.notice {
  background: var(--blue-soft); color: var(--blue); border-left: 6px solid var(--blue);
  padding: 0.7rem 0.9rem; border-radius: 8px; font-weight: bold;
}
