:root {
  --bg: #0f172a;
  --card: #1e293b;
  --card-2: #273449;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --danger: #f87171;
  --ok: #4ade80;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.screen-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.card__title { margin: 0 0 4px; font-size: 22px; }
.card__hint { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

/* maska PIN */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 20px;
  min-height: 18px;
}
.pin-dots .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  transition: background 0.1s, border-color 0.1s, transform 0.1s;
}
.pin-dots .dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* klawiatura */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.key {
  appearance: none;
  border: none;
  background: var(--card-2);
  color: var(--text);
  font-size: 22px;
  padding: 16px 0;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s, transform 0.05s;
}
.key:hover { background: #324155; }
.key:active { transform: scale(0.96); }
.key--action { color: var(--muted); font-size: 18px; }

.message {
  min-height: 20px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--danger);
}
.message.ok { color: var(--ok); }

/* przyciski / formularze */
.btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  cursor: pointer;
  background: var(--card-2);
  color: var(--text);
}
.btn--primary { background: var(--accent); color: #06283d; font-weight: 600; width: 100%; }
.btn--ghost { background: transparent; color: var(--muted); }
.btn--small { background: var(--card-2); font-size: 12px; padding: 6px 10px; float: right; }
.btn--danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); padding: 6px 10px; font-size: 12px; }
.btn:active { transform: scale(0.98); }

.text-input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #3a4a63;
  background: var(--card-2);
  color: var(--text);
  font-size: 15px;
}
.text-input:focus { outline: 2px solid var(--accent); }

/* topbar + pulpit */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--card);
  border-bottom: 1px solid #2b3a52;
}
.topbar__brand { font-weight: 600; }

.pulpit { padding: 60px 24px; text-align: center; }
.pulpit__title { font-size: 34px; margin: 0 0 8px; }
.pulpit__sub { color: var(--muted); }

/* admin */
.admin { max-width: 720px; margin: 0 auto; padding: 24px; }
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.panel__title { margin: 0 0 14px; font-size: 17px; }
.panel__hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .text-input { flex: 1; min-width: 140px; margin-bottom: 0; }
.form-row .btn { width: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #2b3a52;
  font-size: 14px;
}
.list li:last-child { border-bottom: none; }
.list .meta { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
