* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 340px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #05080d;
  color: #e7eef7;
}

.popup {
  display: grid;
  gap: 10px;
  padding: 12px;
  background:
    radial-gradient(420px 220px at 20% -10%, rgba(44, 224, 139, 0.12), transparent 60%),
    #05080d;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(13, 20, 32, 0.9);
}

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

.brand img {
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(44, 224, 139, 0.35);
}

.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
}

.tagline {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b6775;
}

.pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  color: #8b97a8;
}

.pill.ok {
  background: rgba(44, 224, 139, 0.14);
  color: #4fefa8;
}

.pill.warn {
  background: rgba(245, 185, 66, 0.14);
  color: #f5b942;
}

.pill.off {
  background: rgba(244, 91, 105, 0.14);
  color: #f45b69;
}

.card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(13, 20, 32, 0.9);
}

.banner {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(44, 224, 139, 0.25);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(44, 224, 139, 0.16), rgba(13, 20, 32, 0.9));
  color: #fff;
}

.banner strong {
  font-size: 15px;
  font-weight: 900;
}

.banner p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(231, 238, 247, 0.7);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.row strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
  color: #fff;
}

.note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #8b97a8;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(5, 8, 13, 0.6);
}

.stat strong {
  display: block;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  color: #4fefa8;
  overflow-wrap: anywhere; /* любое содержимое не должно разносить попап */
}

.stat span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  color: #8b97a8;
}

.switch {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #22324c;
  transition: background 0.15s ease;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e7eef7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease;
}

.switch input:checked + .slider {
  background: #2ce08b;
  box-shadow: 0 0 14px rgba(44, 224, 139, 0.45);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
  background: #05080d;
}

input[type="email"],
 input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(5, 8, 13, 0.6);
  color: #fff;
  outline: none;
}

input[type="email"]::placeholder,
 input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #5b6775;
}

input[type="email"]:focus,
 input[type="text"]:focus,
input[type="password"]:focus {
  border-color: rgba(44, 224, 139, 0.5);
  box-shadow: 0 0 0 3px rgba(44, 224, 139, 0.15);
}

.button {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: #2ce08b;
  color: #05080d;
}

.button.primary:hover {
  background: #4fefa8;
  box-shadow: 0 0 20px rgba(44, 224, 139, 0.4);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #e7eef7;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button.small {
  width: auto;
  padding: 7px 12px;
  font-size: 12px;
}

.error {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #f45b69;
}

.hidden {
  display: none !important;
}

#key-form {
  display: grid;
  gap: 8px;
}

#key-form strong {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

#key-form .note {
  margin: 0;
}

#key-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#key-info {
  display: grid;
  gap: 10px;
}

#key-display {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
