* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  background: #050a18;
  color: #e8eefc;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  inset: 0;
  background: radial-gradient(900px 600px at 15% 8%, rgba(47, 122, 255, 0.22) 0%, transparent 55%),
    radial-gradient(700px 500px at 85% 18%, rgba(180, 80, 255, 0.18) 0%, transparent 50%),
    linear-gradient(165deg, #060d22 0%, #0a1535 45%, #120a28 100%);
}

body::after {
  width: 280px;
  height: 280px;
  right: -80px;
  top: 120px;
  border-radius: 50%;
  border: 1px solid rgba(120, 160, 255, 0.12);
  background: radial-gradient(circle, rgba(80, 140, 255, 0.08) 0%, transparent 70%);
}

.page {
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 16px 32px;
  position: relative;
  z-index: 1;
}

.page::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 200px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(100, 150, 255, 0.1);
  pointer-events: none;
}

.hero {
  text-align: center;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #5eb0ff 0%, #c08ce8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 8px 0 0;
  color: rgba(232, 238, 252, 0.7);
  font-size: 13.5px;
}

.brand {
  text-align: center;
  margin-bottom: 20px;
}

.brand-title {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #5eb0ff 0%, #8b7cff 45%, #f08adf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.brand-contact {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(232, 238, 252, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.brand-telegram {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7eb8ff;
  text-decoration: none;
  font-weight: 600;
}

.brand-telegram:hover {
  color: #a8d4ff;
}

.tg-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.nav-btn {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: filter 120ms ease, transform 120ms ease;
}

.nav-btn:active {
  transform: translateY(1px);
}

.nav-btn-add {
  background: linear-gradient(180deg, #8b4dff 0%, #6a2fd4 100%);
  box-shadow: 0 10px 28px rgba(123, 54, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-btn-settings {
  background: rgba(30, 55, 110, 0.65);
  border-color: rgba(120, 160, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.nav-btn-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.15);
}

.nav-btn-icon-gear {
  font-size: 14px;
  background: transparent;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: rgba(18, 32, 68, 0.55);
  border: 1px solid rgba(120, 160, 255, 0.14);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
}

.card-main {
  background: linear-gradient(145deg, rgba(22, 42, 88, 0.75) 0%, rgba(14, 28, 58, 0.85) 100%);
  border-color: rgba(100, 160, 255, 0.18);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card-heading {
  font-weight: 700;
  font-size: 16px;
  color: #f0f4ff;
}

.pill {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pill-blue {
  background: rgba(53, 122, 255, 0.22);
  color: #9cc1ff;
}
.pill-green {
  background: rgba(21, 204, 121, 0.2);
  color: #8cf3c0;
}
.pill-purple {
  background: rgba(142, 75, 255, 0.2);
  color: #d3b6ff;
}
.pill-amber {
  background: rgba(255, 193, 7, 0.16);
  color: rgba(255, 214, 102, 0.95);
}
.pill-red {
  background: rgba(255, 90, 90, 0.18);
  color: #ffb4b4;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label {
  font-size: 12px;
  color: rgba(232, 238, 252, 0.72);
  margin-top: 2px;
}

.hint {
  font-size: 11px;
  color: rgba(232, 238, 252, 0.55);
  line-height: 1.4;
}

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.icon {
  opacity: 0.75;
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

input,
textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #e8eefc;
  font-size: 14px;
}

textarea {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.45;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.field {
  margin-top: 10px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
  color: white;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
  user-select: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(180deg, #3d8fff 0%, #1a6ef0 55%, #1558d4 100%);
  box-shadow: 0 16px 36px rgba(47, 122, 255, 0.4);
  font-size: 16px;
  letter-spacing: 0.2px;
}

.btn-get-acc {
  gap: 10px;
}

.btn-get-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.btn-get-icon svg {
  width: 26px;
  height: 26px;
  color: rgba(220, 235, 255, 0.95);
}

.btn-success {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(180deg, #1aa85e 0%, #13864a 100%);
  box-shadow: 0 14px 30px rgba(26, 168, 94, 0.18);
}

.btn-purple {
  padding: 12px 14px;
  background: linear-gradient(180deg, #7b36ff 0%, #5c24cf 100%);
  box-shadow: 0 14px 30px rgba(123, 54, 255, 0.18);
}

.btn-orange {
  padding: 12px 14px;
  background: linear-gradient(180deg, #e67e22 0%, #c06512 100%);
}

.btn-danger {
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(180deg, #e74c5a 0%, #b82a38 100%);
  box-shadow: 0 12px 28px rgba(231, 76, 90, 0.22);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(232, 238, 252, 0.92);
  padding: 10px 12px;
}

.btn-small {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.btn-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.codebox {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.codevalue {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-weight: 800;
  letter-spacing: 1px;
  flex: 1;
}

.ttl {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  color: rgba(232, 238, 252, 0.72);
  padding: 0 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.status {
  min-height: 18px;
  font-size: 12px;
  color: rgba(232, 238, 252, 0.7);
}

.status.ok {
  color: rgba(140, 243, 192, 0.95);
}
.status.err {
  color: rgba(255, 165, 165, 0.95);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(232, 238, 252, 0.9);
  flex-shrink: 0;
}

.footer {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(232, 238, 252, 0.6);
}

.hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(232, 238, 252, 0.65);
}

.hint code,
.mode-option-body code {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.mode-option:has(input:checked) {
  border-color: rgba(94, 176, 255, 0.55);
  background: rgba(47, 122, 255, 0.12);
}

.mode-option input {
  margin-top: 3px;
  accent-color: #5eb0ff;
}

.mode-option-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.mode-option-body strong {
  font-weight: 700;
}

.mode-option-body small {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(232, 238, 252, 0.65);
}

.acc-panel.is-hidden {
  display: none;
}

.acc-panel {
  margin-top: 12px;
}

.acc-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acc-field .label {
  margin-bottom: 6px;
}

.code-row {
  margin-top: 12px;
  align-items: center;
}
