/* LinkHop Pro — activation, live codes and console */
.pro-shell {
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  padding-bottom: 56px;
}

.pro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 10px;
}

.pro-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pro-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.pro-link:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-deep);
  text-decoration: none;
}

.pro-link svg {
  width: 15px;
  height: 15px;
}

.pro-kicker {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.pro-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 850;
}

.pro-title .accent {
  color: var(--brand);
}

.pro-subtitle {
  margin: 14px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.pro-badge.is-green {
  border-color: #b7eadf;
  background: var(--mint-soft);
  color: #087a6c;
}

.pro-badge.is-amber {
  border-color: #f5d9a8;
  background: #fff8e8;
  color: #9a5b00;
}

.pro-badge.is-red {
  border-color: #f3c0ba;
  background: var(--danger-soft);
  color: var(--danger);
}

.pro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Activation */
.activate-shell {
  width: min(100% - 32px, 1020px);
  margin: 0 auto;
  padding: 22px 0 64px;
}

.activate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 20px;
}

.activate-intro {
  padding: 34px 34px 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #102a63 0%, #1d4ed8 58%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 26px 60px rgba(30, 64, 175, 0.24);
  position: relative;
  overflow: hidden;
}

.activate-intro::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.35), transparent 62%);
}

.activate-intro .pro-kicker {
  color: #a5c4ff;
}

.activate-intro h2 {
  margin: 0;
  max-width: 420px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.activate-intro p {
  margin: 15px 0 0;
  max-width: 430px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.8;
}

.activate-benefits {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  position: relative;
  z-index: 1;
}

.activate-benefits li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
}

.activate-benefits svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #5eead4;
}

.activate-footnote {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

.activate-card {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.activate-card h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.activate-card .hint {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13.5px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field > span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.field .optional {
  margin-left: 5px;
  color: var(--muted-light);
  font-weight: 500;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-light);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-ring);
}

.textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.65;
}

.code-input {
  text-align: center;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 12px;
}

.pro-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.pro-button:hover {
  background: var(--brand-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.pro-button:active {
  transform: translateY(0);
}

.pro-button:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}

.pro-button svg {
  width: 17px;
  height: 17px;
}

.pro-button.is-block {
  width: 100%;
}

.pro-button.is-ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: none;
}

.pro-button.is-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: #fff;
}

.pro-button.is-danger {
  border-color: #f3c0ba;
  background: #fff;
  color: var(--danger);
  box-shadow: none;
}

.pro-button.is-danger:hover {
  background: var(--danger-soft);
}

.pro-button.is-small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: 10px;
  box-shadow: none;
}

.pro-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f3c0ba;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}

.pro-note {
  margin: 12px 0 0;
  color: var(--muted-light);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.activate-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted-light);
  font-size: 12px;
}

.activate-divider::before,
.activate-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.activate-result {
  text-align: center;
  padding: 8px 0 0;
}

.result-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
  border: 1px solid #b7eadf;
}

.result-mark svg {
  width: 30px;
  height: 30px;
}

.secret-box {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 14px;
  border: 1px dashed #b9c8e8;
  border-radius: 12px;
  background: #f7f9ff;
  text-align: left;
}

.secret-box .secret-label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.secret-value {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.secret-value code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.copy-mini {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 650;
}

.copy-mini:hover {
  color: var(--brand-deep);
  border-color: var(--brand);
}

/* Console */
.console-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 22px;
  flex-wrap: wrap;
}

.console-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.console-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.console-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.console-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.console-stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.console-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.console-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.console-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.console-tabs::-webkit-scrollbar {
  display: none;
}

.console-tab {
  flex: 1 0 auto;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.console-tab.is-active {
  background: var(--surface);
  color: var(--brand-deep);
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.08);
}

.console-tab .tab-num {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 10.5px;
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.panel-body {
  padding: 18px;
}

.empty-state {
  padding: 46px 20px;
  text-align: center;
}

.empty-state .empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-state .empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty-state h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.empty-state p {
  margin: 0 auto;
  max-width: 360px;
  color: var(--muted);
  font-size: 13px;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.live-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.live-card:hover {
  border-color: #c7d7fb;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.07);
  transform: translateY(-1px);
}

.live-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.live-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.live-card-title strong {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-card-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--brand-deep);
  font-size: 12.5px;
  font-weight: 650;
  overflow: hidden;
}

.live-card-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-card-link button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px;
  display: grid;
  place-items: center;
}

