/* ==========================================================================
   IK Network Mainnet Checklist Stylesheet
   Theme: Royal Dark Purple (#190A38, #6A3199) & Emerald Green Accent (#22C55E)
   ========================================================================== */

:root {
  --bg-deep: #0e0520;
  --bg-dark: #190a38;
  --bg-surface: #22104b;
  --bg-card: #281457;
  --bg-card-hover: #311a68;
  --border-subtle: rgba(147, 51, 234, 0.22);
  --border-bright: rgba(168, 85, 247, 0.45);

  --accent-purple: #8b5cf6;
  --accent-primary: #6a3199;
  --accent-green: #22c55e;
  --accent-emerald-dark: #15803d;
  --accent-emerald-light: #4ade80;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;

  --text-pure: #ffffff;
  --text-primary: #f3f4f6;
  --text-secondary: #c4b5fd;
  --text-muted: #9ca3af;

  --badge-completed-bg: rgba(34, 197, 94, 0.16);
  --badge-completed-border: rgba(34, 197, 94, 0.45);
  --badge-completed-text: #4ade80;

  --badge-progress-bg: rgba(245, 158, 11, 0.16);
  --badge-progress-border: rgba(245, 158, 11, 0.45);
  --badge-progress-text: #fbbf24;

  --badge-pending-bg: rgba(156, 163, 175, 0.12);
  --badge-pending-border: rgba(156, 163, 175, 0.3);
  --badge-pending-text: #9ca3af;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 50% -20%, rgba(106, 49, 153, 0.5) 0%, transparent 60%),
    radial-gradient(circle at 100% 30%, rgba(34, 197, 94, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 0% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 14px 60px;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.app-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 1. Top Navigation */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

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

.nav-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-back-link:hover {
  background: var(--bg-card);
  color: #fff;
  border-color: var(--border-bright);
}

.nav-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-emerald-light);
  text-transform: uppercase;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-emerald-light);
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px #22c55e;
  animation: pulseGreen 2s infinite ease-in-out;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.explorer-link-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.explorer-link-btn:hover {
  background: rgba(139, 92, 246, 0.28);
  color: #fff;
}

.download-app-btn,
.mobile-only-download-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  min-height: 40px;
  border-radius: 9px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.download-app-btn:hover,
.mobile-only-download-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  .top-nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .download-app-btn,
  .mobile-only-download-btn {
    display: inline-flex;
    min-height: 42px;
  }
}

html.is-mobile-device .download-app-btn,
html.is-mobile-device .mobile-only-download-btn {
  display: inline-flex;
}

html.is-desktop-device .download-app-btn,
html.is-desktop-device .mobile-only-download-btn {
  display: none;
}

