* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: #0b141a;
  color: #e9edef;
  direction: rtl;
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #202c33;
  border-bottom: 1px solid #2a3942;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: #25d366;
}

.status-wrap { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #888;
  box-shadow: 0 0 0 3px rgba(255,255,255,.05);
}
.dot.ready { background: #25d366; }
.dot.qr { background: #f0b429; }
.dot.initializing { background: #4aa3df; }
.dot.disconnected { background: #e74c3c; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  display: grid;
  gap: 20px;
}

.card {
  background: #111b21;
  border: 1px solid #2a3942;
  border-radius: 14px;
  padding: 20px;
}

.card h2 { margin: 0 0 12px; font-size: 17px; color: #d1d7db; }

.muted { color: #8696a0; font-size: 14px; }

.ok-big { font-size: 18px; color: #25d366; font-weight: 700; text-align: center; padding: 24px 0; }

#qrBox {
  display: flex; align-items: center; justify-content: center;
  min-height: 320px;
  background: #fff;
  border-radius: 12px;
  margin: 8px 0 4px;
  padding: 12px;
}
#qrBox img { width: 300px; height: 300px; image-rendering: pixelated; }

#meBox {
  display: none;
  margin-top: 10px;
  background: #202c33;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: #25d366;
}

label { display: block; margin: 12px 0 6px; font-size: 14px; color: #8696a0; }

input[type="text"], textarea {
  width: 100%;
  background: #202c33;
  border: 1px solid #2a3942;
  color: #e9edef;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
input:focus, textarea:focus { border-color: #25d366; }
textarea { resize: vertical; min-height: 110px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 200px; }

button {
  margin-top: 14px;
  background: #25d366;
  color: #0b141a;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
button:hover { background: #1ebe5b; }
button:disabled { opacity: .6; cursor: default; }

#restart {
  margin: 0;
  background: transparent;
  color: #8696a0;
  border: 1px solid #2a3942;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 13px;
}
#restart:hover { color: #e9edef; border-color: #8696a0; }

.result {
  margin-top: 12px;
  font-size: 14px;
  color: #8696a0;
  white-space: pre-line;
}
.result.ok { color: #25d366; }
.result.err { color: #e74c3c; }

.tabs { display: flex; gap: 8px; margin-bottom: 8px; }