.live-card-link button:hover {
  color: var(--brand-deep);
}

.live-card-link svg {
  width: 14px;
  height: 14px;
}

.live-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.live-card-meta b {
  color: var(--ink-soft);
  font-weight: 700;
}

.live-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.live-card-actions .pro-button {
  flex: 1;
}

/* Editor drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.drawer-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  height: 100%;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  box-shadow: -30px 0 80px rgba(15, 23, 42, 0.18);
  animation: drawer-in 0.22s ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.drawer-head h2 {
  margin: 0;
  font-size: 17px;
}

.drawer-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 30px;
}

.drawer-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.form-section {
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.form-section-title h3 {
  margin: 0;
  font-size: 14px;
}

.form-section-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented label,
.segmented button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label.is-active,
.segmented button.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
  box-shadow: 0 0 0 1px var(--brand);
}

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

.switch-row + .switch-row {
  border-top: 1px solid var(--line);
}

.switch-copy strong {
  display: block;
  font-size: 13px;
}

.switch-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d8dee9;
  transition: background 0.16s;
  cursor: pointer;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
  transition: transform 0.16s;
}

.switch input:checked + span {
  background: var(--brand);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.target-list {
  display: grid;
  gap: 10px;
}

.target-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
}

.target-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.target-item-head strong {
  font-size: 12.5px;
}

.target-item-head .target-tools {
  display: flex;
  gap: 4px;
}

.target-item .form-grid {
  gap: 8px;
}

.target-item .field {
  margin-bottom: 0;
}

.target-item .input,
.target-item .select {
  padding: 8px 10px;
  font-size: 12.5px;
  background: #fff;
}

.qr-upload {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.qr-thumb {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

.qr-upload .pro-button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.qr-upload input[type="file"] {
  display: none;
}

.add-target {
  width: 100%;
  margin-top: 4px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  padding: 10px;
  font-size: 12.5px;
  font-weight: 650;
}

.add-target:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.help-text {
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.6;
}

.drawer-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f3c0ba;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
}

/* Stats drawer */
.stat-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.stat-summary div {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.stat-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stat-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 130px;
  padding: 12px 4px 0;
  border-bottom: 1px solid var(--line);
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 100%;
}

.chart-bar i {
  display: block;
  width: 100%;
  max-width: 26px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  min-height: 2px;
}

.chart-bar em {
  font-style: normal;
  color: var(--muted-light);
  font-size: 9px;
  white-space: nowrap;
  transform: scale(0.9);
}

.chart-bar b {
  font-size: 9px;
  font-weight: 700;
  color: var(--brand-deep);
}

.target-bars {
  display: grid;
  gap: 9px;
  margin-top: 6px;
}

.target-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.target-bar-row .bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-bar-track {
  grid-column: span 2;
  height: 7px;
  border-radius: 999px;
  background: #eef1f6;
  overflow: hidden;
}

.target-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #0f9f8f);
}

.recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.recent-list li:last-child {
  border-bottom: 0;
}

.recent-list span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.api-key-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-soft);
}

.api-key-box code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.api-links {
  display: grid;
  gap: 8px;
}

.api-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.api-link-row code {
  font-size: 12px;
  font-weight: 650;
  color: var(--brand-deep);
}

.api-link-row p {
  margin: 2px 0 0;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11.5px;
}

/* Toast */
.pro-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.24);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.pro-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Public live page */
.live-shell {
  width: min(100% - 28px, 460px);
  margin: 0 auto;
  padding: 18px 0 40px;
}

.live-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 18px;
}

.live-card-main {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12);
}

