.wa-auth-timer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
}

.wa-auth-timer[hidden],
.wa-auth-expired[hidden] {
  display: none !important;
}

.wa-auth-timer__ring {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.wa-auth-timer__svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.wa-auth-timer__track {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 3;
}

.wa-auth-timer__progress {
  fill: none;
  stroke: #25d366;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease, stroke 0.35s ease;
}

.wa-auth-timer--warning .wa-auth-timer__progress {
  stroke: #f59e0b;
}

.wa-auth-timer--critical .wa-auth-timer__progress {
  stroke: #ef4444;
}

.wa-auth-timer__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.wa-auth-timer__text {
  min-width: 0;
}

.wa-auth-timer__label {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.wa-auth-timer__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.wa-auth-expired {
  margin: 0.5rem 0 0;
  padding: 1.1rem 1rem;
  border-radius: 12px;
  text-align: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.wa-auth-expired__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffedd5;
  color: #ea580c;
}

.wa-auth-expired__title {
  margin: 0 0 0.35rem;
  font-size: 16px;
  font-weight: 700;
  color: #9a3412;
}

.wa-auth-expired__desc {
  margin: 0 0 0.9rem;
  font-size: 13px;
  line-height: 1.45;
  color: #7c2d12;
}

.wa-auth-expired__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 180px;
  padding: 0.65rem 1.1rem;
  border: none;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.wa-auth-expired__btn:hover {
  background: #1ebe5d;
}

.wa-auth-expired__btn:active {
  transform: scale(0.98);
}

.wa-auth-linked--expired > :not(.wa-auth-timer):not(.wa-auth-expired) {
  display: none !important;
}

.wa-auth-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 8px 4px;
}

.wa-auth-qr[hidden] {
  display: none !important;
}

.wa-auth-qr__frame {
  width: min(280px, 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #25d366;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-sizing: border-box;
}

.wa-auth-qr__img {
  width: 100%;
  height: auto;
  display: block;
}

.wa-auth-qr__img[hidden] {
  display: none !important;
}

.wa-auth-qr__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #64748b;
  text-align: center;
  padding: 16px;
}

.wa-auth-qr__loading[hidden] {
  display: none !important;
}

.wa-auth-qr__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #dcfce7;
  border-top-color: #25d366;
  border-radius: 50%;
  animation: wa-auth-qr-spin 0.8s linear infinite;
}

.wa-auth-qr__loading-text {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

@keyframes wa-auth-qr-spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Шаги до QR на лендинге —— */
.wa-qr-prep {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 2px 0 0;
}

.wa-qr-prep[hidden] {
  display: none !important;
}

.wa-qr-prep__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-qr-prep__step-label {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #94a3b8;
}

.wa-qr-prep__progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.wa-qr-prep__bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.wa-qr-prep__bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #cbd5e1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease, background 0.2s ease;
}

.wa-qr-prep__bar i.is-active,
.wa-qr-prep__bar i.is-done {
  transform: scaleX(1);
  background: #25d366;
}

.wa-qr-prep__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wa-qr-prep__panel[hidden] {
  display: none !important;
}

.wa-qr-prep__hero {
  text-align: center;
}

.wa-qr-prep__hero--compact {
  text-align: left;
}

.wa-qr-prep__icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background:
    radial-gradient(120% 120% at 20% 15%, #dcfce7 0%, transparent 55%),
    linear-gradient(160deg, #f0fdf4 0%, #ecfdf5 100%);
  color: #16a34a;
  border: 1px solid #bbf7d0;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.08);
}

.wa-qr-prep__icon svg {
  width: 32px;
  height: 32px;
}

.wa-qr-prep__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.wa-qr-prep__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

.wa-qr-prep__hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.wa-qr-prep__os {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wa-qr-prep__os-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.wa-qr-prep__os-card:hover {
  border-color: #86efac;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.1);
  transform: translateY(-1px);
}

.wa-qr-prep__os-card.is-selected {
  border-color: #25d366;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 70%);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.wa-qr-prep__os-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
}

.wa-qr-prep__os-card[data-prep-os='android'] .wa-qr-prep__os-icon {
  color: #3ddc84;
  background: #ecfdf5;
}

.wa-qr-prep__os-card[data-prep-os='iphone'] .wa-qr-prep__os-icon {
  color: #0f172a;
  background: #f1f5f9;
}

.wa-qr-prep__os-icon svg {
  width: 22px;
  height: 22px;
}

.wa-qr-prep__os-name {
  font-size: 14px;
  font-weight: 700;
}

.wa-qr-prep__os-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.wa-qr-prep__os-card.is-selected .wa-qr-prep__os-check {
  opacity: 1;
  transform: scale(1);
  border-color: #25d366;
  background: #25d366 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.wa-qr-prep__badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wa-qr-prep__badge--android {
  color: #15803d;
  background: #dcfce7;
}

.wa-qr-prep__badge--ios {
  color: #1e293b;
  background: #e2e8f0;
}

.wa-qr-prep__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-qr-prep__li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.wa-qr-prep__num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #25d366;
}

.wa-qr-prep__li-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
}

.wa-qr-prep__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}

.wa-qr-prep__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #2fe074 0%, #25d366 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.28);
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.wa-qr-prep__btn:hover {
  filter: brightness(0.97);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.34);
}

.wa-qr-prep__btn:active {
  transform: scale(0.985);
}

.wa-qr-prep__btn--ghost {
  background: #fff;
  color: #64748b;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  font-weight: 600;
}

.wa-qr-prep__btn--ghost:hover {
  background: #f8fafc;
  color: #334155;
  filter: none;
  box-shadow: none;
}

.wa-qr-prep__secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wa-qr-prep__link {
  border: none;
  background: transparent;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #cbd5e1;
}

.wa-qr-prep__link:hover {
  color: #0f172a;
  text-decoration-color: #94a3b8;
}

@media (max-width: 480px) {
  .wa-qr-prep__os {
    grid-template-columns: 1fr;
  }

  .wa-qr-prep__title {
    font-size: 17px;
  }
}
