/* ==================================================
   store.css — Storefront chrome + all product card variants
   Split from index.html lines 655–2085 on 2026-04-23
   ================================================== */

  /* -------- Storefront chrome (Amazon/Rarible-ish) -------- */
  .store-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 24px;
    padding: 16px 16px 14px;
    margin: 0 auto 20px;
    max-width: 1400px;
    border-bottom: 1px solid var(--border);
  }
  .store-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-dim);
  }
  .store-crumb a { color: var(--text-dim); text-decoration: none; }
  .store-crumb a:hover { color: var(--text); }
  .store-crumb-now {
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
  }
  .store-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
  }
  .store-count b { color: var(--text); font-weight: 600; }
  .store-sort {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
  }
  .store-sort-btn {
    background: transparent;
    border: 0;
    color: var(--text-dim);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 9px;
    cursor: pointer;
    border-radius: 4px;
  }
  .store-sort-btn:hover { color: var(--text); }
  .store-sort-btn.active { color: var(--bg); background: var(--amber, #ffbe0b); }

  /* Card rating row */
  .card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
  }
  .stars-row { display: inline-flex; gap: 1px; line-height: 1; letter-spacing: -0.5px; }
  .stars-row .star-f,
  .stars-row .star-h { color: #ffbe0b; }
  .stars-row .star-e { color: rgba(255, 190, 11, 0.25); }
  .stars-row .star-h {
    position: relative;
    display: inline-block;
    color: rgba(255, 190, 11, 0.25);
    background: linear-gradient(90deg, #ffbe0b 50%, transparent 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .rating-num { color: var(--text); font-weight: 600; }
  .rating-count { color: var(--text-faint); }

  /* Big Amazon-style price */
  .price-big {
    display: inline-flex;
    align-items: baseline;
    color: var(--text);
    font-family: var(--serif);
    line-height: 1;
  }
  .price-big .price-sym {
    font-size: 14px;
    margin-right: 2px;
    font-weight: 600;
  }
  .price-big .price-int {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .price-big .price-frac {
    font-size: 13px;
    margin-left: 1px;
    vertical-align: super;
    font-weight: 600;
  }
  .price-big .price-unit {
    margin-left: 6px;
    font-family: var(--mono);
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    align-self: center;
  }

  /* Prime-style instant-download badge */
  .instant-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 0.05em;
  }
  .instant-badge::before {
    content: '✓';
    font-weight: 700;
    color: var(--cyan);
  }

  /* Add-to-Cart primary CTA */
  .card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    background: #ffbe0b;
    color: #0a0b0e;
    border: 1px solid #e0a800;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s, filter 0.15s;
  }
  .card-cta:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -6px rgba(255, 190, 11, 0.55);
  }
  .card-cta:active { transform: translateY(0); }
  .card-cta.ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
  }
  .card-cta.ghost:hover {
    border-color: var(--text);
    box-shadow: none;
  }

  /* Quick-look hover button (Amazon "Quick look" style) */
  .card-preview .quick-look,
  .app-preview .quick-look,
  .model-preview .quick-look,
  .agent-preview .quick-look {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translate(-50%, 8px);
    padding: 6px 14px;
    background: rgba(20, 22, 28, 0.92);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 2;
  }
  .card:hover .card-preview .quick-look,
  .app-card:hover .app-preview .quick-look,
  .model-card:hover .model-preview .quick-look,
  .agent-card:hover .agent-preview .quick-look {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
  }

  footer {
    border-top: 1px solid var(--border);
    padding: 40px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-faint);
    font-size: 11px;
    letter-spacing: 0.05em;
  }

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

  .chain-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8247e5;
    box-shadow: 0 0 10px #8247e5;
  }

  /* Admin view sits on a solid opaque surface — the plaza background
   * is for the public site. Inside admin we want a clean editor canvas
   * so panel text stays readable and shadows/borders read clearly.
   *
   * `!important` + `isolation: isolate` defeat the body::before tint and
   * any inline-style overrides that previously let the plaza bleed through.
   * The pseudo-element overlays on body are also suppressed while admin
   * is active so the canvas stays pure. */
  #adminView.active {
    background: #f7f8fb !important;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    z-index: 3;
  }
  body:has(#adminView.active)::before,
  body:has(#adminView.active)::after { display: none; }

  .admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 65px);
    background: #f7f8fb;
  }
  .admin-main { background: #ffffff; }
  .admin-sidebar { background: #ffffff; }

  /* ====================================================================
   * Pages tree — Wix-style site structure list inside admin > Pages.
   * Each "page" is a row with an icon + label + (optional) edit shortcut.
   * ==================================================================== */
  .page-tree {
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
  }
  .pt-group { border-bottom: 1px solid #f1f3f7; }
  .pt-group:last-child { border-bottom: 0; }
  .pt-group-title {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #475569;
    padding: 14px 18px 10px;
    background: #f7f8fb;
    border-bottom: 1px solid #eef0f5;
  }
  .pt-page {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    padding: 12px 18px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 14px;
    color: #1e293b;
    text-align: left;
    transition: background 0.12s, border-color 0.12s;
  }
  .pt-page:hover {
    background: #eef4ff;
    border-left-color: #2563eb;
    color: #1d4ed8;
  }
  .pt-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
  }
  .pt-page:hover .pt-icon { color: #2563eb; }
  .pt-label { flex: 1; }
  .pt-edit {
    opacity: 0.4;
    font-size: 14px;
    transition: opacity 0.12s;
  }
  .pt-page:hover .pt-edit { opacity: 1; }
  .pt-page--cta {
    background: #2563eb;
    color: #fff;
    border-left-color: #1d4ed8;
  }
  .pt-page--cta .pt-icon { color: #fff; }
  .pt-page--cta:hover {
    background: #1d4ed8;
    color: #fff;
    border-left-color: #1e40af;
  }
  .pt-page--cta:hover .pt-icon { color: #fff; }

  /* Sections sub-list — nested under a page in the Pages tree.
   * Wix-style indented rows showing each editable section of the page. */
  .pt-sections {
    background: #fafbfd;
    border-top: 1px solid #eef0f5;
    border-bottom: 1px solid #eef0f5;
    padding: 6px 0 8px;
  }
  .pt-sections-title {
    font-family: var(--mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 8px 18px 6px 42px;
  }
  .pt-section {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 9px 18px 9px 42px;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 13px;
    color: #475569;
    text-align: left;
    transition: background 0.12s, color 0.12s;
  }
  .pt-section:hover { background: #eef4ff; color: #1d4ed8; }
  .pt-section-marker {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    font-size: 9px;
    font-weight: 800;
    color: #2563eb;
    text-transform: lowercase;
    flex-shrink: 0;
  }
  .pt-section:hover .pt-section-marker {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
  }
  .pt-section-name { flex: 1; }

  /* Pulse highlight when a section is opened from the Pages tree, so
   * the user sees which area on the page they jumped to. */
  @keyframes section-pulse-ring {
    0%   { box-shadow: 0 0 0 0   rgba(37, 99, 235, 0.0); outline-color: rgba(37, 99, 235, 0.0); }
    20%  { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.18); outline-color: rgba(37, 99, 235, 0.85); }
    100% { box-shadow: 0 0 0 0   rgba(37, 99, 235, 0.0); outline-color: rgba(37, 99, 235, 0.0); }
  }
  .section-pulse {
    outline: 2px solid rgba(37, 99, 235, 0);
    outline-offset: 6px;
    border-radius: 12px;
    animation: section-pulse-ring 1.6s ease-out both;
  }

  .admin-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 32px 0;
    display: flex;
    flex-direction: column;
  }

  .admin-sidebar h4 {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text-faint);
    text-transform: uppercase;
    padding: 0 24px 12px;
  }

  .admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-dim);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 2px solid transparent;
  }

  .admin-nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text);
  }

  .admin-nav-item.active {
    color: var(--cyan);
    border-left-color: var(--cyan);
    background: rgba(0, 240, 200, 0.05);
  }

  .admin-nav-item .count {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-faint);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 2px;
  }

  .admin-main {
    padding: 32px 48px;
    overflow-y: auto;
  }

  .admin-panel { display: none; }
  .admin-panel.active { display: block; }

  .admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-wrap: wrap;
  }

  .admin-header h2 {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.02em;
  }
  .admin-header h2 em { font-style: italic; color: var(--cyan); }

  .admin-header p {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 4px;
  }

  .dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
  }

  .dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-left: 2px solid var(--cyan);
  }

  .dash-card.amber { border-left-color: var(--amber); }
  .dash-card.magenta { border-left-color: var(--magenta); }
  .dash-card.success { border-left-color: var(--success); }

  .dash-label {
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .dash-value {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.02em;
  }

  .dash-sub {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 6px;
  }

  .listings-table {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 24px;
  }

  .table-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }

  .table-header h3 {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
  }

  .table-row {
    display: grid;
    grid-template-columns: 60px 1fr 100px 100px 80px 140px;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
  }

  .table-row:last-child { border-bottom: none; }
  .table-row:hover { background: var(--bg-elevated); }

  .table-row.head {
    background: var(--bg-elevated);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .table-thumb {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
      linear-gradient(45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(-45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #1a1c22 75%),
      linear-gradient(-45deg, transparent 75%, #1a1c22 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    background-color: #0f1115;
  }

  .table-thumb svg,
  .table-thumb img {
    width: 80%;
    height: 80%;
    object-fit: contain;
  }

  .row-title { font-family: var(--serif); font-size: 14px; }
  .row-sub { font-size: 10px; color: var(--text-faint); margin-top: 2px; }

  .price-cell {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--cyan);
  }

  .status-pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid;
  }

  .status-pill.live { color: var(--success); border-color: var(--success); }
  .status-pill.draft { color: var(--text-faint); border-color: var(--border-glow); }

  .row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-size: 11px;
  }

  .icon-btn:hover { color: var(--text); border-color: var(--cyan-dim); }
  .icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

  .upload-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .upload-dropzone {
    border: 2px dashed var(--border-glow);
    padding: 40px 24px;
    text-align: center;
    background: var(--bg-card);
    transition: all 0.3s;
    cursor: pointer;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .upload-dropzone:hover,
  .upload-dropzone.drag {
    border-color: var(--cyan);
    background: rgba(0, 240, 200, 0.02);
  }

  .upload-dropzone.has-file {
    border-style: solid;
    border-color: var(--cyan-dim);
    padding: 20px;
    background-image:
      linear-gradient(45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(-45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #1a1c22 75%),
      linear-gradient(-45deg, transparent 75%, #1a1c22 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #0f1115;
  }

  .upload-dropzone img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
  }

  .upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: var(--cyan);
  }

  .upload-dropzone h4 {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 6px;
  }

  .upload-dropzone p {
    color: var(--text-dim);
    font-size: 11px;
  }

  .form-group { margin-bottom: 18px; }

  .form-label {
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
  }

  .form-input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-glow);
    color: var(--text);
    padding: 10px 14px;
    font-family: var(--mono);
    font-size: 13px;
    transition: all 0.2s;
  }

  .form-input:focus {
    outline: none;
    border-color: var(--cyan);
  }

  textarea.form-input { resize: vertical; min-height: 80px; font-family: var(--mono); }

  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
  }

  .btn {
    padding: 12px 22px;
    border: none;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    transition: all 0.2s;
  }

  .btn-primary { background: var(--blue); color: #ffffff; }
  .btn-primary:hover { background: var(--blue-hover); box-shadow: 0 0 24px var(--blue-glow); }
  .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

  .btn-amber { background: var(--amber); color: #1f1000; }
  .btn-amber:hover { background: #ffb06a; }

  .btn-ghost {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--text-dim);
  }
  .btn-ghost:hover { border-color: var(--text-dim); color: var(--text); }

  .btn-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
  }
  .btn-danger:hover { background: var(--danger); color: #1f0005; }

  .sales-row {
    display: grid;
    grid-template-columns: 50px 1fr 180px 90px 130px 60px;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    font-size: 12px;
  }

  .sales-row:last-child { border-bottom: none; }

  .sales-row.head {
    background: var(--bg-elevated);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .addr { font-family: var(--mono); color: var(--text-dim); font-size: 11px; }
  .tx-link { color: var(--cyan); font-size: 10px; cursor: pointer; }
  .tx-link:hover { text-decoration: underline; }

  .login-screen {
    min-height: calc(100vh - 65px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
  }

  .login-box {
    max-width: 420px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    padding: 40px;
    text-align: center;
  }

  .login-box h2 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 8px;
  }
  .login-box h2 em { font-style: italic; color: var(--cyan); }

  .login-box p {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 28px;
  }

  .login-hint {
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-elevated);
    border-left: 2px solid var(--amber);
    font-size: 11px;
    color: var(--text-dim);
    text-align: left;
  }

  .login-hint strong { color: var(--amber); }
  .login-hint code { color: var(--cyan); background: var(--bg); padding: 2px 6px; }

  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 9, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.25s ease;
  }

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

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

  .modal {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    max-width: 560px;
    width: 100%;
    padding: 32px;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
  }
  .modal-close:hover { color: var(--text); }

  .modal-label {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--cyan);
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .modal h3 {
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
  }

  .modal h3 em { font-style: italic; color: var(--cyan); }

  .mm-box {
    border: 1px solid var(--border);
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-elevated);
  }

  .mm-box:hover { border-color: var(--amber); background: rgba(255, 157, 74, 0.05); }

  .mm-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f6851b, #e2761b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    color: white;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
  }

  .mm-info { flex: 1; }
  .mm-name { font-size: 14px; color: var(--text); margin-bottom: 2px; }
  .mm-desc { font-size: 11px; color: var(--text-faint); }

  .buy-preview {
    background: var(--bg-elevated);
    aspect-ratio: 2;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
      linear-gradient(45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(-45deg, #1a1c22 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #1a1c22 75%),
      linear-gradient(-45deg, transparent 75%, #1a1c22 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #0f1115;
  }

  .buy-preview svg,
  .buy-preview img { width: 50%; height: 80%; object-fit: contain; }

  .buy-details { display: flex; flex-direction: column; gap: 0; margin: 20px 0; }

  .buy-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 12px;
  }

  .buy-row:last-child { border-bottom: none; }
  .buy-row-label { color: var(--text-dim); }
  .buy-row-value { color: var(--text); font-family: var(--mono); }
  .buy-row-value.highlight { color: var(--cyan); font-size: 16px; }

  .buy-actions { display: flex; gap: 12px; margin-top: 24px; }
  .buy-actions .btn { flex: 1; }

  .spinner-wrap { text-align: center; padding: 20px 0; }

  .spinner {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border-glow);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 20px;
  }

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

  .processing-steps { list-style: none; padding: 0; margin: 24px 0; text-align: left; }

  .processing-steps li {
    padding: 10px 0;
    font-size: 12px;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px dashed var(--border);
  }

  .processing-steps li.done { color: var(--success); }
  .processing-steps li.active { color: var(--cyan); }

  .step-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
  }

  .processing-steps li.done .step-check {
    background: var(--success);
    color: #0a0b0f;
    border-color: var(--success);
  }

  .processing-steps li.active .step-check {
    border-color: var(--cyan);
    animation: pulse 1.2s ease-in-out infinite;
  }

  .success-icon {
    width: 72px;
    height: 72px;
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--success);
    font-size: 36px;
    animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

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

  .tx-hash {
    font-size: 10px;
    color: var(--text-faint);
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    margin: 20px 0;
    word-break: break-all;
    text-align: left;
  }

  .tx-hash-label {
    display: block;
    color: var(--text-dim);
    margin-bottom: 6px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 9px;
  }

  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--cyan);
    border-left: 3px solid var(--cyan);
    padding: 16px 20px;
    z-index: 2000;
    max-width: 340px;
    animation: slideIn 0.3s ease;
    display: none;
  }

  .toast.active { display: block; }
  .toast.danger { border-color: var(--danger); border-left-color: var(--danger); }
  .toast.danger .toast-title { color: var(--danger); }

  /* === Subscribe / trial-exhausted modal ===
     CRITICAL: must be display:none when [hidden] is present, otherwise
     `display: flex` from this rule overrides the HTML hidden attribute
     and the modal appears on every page load. */
  .subscribe-modal[hidden] { display: none !important; }
  .subscribe-modal {
    position: fixed; inset: 0; z-index: 10000;
    align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
  }
  .subscribe-modal:not([hidden]) {
    display: flex;
    animation: fadeIn 180ms ease-out;
  }
  .subscribe-card {
    position: relative;
    width: 100%; max-width: 480px;
    background: #131c33;
    border-radius: 22px;
    padding: 32px 28px 28px;
    color: #f1f5f9;
    box-shadow:
      0 0 0 1.5px rgba(236, 72, 153, 0.55),
      0 0 0 1.5px rgba(99, 102, 241, 0.45),
      0 0 36px rgba(236, 72, 153, 0.25),
      0 0 56px rgba(99, 102, 241, 0.18),
      0 24px 60px rgba(0, 0, 0, 0.7);
    background-image:
      linear-gradient(#0e1626, #0e1626),
      linear-gradient(135deg, #ec4899 0%, #6366f1 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 1.5px solid transparent;
    text-align: center;
  }
  .subscribe-close {
    position: absolute; top: 12px; right: 14px;
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: 0; border-radius: 50%;
    color: #fff; font-size: 18px; cursor: pointer;
    transition: background 120ms;
  }
  .subscribe-close:hover { background: rgba(255, 255, 255, 0.18); }
  .subscribe-icon { font-size: 44px; line-height: 1; margin-bottom: 6px; }
  .subscribe-title {
    margin: 0 0 8px;
    font-family: var(--serif, Georgia, serif);
    font-size: 22px;
    background: linear-gradient(135deg, #ec4899, #6366f1);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
  }
  .subscribe-msg {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px; line-height: 1.5;
  }
  .subscribe-actions {
    display: flex; gap: 10px;
    margin-bottom: 22px;
  }
  .subscribe-btn {
    flex: 1; padding: 11px 18px;
    border-radius: 12px; cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.06em;
    transition: transform 120ms, filter 120ms, background 120ms;
  }
  .subscribe-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
  }
  .subscribe-btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
  .subscribe-btn-ghost {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
  }
  .subscribe-btn-ghost:hover { color: rgba(255, 255, 255, 0.85); }
  .subscribe-btn-primary {
    background: linear-gradient(135deg, #ec4899, #6366f1);
    border: 0; color: #fff;
    box-shadow: 0 0 18px rgba(236, 72, 153, 0.30);
  }
  .subscribe-btn-primary:hover {
    transform: translateY(-1px); filter: brightness(1.06);
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.50);
  }
  .subscribe-pro {
    margin-top: 4px;
    padding: 18px 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    text-align: left;
  }
  .subscribe-pro-title {
    margin: 0 0 12px;
    font-size: 14px; letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a5b4fc;
    text-align: center;
  }
  .subscribe-pro-list {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px; line-height: 1.7;
  }
  .subscribe-pro-list li { padding: 2px 0; }
  .subscribe-btn-pro {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(99, 102, 241, 0.6);
    color: #a5b4fc;
    cursor: pointer;
  }
  .subscribe-btn-pro:hover {
    background: rgba(99, 102, 241, 0.14);
    border-style: solid;
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  /* === UI sounds toggle — small, fixed, low-weight === */
  .looky-sounds-toggle {
    position: fixed;
    left: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    cursor: pointer;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 120ms ease, background 120ms ease, color 120ms ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  }
  .looky-sounds-toggle:hover {
    transform: translateY(-1px) scale(1.05);
    background: rgba(15, 23, 42, 0.9);
  }
  .looky-sounds-toggle.is-off {
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.06);
  }

  @keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }

  .toast-title { font-size: 12px; color: var(--cyan); margin-bottom: 4px; letter-spacing: 0.05em; }
  .toast-msg { font-size: 11px; color: var(--text-dim); }

  /* ---------- Search Engine (ported from visionlooky_news) ---------- */

  .searchrow {
    border-bottom: 1px solid var(--border);
    background: rgba(17, 19, 24, 0.6);
    backdrop-filter: blur(12px);
    padding: 16px 48px;
    position: sticky;
    top: 104px;
    z-index: 50;
  }

  .searchrow-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .search-form {
    display: flex;
    flex: 1;
    border: 1px solid transparent;
    background: #533AFE;
    border-radius: 999px;
    overflow: hidden;
    transition: all 0.2s;
  }

  .search-form:focus-within {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(83, 58, 254, 0.35), 0 0 32px rgba(83, 58, 254, 0.25);
  }

  .search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--mono);
    font-size: 14px;
    padding: 12px 22px;
    letter-spacing: 0.01em;
  }

  .search-input:focus { outline: none; }
  .search-input::placeholder { color: rgba(255, 255, 255, 0.6); }

  .search-cat {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 16px;
    cursor: pointer;
  }

  .search-cat:focus { outline: none; color: #ffffff; }

  .search-submit {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    border: none;
    padding: 0 22px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
  }

  .search-submit:hover { background: rgba(0, 0, 0, 0.5); }

  .search-shortcut {
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .search-shortcut kbd {
    background: var(--bg-elevated);
    border: 1px solid var(--border-glow);
    padding: 2px 6px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--cyan);
    margin: 0 2px;
  }

  .results-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 48px 0;
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }

  .results-header.active { display: flex; }

  .result-count {
    font-family: var(--serif);
    font-size: 20px;
    color: var(--text);
    font-weight: 400;
  }

  .result-count em { font-style: italic; color: var(--cyan); font-weight: 500; }

  .result-clear {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--text-dim);
    padding: 6px 14px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s;
  }

  .result-clear:hover {
    color: var(--danger);
    border-color: var(--danger);
  }

  mark.hl {
    background: rgba(0, 240, 200, 0.18);
    color: var(--cyan);
    padding: 0 2px;
    font-style: normal;
  }

  /* ---------- AI Agent card (Agents section) ---------- */
  .agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
  }
  .agent-card:hover {
    border-color: var(--cyan-dim);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -20px rgba(0, 240, 200, 0.2);
  }
  .agent-preview {
    aspect-ratio: 16 / 10;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .agent-preview-icon {
    font-size: 64px;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.45));
    animation: agentPulse 3s ease-in-out infinite;
  }
  @keyframes agentPulse {
    0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
    50%      { transform: translateY(-4px) scale(1.04); opacity: 0.92; }
  }
  .agent-framework-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--cyan);
    background: rgba(10, 11, 15, 0.7);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border: 1px solid var(--cyan-dim);
    text-transform: uppercase;
  }
  .agent-tier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    padding: 3px 8px;
    text-transform: uppercase;
    font-weight: 500;
  }
  .agent-tier-badge.basic { background: var(--cyan); color: #0a0b0f; }
  .agent-tier-badge.mid   { background: var(--amber); color: #1f1000; }
  .agent-tier-badge.pro   { background: var(--magenta); color: #fff; }
  .agent-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
  .agent-category {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .agent-title {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .agent-desc {
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .agent-stats {
    display: flex;
    gap: 12px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.05em;
    flex-wrap: wrap;
  }
  .agent-stats b { color: var(--text-dim); font-weight: 400; }
  .agent-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    margin-top: auto;
  }
  .agent-price {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--cyan);
  }

  /* ---------- 3D model card (3D section) ---------- */
  .model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
  }
  .model-card:hover {
    border-color: var(--cyan-dim);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -20px rgba(0, 240, 200, 0.2);
  }
  .model-preview {
    aspect-ratio: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .model-icon {
    font-size: 72px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.45));
    animation: modelSpin 16s linear infinite;
    transform-style: preserve-3d;
  }
  .model-card:hover .model-icon { animation-duration: 4s; }

  .stl-viewer {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    cursor: grab;
  }
  .stl-viewer canvas { display: block; width: 100% !important; height: 100% !important; }
  .stl-viewer.loading::after {
    content: 'Loading 3D…';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text-faint);
    text-transform: uppercase;
  }
  @keyframes modelSpin {
    0%   { transform: rotateY(0deg); }
    50%  { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
  }
  .model-format-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--text);
    background: rgba(10, 11, 15, 0.6);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border: 1px solid var(--border-glow);
  }
  .model-tier-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    padding: 3px 8px;
    text-transform: uppercase;
    font-weight: 500;
  }
  .model-tier-badge.basic { background: var(--cyan); color: #0a0b0f; }
  .model-tier-badge.mid   { background: var(--amber); color: #1f1000; }
  .model-tier-badge.pro   { background: var(--magenta); color: #fff; }
  .model-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .model-title {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.01em;
  }
  .model-category {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .model-stats {
    display: flex;
    gap: 10px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-dim);
  }
  .model-stats b { color: var(--text); font-weight: 400; }
  .model-use-cases {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  .model-use-chip {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border: 1px solid var(--border-glow);
    color: var(--text-dim);
    text-transform: uppercase;
  }
  .model-use-chip.print { color: var(--amber); border-color: var(--amber); }
  .model-use-chip.game  { color: var(--cyan);  border-color: var(--cyan-dim); }
  .model-use-chip.ar    { color: var(--magenta); border-color: var(--magenta); }
  .model-use-chip.animation { color: #b388ff; border-color: #7953e0; }
  .model-use-chip.cad   { color: #90caf9; border-color: #64b5f6; }
  .model-use-chip.film  { color: #ff5a6a; border-color: var(--danger); }
  .model-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    margin-top: auto;
  }
  .model-price {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 500;
    color: var(--cyan);
  }

  /* ---------- App card (Apps section) ---------- */
  .app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
  }
  .app-card:hover {
    border-color: var(--cyan-dim);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -20px rgba(0, 240, 200, 0.2);
  }
  .app-preview {
    aspect-ratio: 16 / 10;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .app-preview-icon {
    font-size: 56px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  }
  .app-tier-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    padding: 4px 10px;
    text-transform: uppercase;
    font-weight: 500;
  }
  .app-tier-badge.basic  { background: var(--cyan);    color: #0a0b0f; }
  .app-tier-badge.mid    { background: var(--amber);   color: #1f1000; }
  .app-tier-badge.pro    { background: var(--magenta); color: #ffffff; }
  .app-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
  .app-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
  }
  .app-title {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }
  .app-desc {
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-dim);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .app-meta-row {
    display: flex;
    gap: 12px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.05em;
  }
  .app-meta-row b { color: var(--text-dim); font-weight: 400; }
  .app-platforms {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .app-plat-chip {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 4px;
  }
  .app-plat-chip.available {
    background: var(--bg-elevated);
    color: var(--cyan);
    border-color: var(--cyan-dim);
  }
  .app-plat-chip.unavailable {
    color: var(--text-faint);
    opacity: 0.4;
  }
  .app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    margin-top: auto;
  }
  .app-price {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--cyan);
  }
  .app-download {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    text-transform: uppercase;
  }
  .app-download:hover { color: var(--cyan); }

  /* ==================================================
     Hero band — wraps the hero + category pills + breadcrumb/sort row
     in a clean white strip so they don't float over the decorative art
     ================================================== */
  .hero-band {
    position: relative;
    /* Rounded card surface — matches the section-banner curve language
     * so every section (Images, Music, Webapps, Agents, Models) reads
     * as a contained pill of content rather than a full-bleed strip. */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(250, 250, 252, 0.82) 100%);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow:
      0 1px 2px rgba(15, 23, 42, 0.05),
      0 16px 36px -22px rgba(15, 23, 42, 0.18);
    padding: 22px 28px 18px;
    margin: 14px 16px 18px;
    overflow: hidden;
    z-index: 1;
  }

  /* ==================================================
     Section tutorial video banner (3D / Images)
     Two-column: text on the left, smaller video on the right
     ================================================== */
  .threed-tutorial {
    max-width: 960px;
    margin: 24px auto 32px !important;
    padding: 22px 26px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%) !important;
    border: 1px solid rgba(20, 73, 252, 0.18);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(20, 73, 252, 0.08);
    position: relative;
    overflow: hidden;
    display: grid !important;
    grid-template-columns: 1fr 380px !important;
    gap: 26px;
    align-items: center;
  }
  .threed-tutorial::before {
    content: "";
    position: absolute;
    top: -40px; left: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(20, 73, 252, 0.12), transparent 70%);
    pointer-events: none;
  }
  .threed-tutorial::after {
    content: "";
    position: absolute;
    bottom: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255, 74, 138, 0.09), transparent 70%);
    pointer-events: none;
  }
  .threed-tutorial-text {
    position: relative;
    text-align: left;
  }
  .threed-tutorial-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cyan, #1449FC);
    font-weight: 700;
    margin-bottom: 8px;
  }
  .threed-tutorial-title {
    font-family: var(--sans, system-ui);
    font-size: clamp(18px, 2.4vw, 24px);
    font-weight: 700;
    color: var(--text, #111);
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }
  .threed-tutorial-desc {
    font-family: var(--sans, system-ui);
    font-size: 14px;
    color: var(--text-dim, #555);
    line-height: 1.55;
    margin: 0;
  }
  .threed-tutorial-video {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  }
  .threed-tutorial-video iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
  }
  @media (max-width: 720px) {
    .threed-tutorial {
      grid-template-columns: 1fr !important;
      padding: 20px 16px !important;
      margin: 16px auto 24px !important;
      border-radius: 14px;
      text-align: center;
    }
    .threed-tutorial-text { text-align: center; }
  }

  /* ==================================================
     Feature row — below the product grid on store sections
     High Quality · Multiple Formats · Secure Downloads · Instant Access
     ================================================== */
  .feature-row {
    max-width: 1400px;
    margin: 36px auto 48px;
    padding: 0 48px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
  }
  .feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border, #e7e7e7);
    border-radius: 14px;
    transition: border-color .15s, box-shadow .15s;
  }
  .feature-item:hover {
    border-color: var(--cyan, #1449FC);
    box-shadow: 0 8px 20px rgba(20, 73, 252, 0.08);
  }
  .feature-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 22px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(20, 73, 252, 0.08), rgba(255, 74, 138, 0.06));
  }
  .feature-text { min-width: 0; }
  .feature-title {
    font-family: var(--sans, system-ui);
    font-size: 14px;
    font-weight: 700;
    color: var(--text, #111);
    line-height: 1.2;
  }
  .feature-sub {
    font-family: var(--sans, system-ui);
    font-size: 12px;
    color: var(--text-dim, #666);
    margin-top: 3px;
    line-height: 1.35;
  }
  @media (max-width: 720px) {
    .feature-row { padding: 0 16px; }
  }

  /* ====================================================================
   * 2026-04-29 — Menu Editor (admin panel-menu-editor)
   * Mirrors Joomla/CMS-style menu manager pattern referenced by user.
   * ==================================================================== */
  .me-breadcrumb {
    font-family: var(--mono);
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
  }
  .me-breadcrumb a { color: #2563eb; text-decoration: none; }
  .me-breadcrumb a:hover { text-decoration: underline; }
  .me-breadcrumb span { color: #94a3b8; }

  .me-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
  }
  .me-row-label {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111;
  }
  .me-select {
    max-width: 360px;
    flex: 0 0 auto;
  }

  .me-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
  }

  .me-section {
    margin-bottom: 28px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
  }
  .me-section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #111;
    margin-bottom: 4px;
  }
  .me-section-sub {
    font-family: var(--mono);
    font-size: 11px;
    color: #64748b;
    margin-bottom: 14px;
  }

  .me-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .me-list--empty .me-empty {
    padding: 20px;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    text-align: center;
    font-family: var(--mono);
    font-size: 12px;
    color: #64748b;
  }
  .me-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
  }
  .me-item:hover { border-color: #cbd5e1; }
  .me-item--hidden { opacity: 0.55; }
  .me-item-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    min-width: 0;
  }
  .me-item-icon {
    font-size: 18px;
    flex: 0 0 auto;
  }
  .me-item-sub {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 360px;
  }
  .me-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }
  .btn.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
  .me-btn-danger {
    color: #b91c1c;
  }
  .me-btn-danger:hover {
    background: #fef2f2;
    color: #991b1b;
  }
  .me-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    user-select: none;
  }
  .me-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
  }

  /* Modal — add/edit custom link */
  .me-modal[hidden] { display: none; }
  .me-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .me-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
  }
  .me-modal-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 18px;
    padding: 22px 24px 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
  }
  .me-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
  }
  .me-modal-head h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #111;
    margin: 0;
  }
  .me-modal-close {
    background: transparent;
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    transition: background 0.15s ease;
  }
  .me-modal-close:hover { background: #f1f5f9; color: #111; }
  .me-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
  }
  .form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 13px;
    color: #475569;
    cursor: pointer;
  }

  /* ====================================================================
   * Banner Manager — admin panel-banner-manager
   * ==================================================================== */
  .bm-count {
    font-family: var(--mono);
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
  }
  .bm-table-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
  }

  /* Hero Avatars admin grid */
  .hero-avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
  }
  .ha-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }
  .ha-card-villain {
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: 0 6px 16px -10px rgba(220, 38, 38, 0.4);
  }
  .ha-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
  }
  .ha-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .ha-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .ha-name {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
  }
  .ha-team {
    font-family: var(--mono);
    font-size: 11px;
    color: #64748b;
  }
  .ha-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .ha-actions .btn { width: 100%; }

  /* ---- Backgrounds (per-section gradient editor) ---- */
  .bg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
  }
  .bg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
  }
  .bg-preview {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-bottom: 1px solid #e2e8f0;
  }
  .bg-meta {
    padding: 12px 14px 6px;
    display: flex;
    flex-direction: column;
  }
  .bg-name {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
  }
  .bg-id {
    font-family: var(--mono);
    font-size: 11px;
    color: #94a3b8;
  }
  .bg-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 14px 4px;
  }
  .bg-stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-family: var(--mono);
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .bg-stop input[type="color"] {
    width: 100%;
    height: 36px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
  }
  /* Hex-only color input — visual swatch + text field */
  .bg-color-pair {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 6px;
    width: 100%;
  }
  .bg-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    display: block;
    flex: 0 0 36px;
  }
  .bg-color-pair input[type="text"] {
    width: 100%;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 12px;
    color: #0f172a;
    text-transform: lowercase;
    background: #ffffff;
  }
  .bg-color-pair input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  }

  /* Solid-color toggle */
  .bg-solid-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 14px 0;
    padding: 8px 0 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
  }
  .bg-solid-toggle input { accent-color: #2563eb; cursor: pointer; }
  .bg-solid-toggle em {
    color: #64748b;
    font-style: normal;
    font-size: 11px;
  }
  .bg-controls--solid .bg-stop--gradonly,
  .bg-controls--solid .bg-midpos.bg-stop--gradonly {
    display: none;
  }
  .bg-controls--solid {
    grid-template-columns: 1fr;
  }

  /* Color templates gallery */
  .bg-templates-section {
    margin-bottom: 18px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
  }
  .bg-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .bg-template-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
  }
  .bg-template-card:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
    box-shadow: 0 10px 22px -12px rgba(37, 99, 235, 0.35);
  }
  .bg-template-strip {
    display: flex;
    height: 56px;
  }
  .bg-template-strip span {
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
  }
  .bg-template-strip span:last-child { border-right: 0; }
  .bg-template-name {
    display: block;
    padding: 10px 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
  }
  .bg-midpos {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
    font-family: var(--mono);
    font-size: 11px;
    color: #475569;
  }
  .bg-midpos em { color: #0f172a; font-weight: 700; font-style: normal; }
  .bg-midpos input[type="range"] {
    width: 100%;
    accent-color: #2563eb;
    cursor: pointer;
  }
  .bg-actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
  }
  .bg-actions .btn { flex: 1; }

  /* ---- Pattern overlay UI ---- */
  .bg-rangelbl {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--mono);
    font-size: 11px;
    color: #475569;
  }
  .bg-rangelbl em { color: #0f172a; font-weight: 700; font-style: normal; }
  .bg-rangelbl input[type="range"] {
    width: 100%;
    accent-color: #2563eb;
    cursor: pointer;
  }

  .bg-pattern-section {
    margin: 4px 14px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
  }
  .bg-pattern-section summary {
    cursor: pointer;
    padding: 6px 0;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
  }
  .bg-pattern-section summary::-webkit-details-marker { display: none; }
  .bg-pattern-section summary::after {
    content: '▾';
    color: #94a3b8;
    font-size: 10px;
    transition: transform 0.15s;
  }
  .bg-pattern-section[open] summary::after { transform: rotate(180deg); }
  .bg-pattern-current {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .bg-pattern-none-row {
    margin: 8px 0;
  }
  .bg-pattern-group {
    margin: 10px 0 4px;
  }
  .bg-pattern-cat {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
  }
  .bg-pattern-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
  }
  .bg-pattern-thumb {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s, box-shadow 0.15s;
  }
  .bg-pattern-thumb:hover { border-color: #94a3b8; transform: translateY(-1px); }
  .bg-pattern-thumb.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  }
  .bg-pattern-prev {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background-color: #fafafa;
  }
  .bg-pattern-prev--none {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
  }
  .bg-pattern-label {
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #334155;
    line-height: 1;
    text-align: center;
  }
  .bg-pattern-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
  }
  .bg-pattern-controls .bg-stop {
    grid-column: 1 / -1;
  }

  .bg-canvas-row {
    margin: 4px 14px 8px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: end;
  }
  .bg-canvas-toggle {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
  }
  .bg-canvas-toggle input { accent-color: #2563eb; cursor: pointer; }
  .bg-canvas-toggle em {
    color: #64748b;
    font-style: normal;
    font-size: 11px;
  }

  /* Per-section banner-icon controls */
  .bg-icon-row {
    margin: 4px 14px 8px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: start;
  }
  .bg-icon-preview {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 32px;
    line-height: 1;
  }
  .bg-icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }
  .bg-icon-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
  }
  .bg-icon-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 13px;
    color: #0f172a;
    background: #ffffff;
  }
  .bg-icon-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  }
  .bg-icon-actions {
    display: flex;
    gap: 6px;
  }
  .bg-icon-actions .btn { flex: 1; }
  .bg-stop.is-disabled {
    opacity: 0.45;
    pointer-events: none;
  }

  .bg-card-global {
    border-color: #2563eb;
    box-shadow: 0 8px 22px -12px rgba(37, 99, 235, 0.35);
  }
  .bg-global-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    vertical-align: middle;
  }

  /* ---- Saved themes gallery ---- */
  .bg-themes-section {
    margin-bottom: 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
  }
  .bg-themes-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }
  .bg-themes-head h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
  }
  .bg-themes-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: #475569;
  }
  .bg-themes-help {
    font-family: var(--mono);
    font-size: 11px;
    color: #94a3b8;
  }
  .bg-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
  .bg-theme-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
  }
  .bg-theme-card:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.35);
  }
  .bg-theme-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
  }
  .bg-theme-pal {
    display: flex;
    height: 18px;
  }
  .bg-theme-pal span { flex: 1; }
  .bg-theme-name {
    display: block;
    padding: 8px 10px 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bg-theme-row {
    display: flex;
    gap: 6px;
    padding: 0 8px 8px;
  }
  .btn-tiny {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    flex: 1;
  }
  .bg-theme-del:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
  }

  /* ---- Theme preview modal ---- */
  .theme-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .theme-modal[hidden] { display: none; }
  .theme-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
  }
  .theme-modal-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    width: min(640px, 100%);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    z-index: 1;
  }
  .theme-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
  }
  .theme-modal-head h3 {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
  }
  .theme-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #E00C41;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .theme-modal-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    padding: 20px;
    overflow-y: auto;
  }
  .theme-modal-imgwrap {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
  }
  .theme-modal-imgwrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .theme-modal-meta { display: flex; flex-direction: column; gap: 8px; }
  .theme-modal-label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
  }
  .theme-swatches {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
  }
  .theme-swatch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 72px;
  }
  .theme-swatch-color {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    flex: 0 0 auto;
  }
  .theme-swatch-hex {
    width: 72px;
    height: 26px;
    padding: 0 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 11px;
    color: #0f172a;
    text-transform: lowercase;
    text-align: center;
    background: #ffffff;
  }
  .theme-swatch-hex:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  }
  .theme-swatch-del {
    position: absolute;
    top: -6px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 38, 38, 0.95);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .theme-swatch:hover .theme-swatch-del { opacity: 1; }
  .theme-swatch-add {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px dashed #cbd5e1;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    align-self: flex-start;
    transition: border-color 0.15s, color 0.15s;
  }
  .theme-swatch-add:hover {
    border-color: #2563eb;
    color: #2563eb;
  }
  .theme-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
  }
  @media (max-width: 600px) {
    .theme-modal-body { grid-template-columns: 1fr; }
    .theme-modal-imgwrap { max-width: 220px; }
  }
  .bm-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
  }
  .bm-table thead {
    background: #f8fafc;
  }
  .bm-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
  }
  .bm-table td {
    padding: 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
  }
  .bm-table tbody tr:last-child td { border-bottom: 0; }
  .bm-table tbody tr:hover { background: #f8fafc; }
  .bm-row--inactive { opacity: 0.6; }
  .bm-id {
    font-family: var(--mono);
    color: #94a3b8;
    font-weight: 700;
  }
  .bm-title {
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
  }
  .bm-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 999px;
  }
  .bm-caption {
    color: #475569;
    max-width: 320px;
    line-height: 1.4;
  }
  .bm-ctalabel {
    font-weight: 600;
    color: #111;
  }
  .bm-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .bm-status--on  { background: #dcfce7; color: #166534; }
  .bm-status--off { background: #fee2e2; color: #991b1b; }
  .bm-options {
    text-align: right;
    white-space: nowrap;
  }
  .bm-link {
    background: transparent;
    border: 0;
    color: #2563eb;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
  }
  .bm-link:hover { text-decoration: underline; }
  .bm-link--danger { color: #b91c1c; }
  .bm-link--danger:hover { color: #991b1b; }
  .bm-divider { color: #cbd5e1; margin: 0 2px; }
  .bm-empty {
    padding: 32px;
    text-align: center;
    color: #64748b;
    font-family: var(--mono);
    font-size: 12px;
  }

  /* ================== DASHBOARD — 10-up KPI grid + chart + timeline ================== */
  .dash-h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #111;
    margin: 12px 0 18px;
  }
  .dash-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 12px 16px 12px 14px;
    margin-bottom: 20px;
    color: #92400e;
    font-family: var(--mono);
    font-size: 13px;
    position: relative;
  }
  .dash-notice .dash-notice-bar {
    width: 4px;
    height: 24px;
    background: #ef4444;
    border-radius: 4px;
    flex: 0 0 auto;
  }
  .dash-notice p { margin: 0; flex: 1 1 auto; }
  .dash-notice-x {
    background: transparent;
    border: 0;
    font-size: 18px;
    color: #92400e;
    cursor: pointer;
    padding: 0 4px;
  }
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
  }
  @media (max-width: 1280px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  @media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 720px)  { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-width: 0;
  }
  .kpi-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
  }
  .kpi-lbl {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .kpi-qual {
    font-family: var(--mono);
    font-size: 11px;
    color: #94a3b8;
    flex: 0 0 auto;
  }
  .kpi-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .kpi-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    flex: 0 0 auto;
  }
  .kpi-icon--blue    { background: #dbeafe; }
  .kpi-icon--green   { background: #dcfce7; }
  .kpi-icon--orange  { background: #fed7aa; }
  .kpi-icon--cyan    { background: #cffafe; }
  .kpi-icon--magenta { background: #fce7f3; }
  .kpi-icon--purple  { background: #ede9fe; }
  .kpi-icon--teal    { background: #ccfbf1; }
  .kpi-num {
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #111;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  /* Chart + activity timeline split */
  .dash-split {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
  }
  @media (max-width: 1024px) { .dash-split { grid-template-columns: 1fr; } }
  .dash-card-lg {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }
  .dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #111;
  }
  .dash-card-head strong { font-weight: 800; }
  .dash-card-sub {
    color: #94a3b8;
    font-family: var(--mono);
    font-size: 12px;
  }
  .dash-chart {
    width: 100%;
    height: 220px;
    display: block;
  }

  .dash-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
    border-left: 2px solid #e2e8f0;
    padding-left: 14px;
  }
  .dash-timeline .dt-item {
    display: grid;
    grid-template-columns: 60px 14px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
  }
  .dash-timeline .dt-item:last-child { border-bottom: 0; }
  .dt-time {
    font-family: var(--mono);
    font-size: 11px;
    color: #94a3b8;
    padding-top: 2px;
  }
  .dt-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    margin-left: -19px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px currentColor;
  }
  .dt-dot--green { color: #22c55e; background: #22c55e; }
  .dt-dot--blue  { color: #3b82f6; background: #3b82f6; }
  .dt-dot--red   { color: #ef4444; background: #ef4444; }
  .dt-dot--cyan  { color: #06b6d4; background: #06b6d4; }
  .dt-text {
    color: #111;
    line-height: 1.4;
  }
  .dt-text em { color: #2563eb; font-style: normal; }
  .dt-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-family: var(--mono);
    font-size: 12px;
  }

  /* Dark-mode overrides for the dashboard */
  body.dark-mode .dash-h2 { color: #f1f5f9; }
  body.dark-mode .kpi-card,
  body.dark-mode .dash-card-lg {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .kpi-lbl,
  body.dark-mode .kpi-num,
  body.dark-mode .dash-card-head strong,
  body.dark-mode .dt-text { color: #f1f5f9; }
  body.dark-mode .kpi-qual,
  body.dark-mode .dash-card-sub,
  body.dark-mode .dt-time { color: #94a3b8; }
  body.dark-mode .dash-timeline { border-left-color: rgba(255, 255, 255, 0.1); }
  body.dark-mode .dash-timeline .dt-item { border-bottom-color: rgba(255, 255, 255, 0.05); }
  body.dark-mode .dt-dot { border-color: #1e293b; }

  /* ================== AI AGENTS — stat strip ================== */
  .ai-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 8px;
  }
  .ai-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
  }
  .ai-stat-num {
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #111;
    line-height: 1;
  }
  .ai-stat-lbl {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 4px;
  }

  /* ================== MANAGE — tile grid ================== */
  .manage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }
  .manage-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .manage-tile:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.18);
  }
  .manage-tile--soon { opacity: 0.7; }
  .mt-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 22px;
    flex: 0 0 auto;
  }
  .mt-text { display: flex; flex-direction: column; min-width: 0; }
  .mt-text strong {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #111;
  }
  .mt-text span {
    font-family: var(--mono);
    font-size: 11px;
    color: #64748b;
  }

  /* ================== BILLING ================== */
  .bs-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 22px;
  }
  .bs-tab {
    padding: 10px 0;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
  }
  .bs-tab:hover { color: #111; }
  .bs-tab--active { color: #2563eb; border-bottom-color: #2563eb; }
  .bs-h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #111;
    margin: 0 0 4px;
  }
  .bs-sub {
    font-family: var(--mono);
    font-size: 12px;
    color: #64748b;
    margin: 0 0 22px;
  }
  .bs-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr);
    gap: 24px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
  }
  .bs-row:last-child { border-bottom: 0; }
  .bs-row-label strong {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 2px;
  }
  .bs-row-help {
    font-family: var(--mono);
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
  }
  .bs-input { max-width: 360px; }
  .bs-empty {
    padding: 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-family: var(--mono);
    font-size: 12px;
  }
  .bs-gateway {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  .bs-gw-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 18px;
    flex: 0 0 auto;
  }
  .bs-gw-meta {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
  .bs-gw-meta strong {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #111;
  }
  .bs-gw-meta span {
    font-family: var(--mono);
    font-size: 11px;
    color: #64748b;
  }
  .bs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
  }
  .bs-toggle input { width: 16px; height: 16px; accent-color: #2563eb; }

  /* ================== STATS ================== */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
  }
  .stat-card {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
  }
  .stat-num {
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #111;
    line-height: 1;
  }
  .stat-lbl {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 6px;
  }
  .stats-section { margin-top: 28px; }
  .stats-h3 {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #111;
    margin: 0 0 14px;
  }
  .stats-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .stat-bar {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    gap: 14px;
    align-items: center;
  }
  .stat-bar-label {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: #475569;
  }
  .stat-bar-track {
    height: 10px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
  }
  .stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    border-radius: 999px;
    transition: width 0.4s ease;
  }
  .stat-bar-count {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    text-align: right;
  }

  /* ================== APPEARANCE — theme picker ================== */
  .theme-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  .theme-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .theme-chip:hover { border-color: #94a3b8; color: #111; }
  .theme-chip--active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
  }
  .tc-swatch {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }
  .tc-swatch--light { background: linear-gradient(135deg, #ffffff, #f1f5f9); }
  .tc-swatch--dark  { background: linear-gradient(135deg, #1e293b, #0f172a); }
  .tc-swatch--auto  { background: linear-gradient(135deg, #ffffff 50%, #1e293b 50%); }

  /* ================== DARK MODE — global overrides ================== */
  body.dark-mode {
    background: #0a0e1a;
    color: #e2e8f0;
  }
  body.dark-mode .home-card,
  body.dark-mode .home-rail,
  body.dark-mode .app-rail,
  body.dark-mode .home-ads,
  body.dark-mode .section-banner,
  body.dark-mode .ad-card,
  body.dark-mode .home-search,
  body.dark-mode .chip,
  body.dark-mode .market-tile,
  body.dark-mode .product-card,
  body.dark-mode .store-card-pill,
  body.dark-mode .store-card-cta,
  body.dark-mode .admin-shell {
    background: rgba(30, 41, 59, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0;
  }
  body.dark-mode .admin-sidebar { background: #111827 !important; border-right-color: rgba(255, 255, 255, 0.08) !important; }
  body.dark-mode .admin-main    { background: #0a0e1a !important; }
  body.dark-mode .admin-nav-item { color: #cbd5e1; }
  body.dark-mode .admin-nav-item:hover { background: rgba(255, 255, 255, 0.05); }
  body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
  body.dark-mode .home-card-title, body.dark-mode .product-card-title,
  body.dark-mode .market-tile-name, body.dark-mode .ad-card-title,
  body.dark-mode .home-headline, body.dark-mode .sb-title { color: #f1f5f9; }
  body.dark-mode .home-card-link { color: #f87171; }
  body.dark-mode .rail-item { color: #cbd5e1; }
  body.dark-mode .rail-item:hover { background: rgba(255, 255, 255, 0.06); }
  body.dark-mode .rail-item.active {
    background: linear-gradient(90deg, rgba(244, 114, 182, 0.18), rgba(167, 139, 250, 0.18));
    color: #fbcfe8;
  }
  body.dark-mode .rail-icon { color: #cbd5e1; }
  body.dark-mode .me-section,
  body.dark-mode .me-item,
  body.dark-mode .stat-card,
  body.dark-mode .ai-stat,
  body.dark-mode .manage-tile,
  body.dark-mode .bs-gateway,
  body.dark-mode .bm-table-wrap {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #e2e8f0;
  }
  body.dark-mode .bm-table thead { background: #111827; }
  body.dark-mode .bm-table th { color: #94a3b8; border-bottom-color: rgba(255, 255, 255, 0.08); }
  body.dark-mode .bm-table td { border-bottom-color: rgba(255, 255, 255, 0.05); }
  body.dark-mode .bm-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
  body.dark-mode .bm-title, body.dark-mode .bm-ctalabel,
  body.dark-mode .stat-num, body.dark-mode .ai-stat-num,
  body.dark-mode .mt-text strong, body.dark-mode .bs-row-label strong { color: #f1f5f9; }
  body.dark-mode .bm-caption, body.dark-mode .bs-row-help,
  body.dark-mode .stat-lbl, body.dark-mode .ai-stat-lbl,
  body.dark-mode .mt-text span { color: #94a3b8; }
  body.dark-mode .form-input,
  body.dark-mode .me-select,
  body.dark-mode .bs-input {
    background: #0f172a;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.12);
  }
  body.dark-mode .me-modal-card { background: #1e293b; color: #e2e8f0; }
  body.dark-mode .me-empty { background: #1e293b; border-color: rgba(255, 255, 255, 0.1); color: #94a3b8; }
