/* ── Star BG ─────────────────────────────────────────────────────── */
    #mgmt-starfield {
      position: fixed; inset: 0; pointer-events: none; z-index: 0;
      background: linear-gradient(135deg,#080a2e 0%,#0d0f45 50%,#080a2e 100%);
    }
    #mgmt-starfield canvas { position: absolute; inset: 0; width:100%; height:100%; }

    /* ── Page Shell ──────────────────────────────────────────────────── */
    .mgmt-page { position: relative; z-index: 1; min-height: 100vh; padding-bottom: 60px; }

    /* ── Top Bar ─────────────────────────────────────────────────────── */
    .mgmt-topbar {
      position: sticky; top: 0; z-index: 60;
      background: rgba(8,10,46,0.92);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(139,92,246,0.2);
      padding: 12px 28px;
      display: flex; align-items: center; gap: 16px;
    }
    .mgmt-topbar-title {
      font-size: 1rem; font-weight: 800; color: #f0f1ff;
      display: flex; align-items: center; gap: 10px;
    }
    .mgmt-topbar-title .title-gradient {
      background: linear-gradient(135deg,#8b5cf6,#22d3ee);
      -webkit-background-clip: text; -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .help-pill {
      display: inline-flex; align-items: center; justify-content: center;
      width: 22px; height: 22px; border-radius: 50%;
      background: rgba(139,92,246,0.25); border: 1px solid rgba(139,92,246,0.4);
      color: #8b5cf6; font-size: 0.72rem; font-weight: 800; cursor: pointer;
    }
    .wallet-selector {
      margin-left: auto;
      display: flex; align-items: center; gap: 10px;
    }
    .wallet-select-ctrl {
      padding: 7px 14px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(139,92,246,0.25);
      border-radius: 10px; color: #f0f1ff; font-size: 0.83rem;
    }
    .wallet-select-ctrl:focus { outline: none; border-color: #8b5cf6; }

    /* ── Progress Beacon (top line) ──────────────────────────────────── */
    .mgmt-beacon {
      height: 2px;
      background: linear-gradient(90deg,#8b5cf6,#22d3ee,#f97316);
      background-size: 200% 100%;
      animation: beacon-slide 3s linear infinite;
    }
    @keyframes beacon-slide { to { background-position: 200% 0; } }

    /* ── Step Flow Indicator ─────────────────────────────────────────── */
    .step-flow-bar {
      display: flex; align-items: center; gap: 8px;
      padding: 14px 28px;
      border-bottom: 1px solid rgba(139,92,246,0.12);
      background: rgba(14,16,72,0.5);
    }
    .step-flow-item {
      display: flex; align-items: center; gap: 8px;
      flex-shrink: 0;
    }
    .step-flow-num {
      width: 26px; height: 26px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.72rem; font-weight: 800;
      border: 2px solid rgba(139,92,246,0.3);
      color: #8b89b8;
      transition: all 0.3s;
    }
    .step-flow-item.active .step-flow-num {
      background: #8b5cf6; border-color: #8b5cf6; color: #fff;
      box-shadow: 0 2px 12px rgba(139,92,246,0.5);
    }
    .step-flow-item.done .step-flow-num {
      background: #34d399; border-color: #34d399; color: #fff;
    }
    .step-flow-label {
      font-size: 0.78rem; font-weight: 600; color: #8b89b8;
    }
    .step-flow-item.active .step-flow-label { color: #f0f1ff; }
    .step-flow-item.done .step-flow-label { color: #34d399; }
    .step-flow-line {
      flex: 1; height: 2px;
      background: rgba(139,92,246,0.2); border-radius: 1px;
      min-width: 20px;
    }
    .step-flow-line.done { background: linear-gradient(90deg, #34d399, #8b5cf6); }
    @media(max-width:600px) {
      .step-flow-label { display: none; }
      .step-flow-bar { padding: 10px 16px; }
    }

    /* ── Tab Bar ─────────────────────────────────────────────────────── */
    .mgmt-tab-bar {
      background: rgba(14,16,72,0.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(139,92,246,0.15);
      padding: 0 24px;
      display: flex; overflow-x: auto; gap: 2px;
    }
    .mgmt-tab-bar::-webkit-scrollbar { height: 2px; }
    .mgmt-tab {
      flex-shrink: 0;
      display: flex; align-items: center; gap: 7px;
      padding: 14px 18px;
      color: #8b89b8; font-size: 0.82rem; font-weight: 600;
      border-bottom: 2px solid transparent;
      background: transparent; cursor: pointer;
      transition: color 0.18s, border-color 0.18s;
      white-space: nowrap; border-top: none; border-left: none; border-right: none;
      position: relative;
    }
    .mgmt-tab:hover { color: #c8c7e0; }
    .mgmt-tab.active {
      color: #8b5cf6;
      border-bottom-color: #8b5cf6;
    }
    .mgmt-tab .tab-icon {
      font-size: 1rem; opacity: 0.7;
    }
    .mgmt-tab.active .tab-icon { opacity: 1; }
    .mgmt-tab .tab-kbd {
      font-size: 0.62rem;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 4px; padding: 1px 5px;
      color: #8b89b8; font-family: monospace;
    }
    /* Danger tab styling */
    .mgmt-tab[data-tab="burn"]:hover { color: #f43f5e; }
    .mgmt-tab[data-tab="burn"].active { color: #f43f5e; border-bottom-color: #f43f5e; }

    /* ── Body Layout ─────────────────────────────────────────────────── */
    .mgmt-body {
      display: flex; gap: 0;
      min-height: calc(100vh - 110px);
    }

    /* ── Contextual Help Sidebar ─────────────────────────────────────── */
    .mgmt-sidebar {
      width: 280px; flex-shrink: 0;
      padding: 28px 24px;
      border-right: 1px solid rgba(139,92,246,0.1);
      position: sticky; top: 110px; align-self: flex-start;
      max-height: calc(100vh - 110px); overflow-y: auto;
    }
    .sidebar-section { display: none; }
    .sidebar-section.active { display: block; animation: fadeInSide 0.3s ease; }
    @keyframes fadeInSide { from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)} }

    .sidebar-title {
      font-size: 0.9rem; font-weight: 800; color: #f0f1ff;
      margin-bottom: 6px;
    }
    .sidebar-desc {
      font-size: 0.8rem; color: #8b89b8; line-height: 1.6; margin-bottom: 20px;
    }
    .sidebar-tip {
      background: rgba(139,92,246,0.08);
      border: 1px solid rgba(139,92,246,0.2);
      border-left: 3px solid #8b5cf6;
      border-radius: 0 10px 10px 0;
      padding: 10px 14px;
      font-size: 0.78rem; color: #c8c7e0; line-height: 1.55; margin-bottom: 14px;
    }
    .sidebar-tip.danger {
      background: rgba(244,63,94,0.08);
      border-color: rgba(244,63,94,0.2);
      border-left-color: #f43f5e;
    }
    .sidebar-step {
      display: flex; align-items: flex-start; gap: 12px;
      margin-bottom: 16px;
    }
    .step-num {
      flex-shrink: 0;
      width: 26px; height: 26px; border-radius: 50%;
      background: linear-gradient(135deg,#8b5cf6,#7c3aed);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.72rem; font-weight: 800; color: #fff;
      box-shadow: 0 2px 10px rgba(139,92,246,0.4);
    }
    .step-body {}
    .step-title { font-size: 0.83rem; font-weight: 700; color: #f0f1ff; }
    .step-desc  { font-size: 0.76rem; color: #8b89b8; margin-top: 2px; line-height: 1.5; }

    .sidebar-learn {
      display: inline-flex; align-items: center; gap: 6px;
      margin-top: 6px; font-size: 0.78rem; font-weight: 600;
      color: #8b5cf6; text-decoration: none;
      transition: color 0.18s;
    }
    .sidebar-learn:hover { color: #22d3ee; }

    /* ── Main Form Area ──────────────────────────────────────────────── */
    .mgmt-main {
      flex: 1; min-width: 0;
      padding: 32px;
    }
    .tab-pane { display: none; animation: fadePaneIn 0.28s ease; }
    .tab-pane.active { display: block; }
    @keyframes fadePaneIn { from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)} }

    /* ── Panel / Card ────────────────────────────────────────────────── */
    .mgmt-panel {
      background: rgba(20,22,80,0.72);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 20px;
      overflow: hidden;
      position: relative;
    }
    .mgmt-panel::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    }
    .mgmt-panel.accent-violet::before { background: linear-gradient(90deg,transparent,#8b5cf6,transparent); }
    .mgmt-panel.accent-orange::before { background: linear-gradient(90deg,transparent,#f97316,transparent); }
    .mgmt-panel.accent-teal::before   { background: linear-gradient(90deg,transparent,#22d3ee,transparent); }
    .mgmt-panel.accent-green::before  { background: linear-gradient(90deg,transparent,#34d399,transparent); }
    .mgmt-panel.accent-red::before    { background: linear-gradient(90deg,transparent,#f43f5e,transparent); }
    .mgmt-panel.accent-yellow::before { background: linear-gradient(90deg,transparent,#fbbf24,transparent); }
    .mgmt-panel.accent-blue::before   { background: linear-gradient(90deg,transparent,#3b82f6,transparent); }
    .mgmt-panel.accent-pink::before   { background: linear-gradient(90deg,transparent,#ec4899,transparent); }
    .mgmt-panel.accent-cyan::before   { background: linear-gradient(90deg,transparent,#06b6d4,transparent); }

    .panel-head {
      padding: 22px 28px 0;
      display: flex; align-items: center; gap: 10px;
    }
    .panel-title {
      font-size: 1.05rem; font-weight: 800; color: #f0f1ff;
    }
    .panel-subtitle {
      font-size: 0.8rem; color: #8b89b8; margin-top: 4px;
    }
    .panel-body { padding: 24px 28px 28px; }

    /* ── Form elements ───────────────────────────────────────────────── */
    .f-label {
      display: block;
      font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.06em; color: #8b89b8; margin-bottom: 6px;
    }
    .f-input, .f-select, .f-textarea {
      width: 100%;
      padding: 11px 14px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(139,92,246,0.22);
      border-radius: 10px; color: #f0f1ff; font-size: 0.88rem;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .f-input:focus, .f-select:focus, .f-textarea:focus {
      outline: none; border-color: #8b5cf6;
      box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
    }
    .f-input::placeholder, .f-textarea::placeholder { color: #8b89b8; }
    .f-textarea { resize: none; }
    .f-select option { background: #0e1048; }
    .f-hint { font-size: 0.73rem; color: #8b89b8; margin-top: 5px; }

    /* NFT Token selector with thumbnail */
    .nft-select-wrap {
      display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center;
    }
    .nft-thumb-preview {
      width: 48px; height: 48px; border-radius: 8px; overflow: hidden;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(139,92,246,0.2);
      flex-shrink: 0;
    }
    .nft-thumb-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .nft-thumb-preview .no-img {
      width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
      color: #8b89b8; font-size: 1.3rem; opacity: 0.5;
    }

    /* AI Style chips */
    .style-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .style-chip {
      padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      color: #8b89b8; cursor: pointer; transition: all 0.18s;
    }
    .style-chip:hover, .style-chip.active {
      background: rgba(139,92,246,0.2);
      border-color: #8b5cf6; color: #f0f1ff;
    }

    /* Attribute builder */
    .attr-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
    .attr-row {
      display: grid; grid-template-columns: 1fr 1fr 32px; gap: 8px; align-items: center;
    }
    .attr-row .f-input { padding: 8px 12px; font-size: 0.82rem; }
    .attr-del-btn {
      width: 32px; height: 32px; border-radius: 8px;
      background: rgba(244,63,94,0.12); border: 1px solid rgba(244,63,94,0.25);
      color: #f43f5e; cursor: pointer; font-size: 0.85rem;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.18s;
    }
    .attr-del-btn:hover { background: rgba(244,63,94,0.25); }
    .add-attr-btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 16px; border-radius: 10px;
      background: rgba(255,255,255,0.05);
      border: 1px dashed rgba(139,92,246,0.3);
      color: #8b5cf6; font-size: 0.82rem; font-weight: 600;
      cursor: pointer; transition: all 0.18s;
    }
    .add-attr-btn:hover { background: rgba(139,92,246,0.1); border-color: #8b5cf6; }

    /* JSON Preview panel */
    .json-preview-wrap {
      background: rgba(8,10,46,0.8);
      border: 1px solid rgba(139,92,246,0.2);
      border-radius: 12px; overflow: hidden; margin-top: 4px;
    }
    .json-preview-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 16px;
      background: rgba(139,92,246,0.08);
      border-bottom: 1px solid rgba(139,92,246,0.15);
    }
    .json-preview-title { font-size: 0.75rem; font-weight: 700; color: #8b89b8; text-transform: uppercase; letter-spacing: 0.06em; }
    .json-copy-btn {
      background: none; border: none; color: #8b5cf6; font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: color 0.18s;
    }
    .json-copy-btn:hover { color: #22d3ee; }
    .json-body {
      padding: 14px 16px;
      font-family: 'Fira Code','Cascadia Code','Courier New',monospace;
      font-size: 0.78rem; line-height: 1.7; color: #c8c7e0;
      max-height: 240px; overflow-y: auto;
      white-space: pre-wrap; word-break: break-all;
    }
    .json-body .jk  { color: #22d3ee; }   /* key */
    .json-body .jvs { color: #34d399; }   /* string value */
    .json-body .jvn { color: #f97316; }   /* number value */
    .json-body .jvb { color: #a78bfa; }   /* bool value */

    /* Action buttons */
    .btn-submit {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 13px 28px; border-radius: 12px;
      font-weight: 800; font-size: 0.88rem; cursor: pointer;
      transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
      border: none;
    }
    .btn-submit:hover { filter: brightness(1.15); transform: translateY(-1px); }
    .btn-submit:active { transform: translateY(0); filter: brightness(0.95); }
    .btn-submit.violet {
      background: linear-gradient(135deg,#8b5cf6,#7c3aed);
      color: #fff; box-shadow: 0 4px 20px rgba(139,92,246,0.4);
    }
    .btn-submit.orange {
      background: linear-gradient(135deg,#f97316,#ea6c0a);
      color: #fff; box-shadow: 0 4px 20px rgba(249,115,22,0.4);
    }
    .btn-submit.teal {
      background: linear-gradient(135deg,#22d3ee,#0891b2);
      color: #000; box-shadow: 0 4px 20px rgba(34,211,238,0.3);
    }
    .btn-submit.green {
      background: linear-gradient(135deg,#34d399,#059669);
      color: #000; box-shadow: 0 4px 20px rgba(52,211,153,0.3);
    }
    .btn-submit.red {
      background: linear-gradient(135deg,#f43f5e,#be123c);
      color: #fff; box-shadow: 0 4px 20px rgba(244,63,94,0.4);
    }
    .btn-submit.yellow {
      background: linear-gradient(135deg,#fbbf24,#d97706);
      color: #000; box-shadow: 0 4px 20px rgba(251,191,36,0.3);
    }
    .btn-submit.blue {
      background: linear-gradient(135deg,#3b82f6,#1d4ed8);
      color: #fff; box-shadow: 0 4px 20px rgba(59,130,246,0.4);
    }
    .btn-ghost-sm {
      padding: 9px 18px; border-radius: 10px;
      background: transparent;
      border: 1px solid rgba(139,92,246,0.25);
      color: #8b89b8; font-size: 0.82rem; font-weight: 600;
      cursor: pointer; transition: all 0.18s;
    }
    .btn-ghost-sm:hover { border-color: #8b5cf6; color: #f0f1ff; }

    /* ── Flag checkboxes ─────────────────────────────────────────────── */
    .flag-grid { display: flex; flex-wrap: wrap; gap: 10px; }
    .flag-item {
      display: flex; align-items: center; gap: 7px;
      padding: 8px 14px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(139,92,246,0.15);
      border-radius: 8px; cursor: pointer; transition: border-color 0.18s, background 0.18s;
    }
    .flag-item:hover { border-color: rgba(139,92,246,0.35); background: rgba(139,92,246,0.07); }
    .flag-item input[type=checkbox] { accent-color: #8b5cf6; width: 14px; height: 14px; cursor: pointer; }
    .flag-item label { font-size: 0.8rem; color: #c8c7e0; cursor: pointer; font-weight: 500; }

    /* ── Rule Cards ──────────────────────────────────────────────────── */
    .rule-card {
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(139,92,246,0.18);
      border-radius: 12px; padding: 14px 16px;
      display: flex; align-items: center; gap: 12px;
      transition: border-color 0.18s;
    }
    .rule-card:hover { border-color: rgba(139,92,246,0.4); }
    .rule-icon { font-size: 1.1rem; color: #8b5cf6; flex-shrink: 0; }
    .rule-info { flex: 1; }
    .rule-cond { font-size: 0.8rem; color: #8b89b8; }
    .rule-action { font-size: 0.83rem; font-weight: 700; color: #f0f1ff; }
    .rule-del { background: none; border: none; color: #f43f5e; cursor: pointer; opacity: 0.6; transition: opacity 0.18s; font-size: 0.9rem; }
    .rule-del:hover { opacity: 1; }

    /* ── Burn Confirm ────────────────────────────────────────────────── */
    .burn-confirm {
      display: none;
      background: rgba(244,63,94,0.08);
      border: 1px solid rgba(244,63,94,0.3);
      border-radius: 12px; padding: 18px 22px; margin-top: 14px;
    }
    .burn-confirm.visible { display: block; animation: fadePaneIn 0.25s ease; }

    /* ── Toast ───────────────────────────────────────────────────────── */
    #toast-container {
      position: fixed; bottom: 24px; right: 24px;
      z-index: 9999; display: flex; flex-direction: column; gap: 8px;
    }
    .toast-msg {
      background: rgba(14,16,72,0.97);
      border: 1px solid rgba(139,92,246,0.4);
      border-radius: 12px; padding: 12px 18px;
      color: #f0f1ff; font-size: 0.85rem;
      display: flex; align-items: center; gap: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
      animation: slideInRight 0.3s ease;
      max-width: 320px;
    }
    @keyframes slideInRight { from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1} }
    .toast-msg.success { border-color: rgba(52,211,153,0.5); }
    .toast-msg.danger  { border-color: rgba(244,63,94,0.5); }
    .toast-msg.warning { border-color: rgba(251,191,36,0.5); }
    .toast-msg.info    { border-color: rgba(34,211,238,0.4); }

    /* ── Portfolio Stats Strip ───────────────────────────────────────── */
    .portfolio-strip {
      background: rgba(14,16,72,0.88);
      border-bottom: 1px solid rgba(139,92,246,0.12);
      padding: 10px 28px;
      display: flex; gap: 0; overflow-x: auto; align-items: center;
    }
    .portfolio-strip::-webkit-scrollbar { height: 0; }
    .portfolio-stat {
      display: flex; flex-direction: column; align-items: center; gap: 1px;
      flex-shrink: 0; padding: 0 22px;
      border-right: 1px solid rgba(139,92,246,0.1);
    }
    .portfolio-stat:last-child { border-right: none; }
    .ps-val { font-size: 1.1rem; font-weight: 800; color: #f0f1ff; }
    .ps-lbl { font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.07em; color: #8b89b8; font-weight: 600; }

    /* ── My NFTs Gallery ─────────────────────────────────────────────── */
    .my-nfts-section {
      padding: 20px 28px 0;
      border-bottom: 1px solid rgba(139,92,246,0.1);
    }
    .my-nfts-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 12px;
    }
    .my-nfts-title {
      font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.08em; color: #8b89b8;
      display: flex; align-items: center; gap: 6px;
    }
    .my-nfts-toggle {
      background: none; border: none; color: #8b89b8;
      font-size: 0.78rem; font-weight: 600; cursor: pointer;
      display: flex; align-items: center; gap: 4px; transition: color 0.18s;
    }
    .my-nfts-toggle:hover { color: #8b5cf6; }
    .my-nfts-grid {
      display: flex; gap: 12px; overflow-x: auto; padding-bottom: 16px;
    }
    .my-nfts-grid::-webkit-scrollbar { height: 3px; }
    .my-nfts-grid::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }
    .my-nft-card {
      flex-shrink: 0; width: 110px; border-radius: 12px; overflow: hidden;
      background: rgba(20,22,80,0.75);
      border: 1px solid rgba(139,92,246,0.15);
      cursor: pointer; transition: all 0.18s; position: relative;
    }
    .my-nft-card:hover { transform: translateY(-3px); border-color: rgba(139,92,246,0.5); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
    .my-nft-card img { width: 110px; height: 110px; object-fit: cover; display: block; }
    .my-nft-card-body { padding: 6px 8px 8px; }
    .my-nft-card-name { font-size: 0.68rem; font-weight: 600; color: #c8c7e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .my-nft-card-actions { display: flex; gap: 3px; margin-top: 5px; }
    .my-nft-act {
      flex: 1; padding: 3px 0; border: none; border-radius: 5px;
      font-size: 0.6rem; font-weight: 700; cursor: pointer;
      background: rgba(139,92,246,0.15); color: #8b5cf6;
      transition: background 0.18s;
    }
    .my-nft-act:hover { background: rgba(139,92,246,0.3); }
    .my-nft-act.sell { background: rgba(52,211,153,0.15); color: #34d399; }
    .my-nft-act.sell:hover { background: rgba(52,211,153,0.3); }
    .my-nft-act.burn { background: rgba(244,63,94,0.12); color: #f43f5e; }
    .my-nft-act.burn:hover { background: rgba(244,63,94,0.25); }
    .my-nfts-empty {
      font-size: 0.82rem; color: #8b89b8; padding: 20px 0;
      display: flex; flex-direction: column; align-items: center; gap: 8px;
    }

    /* ── Mint Steps Indicator ────────────────────────────────────────── */
    .mint-steps-indicator {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      padding: 20px 0 24px;
    }
    .mint-step-pill {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 24px;
      border-radius: 40px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(139,92,246,0.15);
      cursor: pointer;
      transition: all 0.3s;
    }
    .mint-step-pill:hover {
      border-color: rgba(139,92,246,0.4);
    }
    .mint-step-pill.active {
      background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(34,211,238,0.15));
      border-color: #8b5cf6;
      box-shadow: 0 4px 20px rgba(139,92,246,0.25);
    }
    .mint-step-pill.done {
      background: rgba(16,185,129,0.15);
      border-color: rgba(16,185,129,0.4);
    }
    .mint-step-pill.done .mint-step-num {
      background: #10b981;
      border-color: #10b981;
      color: #fff;
    }
    .mint-step-num {
      width: 30px; height: 30px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.8rem; font-weight: 800;
      border: 2px solid rgba(139,92,246,0.3);
      color: #8b89b8;
      transition: all 0.3s;
    }
    .mint-step-pill.active .mint-step-num {
      background: #8b5cf6;
      border-color: #8b5cf6;
      color: #fff;
    }
    .mint-step-label {
      font-size: 0.88rem;
      font-weight: 600;
      color: #8b89b8;
      transition: color 0.3s;
    }
    .mint-step-pill.active .mint-step-label,
    .mint-step-pill.done .mint-step-label {
      color: #f0f1ff;
    }
    .mint-step-connector {
      width: 60px;
      height: 2px;
      background: linear-gradient(90deg, rgba(139,92,246,0.4), rgba(34,211,238,0.4));
      flex-shrink: 0;
    }
    .mint-step-content {
      animation: fadeInUp 0.3s ease;
    }
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── Artwork Source Selector ──────────────────────────────────────── */
    .artwork-source-selector {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 20px;
    }
    .artwork-src-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 18px 12px;
      border-radius: 14px;
      background: rgba(255,255,255,0.04);
      border: 2px solid rgba(139,92,246,0.15);
      color: #8b89b8;
      cursor: pointer;
      transition: all 0.25s;
      font-size: 0.82rem;
      font-weight: 600;
    }
    .artwork-src-btn i {
      font-size: 1.6rem;
      transition: transform 0.25s;
    }
    .artwork-src-btn:hover {
      border-color: rgba(139,92,246,0.4);
      color: #c4b5fd;
      background: rgba(139,92,246,0.08);
    }
    .artwork-src-btn:hover i {
      transform: scale(1.1);
    }
    .artwork-src-btn.active {
      border-color: #8b5cf6;
      background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(34,211,238,0.1));
      color: #f0f1ff;
      box-shadow: 0 4px 18px rgba(139,92,246,0.3);
    }
    .artwork-src-btn.active i {
      color: #8b5cf6;
    }

    /* ── Upload Drop Zone ────────────────────────────────────────────── */
    .upload-drop-zone {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px 20px;
      border: 2px dashed rgba(139,92,246,0.25);
      border-radius: 16px;
      background: rgba(255,255,255,0.03);
      cursor: pointer;
      transition: all 0.25s;
      text-align: center;
    }
    .upload-drop-zone:hover,
    .upload-drop-zone.drag-over {
      border-color: #8b5cf6;
      background: rgba(139,92,246,0.08);
    }
    .drop-zone-icon {
      font-size: 3rem;
      color: #8b5cf6;
      opacity: 0.6;
      margin-bottom: 8px;
    }
    .drop-zone-title {
      font-size: 0.95rem;
      font-weight: 600;
      color: #c4b5fd;
      margin-bottom: 4px;
    }
    .drop-zone-sub {
      font-size: 0.8rem;
      color: #8b89b8;
    }

    /* ── Artwork Preview Card ────────────────────────────────────────── */
    .artwork-preview-card {
      position: relative;
      border-radius: 14px;
      overflow: hidden;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(139,92,246,0.2);
      aspect-ratio: 1 / 1;
      max-width: 400px;
      margin: 0 auto;
    }
    .artwork-preview-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .artwork-preview-remove {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 32px; height: 32px;
      border-radius: 50%;
      background: rgba(244,63,94,0.85);
      border: none;
      color: #fff;
      font-size: 0.9rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.2s;
      backdrop-filter: blur(10px);
    }
    .artwork-preview-remove:hover {
      background: #f43f5e;
    }

    /* ── Step 2 Preview ──────────────────────────────────────────────── */
    .step2-artwork-preview {
      aspect-ratio: 1 / 1;
      max-width: 320px;
      max-height: 320px;
      margin: 0 auto;
      border-radius: 14px;
      overflow: hidden;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(139,92,246,0.15);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .step2-artwork-preview img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }

    /* ── Teal button variant ─────────────────────────────────────────── */
    .btn-submit.teal {
      background: linear-gradient(135deg, #0d9488, #22d3ee);
      color: #fff;
    }
    .btn-submit.teal:hover {
      box-shadow: 0 6px 20px rgba(34,211,238,0.4);
      transform: translateY(-1px);
    }

    /* ── Responsive ──────────────────────────────────────────────────── */
    @media(max-width:860px){
      .mgmt-sidebar { display: none; }
      .mgmt-body { flex-direction: column; }
      .artwork-source-selector { grid-template-columns: 1fr; }
    }
    @media(max-width:540px){
      .mgmt-main { padding: 16px; }
      .panel-body { padding: 16px 18px 20px; }
      .mint-step-pill { padding: 8px 16px; }
      .mint-step-connector { width: 30px; }
    }

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL — btn-teal, f-group (missing definitions used by wizard)
   ═══════════════════════════════════════════════════════════════════ */
.btn-teal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
  letter-spacing: 0.01em;
}
.btn-teal:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}
.btn-teal:active {
  transform: translateY(0);
  filter: brightness(0.95);
}
.btn-teal:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
  transform: none;
}
.f-group {
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   COLLECTION WIZARD — Award-Worthy Design System
   ═══════════════════════════════════════════════════════════════════ */

/* ── Step Indicator ────────────────────────────────────────────── */
.wiz-steps-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 32px;
  padding: 24px 20px 16px;
  max-width: 600px;
  background: rgba(14, 16, 72, 0.5);
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.wiz-si {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.35s ease;
  opacity: 0.4;
  padding: 0 4px;
}
.wiz-si:hover { opacity: 0.7; }
.wiz-si.active,
.wiz-si.done { opacity: 1; }
.wiz-si-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  background: rgba(139, 92, 246, 0.08);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: #8b89b8;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.wiz-si.active .wiz-si-num {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15),
              0 4px 20px rgba(139, 92, 246, 0.5);
  transform: scale(1.08);
}
.wiz-si.done .wiz-si-num {
  background: linear-gradient(135deg, #34d399, #059669);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12),
              0 4px 16px rgba(52, 211, 153, 0.4);
}
.wiz-si-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #6b6998;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  transition: color 0.3s;
}
.wiz-si.active .wiz-si-lbl { color: #c4b5fd; }
.wiz-si.done .wiz-si-lbl   { color: #6ee7b7; }
.wiz-si-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.06));
  margin: 0 6px;
  margin-bottom: 26px;
  border-radius: 2px;
}

/* ── Step Panes ────────────────────────────────────────────────── */
.wiz-step-pane {
  display: none;
  animation: wzFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.wiz-step-pane.active { display: block; }
@keyframes wzFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Wizard Cards & Panels ─────────────────────────────────────── */
#pane-wizard .f-group {
  margin-bottom: 18px;
}
#pane-wizard .f-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b89b8;
  margin-bottom: 7px;
}
#pane-wizard .f-input,
#pane-wizard .f-select,
#pane-wizard .f-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 12px;
  color: #f0f1ff;
  font-size: 0.88rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
#pane-wizard .f-input:focus,
#pane-wizard .f-select:focus,
#pane-wizard .f-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.04);
}
#pane-wizard .f-input::placeholder,
#pane-wizard .f-textarea::placeholder { color: #5b5988; }
#pane-wizard .f-textarea { resize: none; }
#pane-wizard .f-select option { background: #0e1048; }
#pane-wizard .f-hint {
  font-size: 0.72rem;
  color: #6b6998;
  margin-top: 5px;
}

/* ── Wizard Drop Zone ──────────────────────────────────────────── */
#wzDropZone {
  border: 2px dashed rgba(139, 92, 246, 0.25) !important;
  border-radius: 16px !important;
  padding: 48px 28px !important;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease !important;
  background: rgba(139, 92, 246, 0.02) !important;
  position: relative;
}
#wzDropZone:hover {
  border-color: rgba(139, 92, 246, 0.5) !important;
  background: rgba(139, 92, 246, 0.06) !important;
}

/* ── Wizard Upload Grid ────────────────────────────────────────── */
#wzUploadGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
  gap: 10px !important;
  margin-top: 16px !important;
}
#wzUploadGrid > div {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.12);
  transition: transform 0.2s, border-color 0.2s;
}
#wzUploadGrid > div:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.35);
}

/* ── Wizard Layers ─────────────────────────────────────────────── */
#wzLayersList > div {
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
#wzLayersList > div:hover {
  border-color: rgba(139, 92, 246, 0.25);
}

/* ── Wizard Attributes List ────────────────────────────────────── */
#wzAttrsList > div {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  animation: wzFadeIn 0.2s ease;
}
#wzAttrsList .f-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.85rem;
}

/* ── Wizard JSON Preview ───────────────────────────────────────── */
#wzJsonPreview {
  background: rgba(0, 0, 0, 0.35) !important;
  border: 1px solid rgba(139, 92, 246, 0.1) !important;
  border-radius: 14px !important;
  padding: 16px !important;
  font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.74rem !important;
  color: #a78bfa !important;
  line-height: 1.7;
  max-height: 320px;
  overflow: auto;
}

/* ── Wizard Review Grid ────────────────────────────────────────── */
#wzReviewGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 18px !important;
}
#wzReviewGrid > div {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.1);
  background: rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, border-color 0.2s;
}
#wzReviewGrid > div:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.3);
}

/* ── Wizard Summary Cards ──────────────────────────────────────── */
#wizPane4 > div:first-child > div {
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
#wizPane4 > div:first-child > div:hover {
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

/* ── Wizard Tips Panel ─────────────────────────────────────────── */
#wizPane1 .col-lg-4 > div {
  background: rgba(139, 92, 246, 0.04) !important;
  border: 1px solid rgba(139, 92, 246, 0.12) !important;
  border-radius: 16px !important;
  padding: 20px !important;
  backdrop-filter: blur(8px);
}

/* ── Wizard Progress Bars ──────────────────────────────────────── */
#wzUploadFill,
#wzMintFill {
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* ── Wizard XLS-20 Flags ───────────────────────────────────────── */
#wizPane4 input[type="checkbox"] {
  accent-color: #8b5cf6;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Wizard Mode Toggle Buttons ────────────────────────────────── */
#wzModeUpload,
#wzModeLayers {
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}
#wzModeUpload.active,
#wzModeLayers.active {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* ── Wizard Cover Image Upload ─────────────────────────────────── */
#wzCoverFile { display: none !important; }
#wzBulkFiles { display: none !important; }
#wzJsonImport { display: none !important; }

/* ── Wizard Mint Result ────────────────────────────────────────── */
#wzMintResult > div {
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  animation: wzFadeIn 0.4s ease;
}

/* ── Responsive Wizard ─────────────────────────────────────────── */
@media(max-width:600px) {
  .wiz-steps-inline {
    padding: 16px 12px 10px;
    border-radius: 14px;
  }
  .wiz-si-num { width: 34px; height: 34px; font-size: 0.78rem; }
  .wiz-si-lbl { font-size: 0.6rem; }
  .wiz-si-line { max-width: 36px; }
  #pane-wizard .f-input,
  #pane-wizard .f-select,
  #pane-wizard .f-textarea { padding: 10px 12px; font-size: 0.82rem; }
  .btn-teal { padding: 9px 16px; font-size: 0.8rem; }
  #wzReviewGrid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important; }
  #wizPane4 > div:first-child { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════════════════════════════════════════════════════ */
/* ENHANCED VISUAL POLISH — Management Page                           */
/* ═══════════════════════════════════════════════════════════════════ */

/* ── AI Generation cancel button ──────────────────────────────────── */
.ai-cancel-btn {
  margin-top: 10px;
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(244,63,94,0.12);
  border: 1px solid rgba(244,63,94,0.3);
  color: #fb7185;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-cancel-btn:hover {
  background: rgba(244,63,94,0.2);
  border-color: rgba(244,63,94,0.5);
  color: #fda4af;
}

/* ── AI Retry button styling ──────────────────────────────────────── */
.ai-retry-btn {
  padding: 10px 22px; border-radius: 10px;
  font-size: 0.82rem; font-weight: 700;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.35);
  color: #a78bfa;
  cursor: pointer;
  transition: all 0.22s;
  display: inline-flex; align-items: center; gap: 6px;
}
.ai-retry-btn:hover {
  background: rgba(139,92,246,0.25);
  border-color: rgba(139,92,246,0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139,92,246,0.15);
}

/* ── AI Spinner enhanced ──────────────────────────────────────────── */
.ai-spinner-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 16px;
  position: relative;
}
.ai-spinner-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(139,92,246,0.15);
  border-top-color: #8b5cf6;
  border-right-color: #22d3ee;
  animation: spin 0.7s linear infinite;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ai-spinner-ring::after {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(139,92,246,0.2);
  animation: spin 2.2s linear infinite reverse;
}
.ai-spinner-core {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle, #8b5cf6 40%, transparent 70%);
  animation: corePulse 1.4s ease-in-out infinite;
}
@keyframes corePulse {
  0%,100% { opacity: 0.6; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
.ai-spinner-text {
  font-size: 0.88rem; font-weight: 700; color: #f0f1ff;
  margin-top: 14px; text-align: center;
}
.ai-spinner-sub {
  font-size: 0.76rem; color: #8b89b8;
  margin-top: 4px; text-align: center;
}
.ai-spinner-eta {
  font-size: 0.68rem; color: #22d3ee; font-weight: 600;
  margin-top: 6px; text-align: center;
  animation: etaPulse 2s ease-in-out infinite;
}
@keyframes etaPulse {
  0%,100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ── AI Grid card enhanced hover ──────────────────────────────────── */
.ai-grid-card {
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.ai-grid-card:hover {
  border-color: rgba(139,92,246,0.5) !important;
  transform: scale(1.03) !important;
  box-shadow: 0 12px 36px rgba(139,92,246,0.2) !important;
}
.ai-grid-card.selected {
  border-color: rgba(52,211,153,0.6) !important;
  box-shadow: 0 0 0 3px rgba(52,211,153,0.15), 0 12px 36px rgba(52,211,153,0.15) !important;
}

/* ── Form field focus glow ────────────────────────────────────────── */
.f-input:focus, .f-select:focus, .f-textarea:focus {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12), 0 4px 16px rgba(139,92,246,0.08) !important;
  outline: none !important;
}

/* ── Submit button enhanced ───────────────────────────────────────── */
.btn-submit {
  position: relative; overflow: hidden;
}
.btn-submit::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: none;
}
.btn-submit:hover::after {
  animation: btnSheen 0.6s ease-out;
}
@keyframes btnSheen {
  from { left: -100%; }
  to { left: 100%; }
}

/* ── Tab active indicator enhanced ────────────────────────────────── */
.mgmt-tab.active::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px;
  background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
  filter: blur(4px);
}

/* ── Panel hover glow ─────────────────────────────────────────────── */
.mgmt-panel {
  transition: border-color 0.3s, box-shadow 0.3s;
}
.mgmt-panel:hover {
  border-color: rgba(139,92,246,0.32);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 30px rgba(139,92,246,0.05);
}

/* ── Address book search styling ──────────────────────────────────── */
.ab-search-panel {
  background: rgba(14,16,72,0.6);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.25s;
}
.ab-search-panel:focus-within {
  border-color: rgba(139,92,246,0.45);
  box-shadow: 0 0 20px rgba(139,92,246,0.06);
}

/* ── Enhanced scrollbar ───────────────────────────────────────────── */
.mgmt-page ::-webkit-scrollbar { width: 5px; height: 5px; }
.mgmt-page ::-webkit-scrollbar-track { background: rgba(8,10,46,0.4); }
.mgmt-page ::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.3); border-radius: 3px;
}
.mgmt-page ::-webkit-scrollbar-thumb:hover {
  background: rgba(139,92,246,0.5);
}
