* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}

/* ---- display page: white on black, fills any viewport, no chrome ---- */
.display-body {
  background: #000;
  color: #fff;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#time {
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

/* ---- login page ---- */
.login-body {
  background: #111;
  color: #eee;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form {
  background: #1c1c1c;
  padding: 2rem;
  border-radius: 8px;
  width: min(320px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-form h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  text-align: center;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.login-form input {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #444;
  background: #0d0d0d;
  color: #eee;
}

.login-form button {
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: none;
  border-radius: 4px;
  background: #2f7dea;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.login-form .error {
  display: none;
  color: #ff6b6b;
  font-size: 0.85rem;
  margin: 0;
}

/* ---- control page ---- */
.control-body {
  background: #f5f5f5;
  color: #111;
  min-height: 100vh;
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: #111;
  color: #fff;
}

.control-header h1 { margin: 0; font-size: 1.1rem; }

.link-button {
  background: none;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.control-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#readout {
  font-family: "Courier New", Courier, monospace;
  font-size: 4rem;
  font-weight: 700;
}

.state-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  color: #666;
}

.button-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.button-row button {
  padding: 0.6rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
}

.button-row button:hover { background: #eee; }

.set-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.set-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.set-form input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 8ch;
}

.set-form button {
  padding: 0.55rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.account-panel {
  width: 100%;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
}

.account-panel h2 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.account-panel code {
  background: #eee;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.account-panel pre {
  background: #eee;
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.8rem;
}
