#cbt-login-preparation {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.12), transparent 34%),
    linear-gradient(145deg, #f8fafc, #eef2ff);
  color: #172554;
  opacity: 1;
  transition: opacity 240ms ease, visibility 240ms ease;
}

#cbt-login-preparation.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.cbt-preparation-card {
  width: min(100%, 440px);
  padding: 36px 32px 30px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(30, 41, 59, 0.12);
  text-align: center;
}

.cbt-preparation-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  color: #1e293b;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.cbt-preparation-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #4f46e5, #2563eb);
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.cbt-preparation-brand small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.cbt-preparation-spinner {
  position: relative;
  width: 74px;
  height: 74px;
  margin: 0 auto 23px;
  border: 5px solid #e0e7ff;
  border-top-color: #4f46e5;
  border-right-color: #3b82f6;
  border-radius: 50%;
  animation: cbt-preparation-spin 1s linear infinite;
}

.cbt-preparation-spinner::after {
  position: absolute;
  inset: 11px;
  border: 3px solid #c7d2fe;
  border-bottom-color: #818cf8;
  border-radius: 50%;
  content: "";
  animation: cbt-preparation-spin 1.5s linear infinite reverse;
}

.cbt-preparation-eyebrow {
  margin: 0 0 8px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.cbt-preparation-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.cbt-preparation-message {
  min-height: 26px;
  margin: 11px 0 20px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.cbt-preparation-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}

.cbt-preparation-progress {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #38bdf8);
  transition: width 180ms linear;
}

.cbt-preparation-progress-caption {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
}

.cbt-preparation-percent {
  color: #4338ca;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

#cbt-login-preparation[data-state="error"] .cbt-preparation-progress {
  background: #f59e0b;
}

.cbt-preparation-detail {
  margin: 13px 0 0;
  color: #64748b;
  font-size: 12px;
}

@keyframes cbt-preparation-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .cbt-preparation-card {
    padding: 30px 22px 25px;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cbt-preparation-spinner,
  .cbt-preparation-spinner::after {
    animation: none;
  }

  .cbt-preparation-progress {
    transition: none;
  }
}

#cbt-login-assets-loader {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 12%, rgba(56, 189, 248, 0.3), transparent 34%),
    radial-gradient(circle at 12% 88%, rgba(99, 102, 241, 0.22), transparent 35%),
    linear-gradient(145deg, #0f172a, #172554 58%, #1e3a8a);
  color: #0f172a;
  opacity: 1;
  transition: opacity 280ms ease, visibility 280ms ease;
}

#cbt-login-assets-loader.is-leaving {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cbt-login-assets-card {
  width: min(100%, 470px);
  padding: 32px 30px 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
  text-align: center;
  animation: cbt-login-card-enter 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cbt-login-assets-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  text-align: left;
}

.cbt-login-assets-brand strong,
.cbt-login-assets-brand small {
  display: block;
}

.cbt-login-assets-brand strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cbt-login-assets-brand small {
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.cbt-login-assets-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #4f46e5, #0284c7);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.3);
  color: #fff;
  font-size: 21px;
  font-weight: 850;
}

.cbt-login-assets-eyebrow {
  margin: 0 0 7px;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.cbt-login-assets-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(22px, 5vw, 27px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.cbt-login-assets-message {
  min-height: 22px;
  margin: 9px 0 0;
  color: #475569;
  font-size: 13px;
}

.cbt-login-transfer-scene {
  position: relative;
  display: grid;
  width: min(100%, 350px);
  height: 134px;
  grid-template-columns: 76px minmax(100px, 1fr) 92px;
  align-items: center;
  margin: 20px auto 18px;
}

.cbt-login-server {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  padding: 10px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(150deg, #eff6ff, #dbeafe);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.cbt-login-server i {
  position: relative;
  display: block;
  height: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff, #f8fafc);
}

.cbt-login-server i::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 7px rgba(34, 197, 94, 0.75);
  content: "";
}

.cbt-login-node-label {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.cbt-login-transfer-lane {
  position: relative;
  height: 72px;
  overflow: hidden;
}

.cbt-login-transfer-lane::before {
  position: absolute;
  top: 50%;
  right: 3px;
  left: 3px;
  height: 2px;
  background: linear-gradient(90deg, #60a5fa, #818cf8, #38bdf8);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  content: "";
  transform: translateY(-50%);
}

.cbt-login-transfer-lane span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 28px;
  border: 1px solid #818cf8;
  border-radius: 4px 4px 7px 4px;
  background: linear-gradient(145deg, #fff, #dbeafe);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  animation: cbt-login-file-transfer 1.65s ease-in-out infinite;
  transform: translateY(-50%);
}

.cbt-login-transfer-lane span::after {
  position: absolute;
  top: 6px;
  right: 4px;
  left: 4px;
  height: 2px;
  background: #93c5fd;
  box-shadow: 0 5px #c4b5fd, 0 10px #bfdbfe;
  content: "";
}

.cbt-login-transfer-lane span:nth-child(2) {
  animation-delay: 550ms;
}

.cbt-login-transfer-lane span:nth-child(3) {
  animation-delay: 1100ms;
}

.cbt-login-device {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.cbt-login-device-screen {
  display: grid;
  width: 66px;
  height: 48px;
  place-items: center;
  border: 4px solid #334155;
  border-radius: 7px;
  background: linear-gradient(145deg, #e0f2fe, #eef2ff);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  color: #4338ca;
  font-size: 11px;
  font-weight: 900;
  animation: cbt-login-device-glow 2s ease-in-out infinite;
}

.cbt-login-device-base {
  width: 78px;
  height: 5px;
  margin-top: 3px;
  border-radius: 0 0 7px 7px;
  background: #64748b;
}

.cbt-login-assets-caption {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
}

.cbt-login-assets-caption strong {
  color: #4338ca;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.cbt-login-assets-track {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}

.cbt-login-assets-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #0ea5e9, #22c55e);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
  transition: width 220ms ease;
}

.cbt-login-assets-detail {
  margin: 10px 0 0;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
}

.cbt-login-assets-note {
  margin: 7px 0 0;
  color: #94a3b8;
  font-size: 10px;
}

@keyframes cbt-login-file-transfer {
  0% { left: 0; opacity: 0; transform: translateY(-50%) scale(0.72) rotate(-9deg); }
  16% { opacity: 1; }
  82% { opacity: 1; }
  100% { left: calc(100% - 24px); opacity: 0; transform: translateY(-50%) scale(1) rotate(8deg); }
}

@keyframes cbt-login-device-glow {
  0%, 100% { box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16); }
  50% { box-shadow: 0 0 24px rgba(56, 189, 248, 0.55); }
}

@keyframes cbt-login-card-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
  #cbt-login-assets-loader { padding: 16px; }
  .cbt-login-assets-card { padding: 27px 20px 22px; border-radius: 22px; }
  .cbt-login-transfer-scene { grid-template-columns: 68px minmax(70px, 1fr) 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .cbt-login-assets-card,
  .cbt-login-transfer-lane span,
  .cbt-login-device-screen {
    animation: none;
  }

  .cbt-login-assets-track span {
    transition: none;
  }
}