.live-card-hero {
  padding: 26px 22px 20px;
  text-align: center;
  background:
    radial-gradient(400px 200px at 50% -10%, rgba(37, 99, 235, 0.13), transparent 70%),
    linear-gradient(180deg, #f8fbff, #fff);
  border-bottom: 1px solid var(--line);
}

.live-avatar {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #2563eb, #4f8df9);
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.live-avatar svg {
  width: 30px;
  height: 30px;
}

.live-card-hero h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.live-card-hero p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.live-notice {
  margin: 14px 20px 0;
  padding: 9px 11px;
  border: 1px solid #f5d9a8;
  border-radius: 9px;
  background: #fffaf0;
  color: #8a5300;
  font-size: 12px;
  text-align: center;
}

.live-body {
  padding: 22px;
  text-align: center;
}

.live-qr-frame {
  width: min(100%, 290px);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.09);
}

.live-qr-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.live-qr-fallback {
  width: min(100%, 290px);
  min-height: 220px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--muted);
}

.live-qr-fallback svg {
  width: 48px;
  height: 48px;
  color: var(--brand);
}

.live-target-name {
  margin: 16px 0 0;
  font-size: 17px;
  font-weight: 750;
}

.live-target-kind {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.live-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 13px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.live-action:hover {
  background: var(--brand-deep);
  color: #fff;
  text-decoration: none;
}

.live-action.is-ghost {
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  box-shadow: none;
}

.live-hint {
  margin: 14px 0 0;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.7;
}

.live-footer {
  padding: 18px 0 0;
  text-align: center;
  color: var(--muted-light);
  font-size: 11.5px;
}

.live-footer a {
  color: var(--muted);
  text-decoration: none;
}

/* Code page (single live code stats for owner) */
.code-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.code-stat-grid .console-stat {
  padding: 12px;
}

.code-stat-grid .console-stat strong {
  font-size: 20px;
}

/* Responsive */
@media (max-width: 880px) {
  .activate-grid {
    grid-template-columns: 1fr;
  }
  .activate-intro {
    padding: 26px;
  }
  .console-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pro-shell {
    width: min(100% - 22px, 1120px);
    padding-bottom: 40px;
  }
  .pro-header {
    padding-top: 14px;
  }
  .pro-header .brand-en {
    display: none;
  }
  .pro-link {
    padding: 7px 9px;
    font-size: 12px;
  }
  .activate-shell {
    width: min(100% - 22px, 1020px);
    padding-top: 14px;
  }
  .activate-card {
    padding: 22px 18px;
    border-radius: 20px;
  }
  .activate-intro {
    border-radius: 20px;
  }
  .console-hero {
    margin-top: 4px;
  }
  .console-stats {
    gap: 8px;
  }
  .console-stat {
    padding: 12px;
  }
  .console-stat strong {
    font-size: 22px;
  }
  .console-tabs {
    position: sticky;
    top: 8px;
    z-index: 20;
  }
  .drawer-panel {
    width: 100%;
  }
  .drawer-body {
    padding: 14px 14px 26px;
  }
  .drawer-head,
  .drawer-foot {
    padding-left: 14px;
    padding-right: 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: span 1;
  }
  .stat-summary {
    gap: 6px;
  }
  .stat-summary div {
    padding: 9px;
  }
  .stat-summary strong {
    font-size: 17px;
  }
  .api-link-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .api-link-row .pro-button {
    width: 100%;
  }
  .live-card-actions .pro-button {
    flex: 1 1 40%;
  }
  .live-shell {
    padding-top: 10px;
  }
  .live-body {
    padding: 18px;
  }
}

/* Additions: activation details, console API sample, QR modal */
.pro-header-nav button.pro-link {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.recover-summary {
  cursor: pointer;
  padding: 10px 0;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  list-style: none;
}

.recover-summary::-webkit-details-marker {
  display: none;
}

.recover-summary::after {
  content: "＋";
  margin-left: 5px;
  color: var(--muted);
}

details[open] .recover-summary::after {
  content: "－";
}

.api-sample {
  margin: 12px 0;
  padding: 13px 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #cfe0ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.target-item .field {
  min-width: 0;
}

.target-item .field > span {
  font-size: 11px;
}

.target-item .switch {
  margin-top: 4px;
}

.live-page {
  background:
    radial-gradient(700px 380px at 50% -10%, rgba(37, 99, 235, 0.12), transparent 70%),
    var(--bg, #f6f8fb);
  min-height: 100vh;
}

.live-qr-frame {
  display: block;
  text-decoration: none;
  transition: box-shadow 0.16s, transform 0.16s;
}

.live-qr-frame:hover {
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.13);
  transform: translateY(-1px);
}

.live-qr-frame img {
  max-width: 100%;
}

.live-qr-fallback p {
  text-align: center;
  color: var(--muted);
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.qr-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 370px);
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  animation: qr-in 0.18s ease-out;
}

@keyframes qr-in {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.qr-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.qr-modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.qr-modal-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.qr-modal-code {
  width: min(100%, 286px);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.qr-modal-code svg {
  display: block;
  width: 100%;
  height: auto;
}

.qr-modal-url {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px;
  word-break: break-all;
}

.qr-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.qr-modal-actions .pro-button {
  flex: 1;
}

.live-footer .copy-mini {
  margin-top: 4px;
}

/* Admin: activation codes and spaces */
.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
}

.admin-section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.admin-section-head p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.code-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.code-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.code-stat strong {
  color: var(--ink);
  font-size: 12px;
}

.code-stat.is-unused { border-color: #bfe8d8; background: #f2fcf8; color: #0b7a63; }
.code-stat.is-used { border-color: #c9d9ff; background: #f3f7ff; color: #1d4ed8; }
.code-stat.is-expired { border-color: #f0dcc0; background: #fffaf1; color: #a16207; }
.code-stat.is-revoked { border-color: #f3c9c4; background: #fff6f5; color: #b42318; }

.code-gen-form {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1.2fr) 190px auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.code-gen-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.code-gen-form label > span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
}

.code-gen-form input {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.code-gen-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.code-gen-button {
  min-height: 38px;
  padding: 8px 16px;
  white-space: nowrap;
}

.code-batch-result {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #bfe8d8;
  border-radius: 14px;
  background: #f4fdf9;
}

.code-batch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.code-batch-head strong {
  font-size: 13.5px;
}

.code-batch-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.code-batch-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.code-batch-result textarea {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #cfe7dd;
  border-radius: 10px;
  background: #fff;
  color: #0f3d33;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.8;
  resize: vertical;
}

.code-toolbar {
  margin-top: 16px;
}

.code-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-filter-row select {
  min-height: 38px;
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
}

.code-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.check-line input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.code-action-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.code-list,
.space-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.code-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.code-item.is-used { border-left: 3px solid #4f7cf7; }
.code-item.is-unused { border-left: 3px solid #18a37e; }
.code-item.is-expired { border-left: 3px solid #d9a441; opacity: 0.82; }
.code-item.is-revoked { border-left: 3px solid #e28a80; opacity: 0.72; }

.code-item-check {
  padding-top: 2px;
}

.code-item-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.code-item-main {
  flex: 1;
  min-width: 0;
}

.code-value {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.code-value code {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f3f6fb;
  color: #1e3a8a;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  word-break: break-all;
}

.code-badge {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.code-badge.is-unused { background: #e8fbf4; color: #0b7a63; }
.code-badge.is-used { background: #eef3ff; color: #1d4ed8; }
.code-badge.is-expired { background: #fff6e5; color: #a16207; }
.code-badge.is-revoked { background: #fff0ee; color: #b42318; }

.code-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  word-break: break-word;
}

.code-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.load-more-button {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.load-more-button:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

.space-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.space-item.is-disabled {
  border-color: #f3c9c4;
  background: #fffafa;
}

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

.space-name {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0;
  font-size: 15px;
}

.space-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.space-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.space-stats span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfd;
  color: var(--muted);
  font-size: 11px;
}

.space-stats b {
  color: var(--ink);
}

.space-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

@media (max-width: 980px) {
  .code-gen-form {
    grid-template-columns: 1fr 1fr;
  }
  .code-gen-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .admin-section-head {
    flex-direction: column;
  }
  .code-stats {
    justify-content: flex-start;
  }
  .code-gen-form {
    grid-template-columns: 1fr;
  }
  .code-batch-head {
    flex-direction: column;
  }
  .code-item {
    flex-wrap: wrap;
  }
  .code-item-main {
    flex-basis: calc(100% - 30px);
  }
  .code-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .space-head {
    flex-direction: column;
  }
  .code-toolbar {
    align-items: stretch;
  }
}
