* { box-sizing: border-box; }
body {
  margin: 0;
  background: #1a1a1a;
  color: #eee;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  max-width: 100%;
  overflow-x: hidden;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #222;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.header h1 { margin: 0; font-size: 1.3rem; }
.header a { color: #9cf; text-decoration: none; }
.header a:hover { text-decoration: underline; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 120px;
  background: #2a2a2a;
  border-radius: 12px;
  text-decoration: none;
  color: #eee;
  font-size: 1.1rem;
  padding: 0.5rem;
  text-align: center;
}
.tile:active, .tile:hover { background: #333; }
.tile .icon { font-size: 2.2rem; }
.tile .name { word-break: break-word; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: #666; }
.dot.up { background: #3c3; }
.dot.down { background: #666; }

.login {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}
.login input, .login button {
  padding: 0.9rem 1rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2a2a2a;
  color: #eee;
}
.login button {
  background: #3a6ea5;
  border: none;
  cursor: pointer;
}
.login button:active { background: #2f5a87; }
.login .error { color: #f66; text-align: center; }

.help {
  max-width: 60ch;
  margin: 0 auto;
  padding: 1rem;
  line-height: 1.5;
}
.help img, .help pre { max-width: 100%; }
.back {
  display: inline-block;
  padding: 1rem;
  color: #9cf;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }
