* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: rgba(0, 0, 0, 0.9);
  background: #f5f7fa;
}

button {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #0052d9;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-panel {
  width: min(460px, 100%);
  padding: 34px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.login-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0052d9;
  background: #eef4ff;
  font-size: 15px;
  font-weight: 700;
}

.login-kicker {
  margin: 0 0 4px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
}

.login-panel h1,
.dashboard-header h1,
.dashboard-card h2 {
  margin: 0;
  font-weight: 600;
}

.login-panel h1 {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 0;
}

.login-panel p,
.dashboard-header p,
.dashboard-card p {
  color: rgba(0, 0, 0, 0.6);
}

.status-box {
  min-height: 44px;
  margin-top: 28px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: #f7f8fa;
  color: rgba(0, 0, 0, 0.72);
  font-size: 15px;
  line-height: 22px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #86909c;
}

.status-box[data-state="loading"] .status-dot {
  background: #0052d9;
}

.status-box[data-state="ready"] .status-dot,
.status-box[data-state="scanned"] .status-dot {
  background: #2ba471;
}

.status-box[data-state="error"] {
  background: #fff2f0;
  color: #b91c1c;
}

.status-box[data-state="error"] .status-dot {
  background: #d54941;
}

.qr-frame {
  width: 260px;
  height: 260px;
  margin: 24px auto;
  display: grid;
  place-items: center;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #fbfcff;
}

.qr-frame img {
  width: 232px;
  height: 232px;
  object-fit: contain;
}

.qr-frame[data-state="ready"] {
  background: #ffffff;
}

.qr-frame[data-state="error"] {
  border-color: #f2b8b5;
  background: #fffafa;
}

.qr-placeholder {
  width: 100%;
  height: 100%;
  padding: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  color: rgba(0, 0, 0, 0.48);
  font-size: 14px;
  line-height: 22px;
}

.qr-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #dce7ff;
  border-top-color: #0052d9;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.qr-frame[data-state="error"] .qr-spinner {
  width: 32px;
  height: 32px;
  border: 0;
  animation: none;
}

.qr-frame[data-state="error"] .qr-spinner::before {
  content: "!";
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #d54941;
  background: #ffece8;
  font-weight: 700;
}

.login-actions {
  display: flex;
  justify-content: center;
}

.login-note {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
