:root {
  --bg: #f6f5f2;
  --primary: #126e82;
  --confirm: #1b9aaa;
  --warn: #f1c453;
  --error: #d9534f;
  --text: #1e2a2f;
  --card: #ffffff;
  --surface-muted: #eceae5;
  --surface-muted-text: #243137;
  --border-subtle: #ddd9d1;
  --status-bg: #f2f3f3;
  --status-border: #d7dadb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Avenir Next', 'Nunito Sans', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 16px;
}

.container {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 26px rgba(4, 42, 56, 0.08);
}

h1 {
  margin-top: 0;
  font-size: 1.5rem;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px;
  max-height: 22px;
  border-radius: 5px;
  display: block;
  flex: 0 0 22px;
}

h2 {
  margin: 16px 0 8px;
  font-size: 1rem;
}

p {
  margin: 8px 0;
}

label {
  display: block;
  margin-top: 12px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid #d7dce1;
  border-radius: 10px;
  font-size: 1rem;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

button.primary {
  width: 100%;
  margin-top: 16px;
  background: var(--primary);
  color: white;
}

button.secondary {
  width: 100%;
  margin-top: 10px;
  background: var(--surface-muted);
  color: var(--surface-muted-text);
}

.big-checkin {
  width: 100%;
  min-height: 140px;
  font-size: 2rem;
  background: var(--primary);
  color: white;
}

.big-checkin:disabled {
  cursor: wait;
  opacity: 0.82;
}

.checkin-helper {
  margin-top: 8px;
  margin-bottom: 0;
}

.checkin-status {
  margin-top: 12px;
  border: 1px solid var(--status-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--status-bg);
}

.checkin-status-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0d5866;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkin-status-title::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #1b9aaa;
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1;
}

.checkin-status-detail {
  margin: 6px 0 0;
  color: #1c4d5c;
  font-size: 0.9rem;
  font-weight: 600;
}

.banner {
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  font-weight: 600;
}

.banner + .big-checkin {
  margin-top: 14px;
}

.banner.warning {
  background: var(--warn);
}

.banner.error {
  background: var(--error);
  color: #fff;
}

.banner.confirm {
  background: var(--confirm);
  color: #fff;
}

.hidden {
  display: none !important;
}

.small {
  font-size: 0.85rem;
  color: #4f5a5f;
}

.setup-intro {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #f8f7f4;
}

.setup-tagline {
  margin: 0 0 8px;
  font-weight: 800;
  color: #1f333a;
}

.setup-benefits {
  margin: 0 0 8px 18px;
  padding: 0;
  color: #324248;
}

.setup-benefits li {
  margin: 4px 0;
  font-size: 0.9rem;
}

.setup-intro .small {
  margin: 0;
}

.footer-links {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links-centered {
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
}

.app-version {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: #7b878d;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 28, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.modal-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.invite-modal-card {
  padding-top: 14px;
}

.invite-modal-note {
  margin-top: 4px;
}

button.text-btn {
  background: transparent;
  color: #4b5563;
  text-decoration: underline;
  font-weight: 600;
  padding: 4px;
}

.pwa-install-hint {
  margin-top: 12px;
  border: 1px solid var(--status-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--status-bg);
}

.pwa-install-hint-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0d5866;
}

.pwa-install-hint-detail {
  margin: 6px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1c4d5c;
}