/* 2. Hero Balance Card */
.hero-balance-card {
  position: relative;
  background: linear-gradient(135deg, #1f0b44 0%, #2b115b 100%);
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 22px 20px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.balance-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.balance-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.balance-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.user-handle {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-emerald-light);
  background: rgba(34, 197, 94, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.balance-amount-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-symbol-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.balance-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.balance-breakdown-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.breakdown-label {
  color: var(--text-muted);
}

.breakdown-val {
  color: var(--text-primary);
  font-weight: 600;
}

.breakdown-val.green {
  color: var(--accent-emerald-light);
  font-weight: 700;
}

.breakdown-divider {
  color: rgba(255, 255, 255, 0.2);
}

/* 3. Progress Overview Card */
.progress-overview-card {
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.progress-ratio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}

.progress-fraction {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.progress-percent-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent-emerald-light);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.progress-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-track-bg {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.progress-track-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #22c55e 100%);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-footer-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 4px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.pill-dot.green { background: #22c55e; }
.pill-dot.yellow { background: #fbbf24; }
.pill-dot.gray { background: #9ca3af; }

/* 4. Checklist Toolbar */
.checklist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 3px;
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(106, 49, 153, 0.4);
}

.expand-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-toggle-btn:hover {
  background: var(--bg-surface);
  color: #ffffff;
  border-color: var(--border-bright);
}

/* 5. Checklist Items & Expandable Cards */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-card {
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.checklist-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}

.checklist-card.expanded {
  border-color: var(--accent-purple);
  box-shadow: 0 8px 24px rgba(106, 49, 153, 0.25);
}

.checklist-card.in-progress-card {
  border-color: rgba(245, 158, 11, 0.4);
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.step-num-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.step-num-circle.completed {
  background: #22c55e;
  color: #064e22;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.step-num-circle.in-progress {
  background: #f59e0b;
  color: #451a03;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
  animation: pulseAmber 2s infinite ease-in-out;
}

@keyframes pulseAmber {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.step-num-circle.pending {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.step-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Badges */
.badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-completed {
  background: var(--badge-completed-bg);
  border: 1px solid var(--badge-completed-border);
  color: var(--badge-completed-text);
}

.badge-in-progress {
  background: var(--badge-progress-bg);
  border: 1px solid var(--badge-progress-border);
  color: var(--badge-progress-text);
}

.badge-pending {
  background: var(--badge-pending-bg);
  border: 1px solid var(--badge-pending-border);
  color: var(--badge-pending-text);
}

.chevron-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.checklist-card.expanded .chevron-icon {
  transform: rotate(180deg);
  color: var(--text-pure);
}

/* Card Body (Collapsible Section) */
.card-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2px;
}

.checklist-card.expanded .card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-desc-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-top: 12px;
}

.card-meta-code {
  background: rgba(14, 5, 32, 0.7);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--accent-emerald-light);
  word-break: break-all;
}

.card-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.step-action-btn {
  background: linear-gradient(135deg, #6a3199 0%, #8b5cf6 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-action-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.step-status-note {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* 6. Confirmed Wallet Card */
.confirmed-wallet-card {
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.wallet-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.wallet-card-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.badge-emerald {
  background: var(--badge-completed-bg);
  border: 1px solid var(--badge-completed-border);
  color: var(--badge-completed-text);
}

.wallet-address-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-deep);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
}

.address-text {
  font-size: 0.8rem;
  color: var(--accent-emerald-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: var(--accent-emerald-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: #22c55e;
  color: #064e22;
}

.wallet-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.wallet-explorer-link {
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 600;
}

.wallet-explorer-link:hover {
  text-decoration: underline;
  color: #fff;
}

/* 7. Footer */
.app-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 0 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a,
.footer-btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-btn-link:hover {
  color: #ffffff;
}

/* 8. Modal & Backdrops */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 5, 32, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 5, 32, 0.4);
}

.modal-btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.modal-btn-primary {
  background: #22c55e;
  border: none;
  color: #064e22;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.modal-btn-primary:hover {
  background: #16a34a;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #22c55e;
  color: #064e22;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.loading-state-card {
  padding: 40px 20px;
  text-align: center;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 540px) {
  .checklist-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .filter-tab {
    flex: 1 1 auto;
    text-align: center;
  }

  .progress-footer-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-header-bar {
    padding: 12px;
    gap: 8px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-btn-secondary,
  .modal-btn-primary {
    flex: 1 1 120px;
    text-align: center;
  }
}

/* Inline Sequential Step Verification Controls */
.step-inline-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(14, 5, 32, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.step-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.step-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.step-field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.step-input,
.step-select {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(25, 10, 56, 0.92);
  color: #ffffff;
  font-size: 0.84rem;
  outline: none;
}

.step-input:focus,
.step-select:focus {
  border-color: var(--accent-green);
}

.step-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.step-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.step-primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.step-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 9px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(139, 92, 246, 0.14);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.step-lock-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 0.78rem;
  line-height: 1.45;
}

.step-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.step-gate-pill {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.step-gate-pill.ok {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.step-gate-pill.locked {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
}

.step-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-primary);
  cursor: pointer;
}

.step-checkbox-row input {
  margin-top: 3px;
}


