/* =========================================
   SPI — CSS COMPLETO Y MEJORADO V2
   Enfoque en Mobile-First UX y pulido visual
   ========================================= */

/* ===================================================================
   1. SPI WALLET CONFIGURATION PANEL (panel-comercio) — DISEÑO PREMIUM
   =================================================================== */
   #spi-config {
    /* Paleta de colores (Modo Claro) */
    --c-primary: #111827;
    --c-text: #374151;
    --c-muted: #6b7280;
    --c-surface: #ffffff;
    --c-background: #f9fafb;
    --c-border: #e5e7eb;
    --c-accent: #0A74DA;
    --c-accent-hover: #0b67bf;
    --c-accent-text: #ffffff;
    --c-success: #10b981;
    --c-success-bg: #f0fdfa;
    --c-error: #ef4444;
    --c-error-bg: #fef2f2;
  
    /* Propiedades de UI */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.08);
    --focus-ring: 0 0 0 3px color-mix(in srgb, var(--c-accent) 25%, transparent);
    --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --fw-normal: 400;
    --fw-semibold: 600;
    --fw-bold: 700;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
    font-family: var(--font-sans);
    color: var(--c-text);
    background-color: var(--c-background);
  }
  
  body.dark #spi-config {
    /* Paleta de colores (Modo Oscuro) */
    --c-primary: #f9fafb;
    --c-text: #d1d5db;
    --c-muted: #9ca3af;
    --c-surface: #1f2937;
    --c-background: #111827;
    --c-border: #374151;
    --c-accent: #38bdf8;
    --c-accent-hover: #7dd3fc;
    --c-accent-text: #075985;
    --c-success: #34d399;
    --c-success-bg: #064e3b;
    --c-error: #f87171;
    --c-error-bg: #7f1d1d;
    
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.2), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.3);
  }
  
  /* --- Layout Principal --- */
  #spi-config .grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
  }
  @media (min-width: 1024px) {
    #spi-config .grid {
      grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
      align-items: start;
    }
  }
  
  #spi-config .card {
    background: var(--c-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--c-border);
    transition: var(--transition);
    
  }
  #spi-config .form-card { padding: clamp(16px, 3vw, 24px); }
  #spi-config .preview-card { padding: 16px; }
  
  #spi-config .title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: var(--fw-bold);
    font-size: 1.25rem;
    color: var(--c-primary);
    margin: 15px 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--c-border);
  }
  
  /* --- Secciones del Formulario --- */
  .form-section {
    padding: 16px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    background: color-mix(in srgb, var(--c-surface) 50%, var(--c-background));
  }
  .form-section-title {
    font-size: 1rem;
    font-weight: var(--fw-bold);
    color: var(--c-primary);
    margin: 0 0 16px 0;
  }
  #spi-config form .field { margin-bottom: 20px; }
  #spi-config .label {
    display: block;
    font-weight: var(--fw-semibold);
    color: var(--c-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
  }
  #spi-config .hint {
    color: var(--c-muted);
    font-size: 0.85rem;
    margin-top: 6px;
  }
  
  /* --- Inputs Personalizados --- */
  #spi-config input[type="text"],
  #spi-config input[type="number"],
  textarea,
  #spi-config select {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    padding: 12px 14px;
    background-color: var(--c-background);
    color: var(--c-text);
    outline: none;
    transition: var(--transition);
    font-size: 1rem;
  }
  #spi-config select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.7rem center;
    background-repeat: no-repeat;
    background-size: 1.25em;
    padding-right: 2.5rem;
  }
  #spi-config input[type="text"]:focus,
  #spi-config input[type="number"]:focus,
  #spi-config select:focus {
    border-color: var(--c-accent);
    box-shadow: var(--focus-ring);
    background-color: var(--c-surface);
  }
  
  .file-upload-wrapper { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .file-drop-zone {
    position: relative;
    flex-grow: 1;
    border: 2px dashed var(--c-border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--c-muted);
  }
  .file-drop-zone::before {
    font-family: 'Material Symbols Rounded';
    content: '\e2c6'; /* upload icon */
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
    transition: var(--transition);
  }
  .file-drop-zone:hover {
    border-color: var(--c-accent);
    color: var(--c-accent);
    background-color: color-mix(in srgb, var(--c-accent) 5%, transparent);
  }
  .file-drop-zone span { font-weight: var(--fw-semibold); pointer-events: none; }
  .file-upload-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
  }
  .file-preview {
    width: 72px; height: 72px;
    border-radius: var(--radius-md);
    background-color: var(--c-background);
    border: 1px solid var(--c-border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
  }
  .file-preview img { width: 100%; height: 100%; object-fit: contain; }
  
  .color-picker-wrapper { display: inline-flex; align-items: center; gap: 12px; }
  .color-input-ui {
    position: relative; width: 48px; height: 48px;
    border-radius: var(--radius-md);
    border: 2px solid var(--c-border);
    cursor: pointer;
    background-color: var(--color-value, var(--c-border));
    transition: var(--transition);
  }
  .color-input-ui:hover { transform: scale(1.1); }
  .color-input-ui input[type="color"] {
    position: absolute; inset: 0;
    width: 100%; height: 100%; opacity: 0; cursor: pointer;
  }
  .color-value-hex {
    font-family: monospace; font-weight: var(--fw-semibold); color: var(--c-primary);
    background-color: var(--c-background); padding: 8px 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--c-border);
  }
  
  /* --- Acciones y Alertas --- */
  #spi-config .actions {
    display: flex; justify-content: flex-end;
    margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--c-border);
  }
  #spi-config .btn {
    appearance: none; border: 0; cursor: pointer; background: var(--c-accent);
    color: var(--c-accent-text); border-radius: var(--radius-md);
    padding: 12px 24px; font-weight: var(--fw-bold); font-size: 1rem;
    transition: var(--transition);
  }
  #spi-config .btn:hover { background: var(--c-accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  #spi-config .btn:active { transform: translateY(0px) scale(0.98); box-shadow: var(--shadow); }
  
  #spi-config .spi-alert {
    border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 20px;
    font-weight: var(--fw-semibold); border-width: 1px; border-style: solid;
  }
  #spi-config .spi-alert.success { background: var(--c-success-bg); color: var(--c-success); border-color: color-mix(in srgb, var(--c-success) 20%, transparent); }
  #spi-config .spi-alert.error { background: var(--c-error-bg); color: var(--c-error); border-color: color-mix(in srgb, var(--c-error) 20%, transparent); }
  
  /* --- Vista Previa (Mockups) --- */
  #mockupContainer {
    --card-bg-color: #0A74DA; --card-text-color: #FFFFFF; --card-logo-url: none;
    --card-fondo-url: none; --card-sello-url: none; --card-stamp-columns: 4;
  }
  .mockup-frame {
    position: relative; width: 320px; height: 640px; border-radius: 40px;
    box-shadow: var(--shadow-lg); padding: 12px;
    border: 1px solid color-mix(in srgb, var(--c-border) 50%, #000);
    background: linear-gradient(145deg, var(--c-primary), color-mix(in srgb, var(--c-primary) 70%, #000));
    margin: 0 auto;
  }
  .mockup-screen {
    width: 100%; height: 100%; border-radius: 30px;
    background-color: var(--c-background); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
  }
  .loyalty-card-base {
    width: 90%; aspect-ratio: 1 / 1.58; border-radius: 20px;
    background-color: var(--card-bg-color); color: var(--card-text-color);
    overflow: hidden; display: flex; flex-direction: column;
    font-family: var(--font-sans); transition: background-color 0.3s, color 0.3s;
  }
  .iphone-card, .android-card {
      opacity: 0;
      transform: scale(0.95);
      transition: opacity 0.3s ease, transform 0.3s ease;
      display: none; /* Ocultos por defecto */
  }
  .iphone-card.active-mockup, .android-card.active-mockup {
      display: flex; /* Visible y animado */
      opacity: 1;
      transform: scale(1);
  }
  /* ... (el resto de los estilos de las tarjetas .iphone-card y .android-card de la V1 va aquí, no necesitan cambios) ... */
  .iphone-card { justify-content: space-between; }
  .iphone-card header { display: flex; justify-content: space-between; align-items: center; padding: 16px; }
  .iphone-card .logo { width: 40px; height: 40px; border-radius: 50%; background-color: white; background-image: var(--card-logo-url); background-size: contain; background-position: center; background-repeat: no-repeat; }
  .iphone-card .location { text-align: right; line-height: 1.2; }
  .iphone-card .location span { font-size: 12px; opacity: 0.8; text-transform: uppercase; }
  .iphone-card .location strong { font-size: 14px; }
  .iphone-card .banner { height: 100px; background-image: var(--card-fondo-url); background-size: cover; background-position: center; position: relative; }
  .banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); }
  .stamps-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--card-stamp-columns), 1fr); gap: 8px; padding: 12px; justify-items: center; }
  .stamp { width: 36px; height: 36px; border-radius: 50%; background-color: rgba(255,255,255,0.8); background-image: var(--card-sello-url); background-size: 80%; background-position: center; background-repeat: no-repeat; border: 2px solid rgba(255,255,255,0.5); }
  .stamp.earned { opacity: 1; }
  .stamp.pending { opacity: 0.4; background-color: rgba(255,255,255,0.3); }
  .iphone-card .info-row { display: flex; justify-content: space-between; padding: 16px; font-size: 12px; }
  .info-row .item { display: flex; flex-direction: column; }
  .info-row .item span { opacity: 0.8; }
  .info-row .item strong { font-size: 14px; }
  .iphone-card .qr-footer { text-align: center; padding-bottom: 12px; }
  .qr-footer img { width: 90px; height: 90px; border-radius: var(--radius-md); }
  .android-card { aspect-ratio: auto; height: 80%; }
  .android-card .card-header { display: flex; align-items: center; gap: 12px; padding: 16px; background: rgba(255,255,255,0.1); }
  .android-card .logo { width: 36px; height: 36px; border-radius: 50%; background-color: white; background-image: var(--card-logo-url); background-size: contain; }
  .android-card .company-name { font-weight: 600; }
  .android-card .card-body { padding: 16px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
  .card-body h3 { margin: 0 0 4px; font-size: 18px; }
  .card-body .sellos-count { font-size: 14px; opacity: 0.8; }
  .card-body .qr-code-section { margin: 16px auto; padding: 12px; background-color: #fff; border-radius: var(--radius-lg); display: inline-block; }
  .card-body img { width: 120px; height: 120px; display: block; }
  .card-body .qr-id { font-size: 12px; color: #555; margin-top: 6px; }
  .android-card .card-footer { min-height: 100px; background-image: var(--card-fondo-url); background-size: cover; background-position: center; position: relative; }
  
  /* --- Accesibilidad --- */
  .a11y-assistant { margin-top: 16px; padding: 16px; background-color: var(--c-background); border: 1px solid var(--c-border); border-radius: var(--radius-md); }
  .a11y-assistant .a11y-check { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .a11y-check .badge { border-radius: 999px; padding: 6px 12px; font-weight: var(--fw-bold); font-size: 0.8rem; letter-spacing: .5px; text-transform: uppercase; }
  .a11y-check .badge.ok { background: var(--c-success-bg); color: var(--c-success); }
  .a11y-check .badge.warn { background: #fffbeb; color: #b45309; }
  body.dark .a11y-check .badge.warn { background: #78350f; color: #fde68a; }
  .a11y-check .badge.fail { background: var(--c-error-bg); color: var(--c-error); }
  .a11y-check .a11y-ratio { font-weight: var(--fw-semibold); color: var(--c-muted); }
  .a11y-check .btn-link { appearance: none; border: 0; background: transparent; color: var(--c-accent); font-weight: var(--fw-semibold); cursor: pointer; text-decoration: underline; }
  
  /* ==========================================================
     MOBILE-FIRST UX: PESTAÑAS Y CONTROLES
     ========================================================== */
  .view-switcher {
      display: none; /* Oculto en desktop */
  }
  
  @media (max-width: 1023px) {
      #spi-config {
          padding: 0;
          background-color: var(--c-surface); /* El fondo ahora es la tarjeta */
      }
      .view-switcher {
          display: flex;
          position: sticky;
          top: 0;
          z-index: 10;
          background-color: color-mix(in srgb, var(--c-surface) 90%, transparent);
          backdrop-filter: blur(8px);
          padding: 8px;
          gap: 8px;
          border-bottom: 1px solid var(--c-border);
      }
      .view-switcher-btn {
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 8px;
          padding: 10px;
          border-radius: var(--radius-md);
          border: 0;
          background-color: transparent;
          color: var(--c-muted);
          font-weight: var(--fw-semibold);
          cursor: pointer;
          transition: var(--transition);
      }
      .view-switcher-btn.active {
          background-color: var(--c-accent);
          color: var(--c-accent-text);
          box-shadow: var(--shadow);
      }
  
      #spi-config.show-form .form-card { display: block; }
      #spi-config.show-form .preview-card { display: none; }
      
      #spi-config.show-preview .form-card { display: none; }
      #spi-config.show-preview .preview-card { display: block; }
  }
  
  /* ===================================================================
     2. REGISTRO DE CLIENTES (ESTILOS ORIGINALES)
     =================================================================== */
  .spi-wrap, .spi-wrap * { box-sizing: border-box; }
  
  :root{
    --bg:#0f1115; --fg:#e5e7eb; --muted:#9ca3af;
    --surface:#1c1f26; --surface-2:#171a20;
    --primary:#0A74DA; --primary-2:#2d89ef;
    --google-1:#16a34a; --google-2:#22c55e;
    --pw-1:#6d28d9; --pw-2:#9333ea;
    --ring:rgba(10,116,218,.25);
    --radius:16px; --shadow:0 10px 24px rgba(0,0,0,.35);
  }
  
  body.spi-painted {
    background:
      radial-gradient(1100px 500px at -10% -10%, rgba(45,137,239,.10), transparent 60%),
      radial-gradient(900px 400px at 110% -10%, rgba(16,163,69,.10), transparent 55%),
      var(--bg);
  }
  
  .spi-wrap{
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    display:flex; justify-content:center; padding:28px 12px;
  }
  .spi-card{
    width:100%; max-width:480px; background:var(--surface); color:var(--fg);
    border-radius:24px; box-shadow:var(--shadow); padding:22px;
  }
  
  /* ... (El resto de tus estilos originales desde .spi-top hasta el final se mantiene exactamente igual) ... */
  .spi-top{ display:flex; align-items:center; gap:8px; margin-bottom:10px; }
  .spi-back{ background:transparent; border:0; color:var(--primary); cursor:pointer; padding:6px 8px; border-radius:10px; }
  .spi-back:hover{ background:rgba(10,116,218,.12); }
  
  .spi-progress{ height:6px; background:#2a2f3a; border-radius:999px; overflow:hidden; margin:8px 0 18px; }
  .spi-progress > span{ display:block; height:100%; width:0%; background:linear-gradient(135deg,var(--primary),var(--primary-2)); transition:width .3s ease; }
  
  .spi-step{ display:none; }
  .spi-step.active{ display:block; animation:fadeIn .28s ease; }
  @keyframes fadeIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);} }
  
  h3.step-title{ font-size:1.28rem; font-weight:800; text-align:center; margin:4px 0 4px; letter-spacing:.2px; }
  .step-sub{ text-align:center; color:var(--muted); margin-bottom:16px; }
  
  .choice-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:8px; }
  @media (max-width:480px){ .choice-grid{ grid-template-columns:1fr; } }
  .choice{
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
    border:1px solid #2a2f3a; border-radius:16px; padding:16px;
    background:var(--surface-2); cursor:pointer; transition:transform .15s, box-shadow .2s, border-color .2s, background .2s;
  }
  .choice:hover{ transform:translateY(-1px); box-shadow:var(--shadow); border-color:transparent; background:#20242c; }
  .choice .mi{ font-family:"Material Symbols Rounded"; font-size:30px; line-height:1; color:var(--primary); }
  .choice .label{ font-weight:800; letter-spacing:.2px; }
  .choice small{ color:var(--muted); }
  
  form.spi-form { margin-top:10px; }
  .field{ display:grid; gap:6px; margin-bottom:12px; }
  .field label{ font-weight:700; color:var(--fg); }
  .input{
    width:100%; max-width:100%; border-radius:12px; border:1px solid #2a2f3a;
    background:#14171d; color:var(--fg); padding:12px 14px; font-size:1rem;
    transition:border-color .2s, box-shadow .2s, background .2s;
  }
  .input::placeholder{ color:#7c8596; }
  .input:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 4px var(--ring); background:#0f131a; }
  
  .btn{
    display:inline-flex; align-items:center; justify-content:center; gap:8px; width:100%;
    padding:13px 14px; border-radius:14px; border:0; cursor:pointer;
    background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; font-weight:800; letter-spacing:.2px;
    transition:transform .15s, filter .2s, box-shadow .2s;
  }
  .btn:hover{ filter:brightness(.97); box-shadow:0 8px 18px rgba(0,0,0,.25); }
  .btn:active{ transform:translateY(1px); }
  .mi{ font-family:"Material Symbols Rounded"; font-size:22px; line-height:1; }
  
  #spi-links{ margin:8px 0 16px; overflow:visible; }
  .download-cta{
    display:flex; gap:12px; align-items:center; width:100%;
    color:#fff; text-decoration:none; border-radius:16px; padding:14px 16px;
    margin:0 0 14px; box-shadow:0 10px 24px rgba(0,0,0,.25);
    transition: transform .15s ease, filter .2s ease;
  }
  .download-cta:hover{ filter:brightness(.97); transform: translateY(-1px); }
  .download-cta .badge{
    display:inline-grid; place-items:center; width:42px; height:42px; border-radius:12px; background:rgba(255,255,255,.16);
  }
  .download-cta .mi{ color:#fff; font-size:24px; }
  .download-cta .txt{ display:flex; flex-direction:column; line-height:1.15; }
  .download-cta .title{ font-weight:900; }
  .download-cta .sub{ opacity:.95; font-weight:600; font-size:.95rem; }
  
  .download-cta.google{ background:linear-gradient(135deg,var(--google-1),var(--google-2)); }
  .download-cta.passwallet{ background:linear-gradient(135deg,var(--pw-1),var(--pw-2)); }
  #spi-qr{
    --font:'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --surface:#ffffff; --text:#1f2937; --muted:#6b7280; --primary:#0f172a;
    --accent:#0284c7; --ring:rgba(2,132,199,.25); --shadow:0 12px 28px rgba(0,0,0,.10);
    --success:#10b981;
    --qr-size: clamp(220px, 42vw, 340px);
    --qr-radius:12px;
    font-family:var(--font); color:var(--text); width:100%; box-sizing:border-box;
  }
  body.dark #spi-qr{
    --surface:#1f2937; --text:#e5e7eb; --muted:#9ca3af; --primary:#f8fafc;
    --accent:#7dd3fc; --ring:rgba(125,211,252,.25); --shadow:0 16px 36px rgba(0,0,0,.35);
  }
  
  #spi-qr .shell{ background:var(--surface); box-shadow:var(--shadow); border-radius:18px; width:100%; padding:clamp(14px,2vw,22px); animation:qrFade .35s ease-out both; }
  @keyframes qrFade{ from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none} }
  
  #spi-qr .header{
    background:linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 70%, #065f46));
    color:#fff; border-radius:12px; padding:12px 14px; display:flex; align-items:center; gap:10px; margin-bottom:clamp(14px,2vw,18px);
  }
  #spi-qr .header .material-symbols-rounded{ font-variation-settings:"FILL" 1; }
  
  #spi-qr .content{
    display:grid; grid-template-columns:minmax(260px, 560px) 1fr;
    gap:clamp(16px, 2.2vw, 28px); align-items:start; width:100%;
  }
  @media (max-width:1024px){ #spi-qr .content{ grid-template-columns:1fr !important; } }
  #spi-qr .qr-card{ background:rgba(0,0,0,.03); border:1px solid rgba(0,0,0,.06); border-radius:14px; padding:clamp(12px,2vw,18px); }
  body.dark #spi-qr .qr-card{ background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.08); }
  #spi-qr .intro{ color:var(--muted); margin:2px 0 12px 0; }
  #spi-qr .qr-canvas{ display:grid; place-items:center; width:100%; padding:clamp(8px,1.5vw,12px); border-radius:12px; background:var(--surface); box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
  #spi-qr .qr-img{
    width:var(--qr-size); height:var(--qr-size); max-width:100%;
    border-radius:var(--qr-radius); transition:transform .16s ease, box-shadow .16s ease; box-shadow:0 6px 20px rgba(0,0,0,.08);
  }
  #spi-qr .qr-img:hover{ transform:translateY(-1px); }
  #spi-qr .size-controls{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
  #spi-qr .chip{
    border:1px solid rgba(0,0,0,.12); border-radius:999px; padding:6px 10px; cursor:pointer;
    background:var(--surface); color:var(--text); font-weight:700; font-size:.95rem; transition:box-shadow .15s, background .15s, transform .15s;
  }
  #spi-qr .chip[aria-pressed="true"]{ box-shadow:0 0 0 3px var(--ring) inset; }
  body.dark #spi-qr .chip{ border-color:rgba(255,255,255,.14); }
  #spi-qr .actions{ display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
  #spi-qr .btn-primary{ background:linear-gradient(135deg,var(--accent), color-mix(in srgb, var(--accent) 80%, #155e75)); color:#fff; box-shadow:0 6px 16px rgba(2,132,199,.22); }
  #spi-qr .btn-success{ background:linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 70%, #065f46)); color:#fff; box-shadow:0 6px 16px color-mix(in srgb, var(--success) 30%, transparent); }
  #spi-qr .btn-ghost{ background:transparent; color:var(--primary); box-shadow:inset 0 0 0 1px rgba(0,0,0,.14); }
  body.dark #spi-qr .btn-ghost{ box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); color:var(--text); }
  #spi-qr .material-symbols-rounded{ font-variation-settings:"FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24; }
  #spi-qr .link-wrap{ margin-top:10px; display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
  #spi-qr .link-field{
    width:100%; border-radius:12px; border:1px solid rgba(0,0,0,.12);
    padding:10px 12px; background:var(--surface); color:var(--text);
    font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  }
  body.dark #spi-qr .link-field{ border-color:rgba(255,255,255,.12); }
  #spi-qr .tips{
    background:var(--surface); border-radius:14px; padding:clamp(12px,2vw,16px);
    border:1px dashed rgba(0,0,0,.14);
  }
  body.dark #spi-qr .tips{ border-color:rgba(255,255,255,.22); }
  #spi-qr .tips h4{ margin:0 0 8px 0; font-weight:800; color:var(--primary); display:flex; align-items:center; gap:8px; }
  #spi-qr .tips .grid{ display:grid; gap:10px; grid-template-columns:1fr 1fr; }
  @media (max-width:720px){ #spi-qr .tips .grid{ grid-template-columns:1fr; } }
  #spi-qr .tips .item{ display:flex; align-items:flex-start; gap:8px; color:var(--muted); }
  #spi-qr .tips .material-symbols-rounded{ font-size:20px; opacity:.9; }
  #spi-qr .toast{
    position:fixed; left:50%; transform:translateX(-50%); bottom:22px;
    background:linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 70%, #0c4a6e));
    color:#fff; padding:10px 14px; border-radius:999px; font-weight:800; box-shadow:var(--shadow);
    opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; z-index:9999;
  }
  #spi-qr .toast.show{ opacity:1; transform:translate(-50%, -4px); }
  #spi-qr .overlay{
    position:fixed; inset:0; background:rgba(0,0,0,.65);
    display:none; place-items:center; z-index:10000;
  }
  #spi-qr .overlay.open{ display:grid; }
  #spi-qr .overlay .sheet{
    background:var(--surface); padding:16px; border-radius:16px; box-shadow:var(--shadow);
    display:grid; place-items:center; gap:10px;
  }
  #spi-qr .overlay img{ width:min(88vw, 560px); height:auto; border-radius:14px; }
  #spi-scan{
    --font:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    --surface:#fff; --text:#1f2937; --muted:#6b7280; --primary:#0f172a; --accent:#0284c7;
    --success:#10b981; --warning:#f59e0b; --danger:#ef4444; --ring:rgba(2,132,199,.25);
    --shadow:0 12px 30px rgba(0,0,0,.10); --qrbox:min(72vw,420px);
    font-family:var(--font); color:var(--text);
  }
  body.dark #spi-scan{ --surface:#1f2937; --text:#e5e7eb; --muted:#9ca3af; --primary:#f8fafc; --shadow:0 16px 36px rgba(0,0,0,.35); }
  #spi-scan .shell{ background:var(--surface); border-radius:18px; box-shadow:var(--shadow); padding:clamp(14px,2vw,22px); }
  #spi-scan .header{ background:linear-gradient(135deg,var(--accent), color-mix(in srgb, var(--accent) 70%, #0c4a6e)); color:#fff; border-radius:12px; padding:12px 14px; display:flex; gap:10px; align-items:center; margin-bottom:clamp(14px,2vw,18px); }
  #spi-scan .content{ display:grid; grid-template-columns:minmax(300px,600px) 1fr; gap:clamp(16px,2vw,26px); }
  @media (max-width:1024px){ #spi-scan .content{ grid-template-columns:1fr; } }
  #spi-scan .camera{ background:rgba(0,0,0,.03); border:1px solid rgba(0,0,0,.06); border-radius:14px; padding:clamp(12px,2vw,16px); }
  body.dark #spi-scan .camera{ background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.08); }
  #spi-scan #reader{ width:100%; display:grid; place-items:center; border-radius:14px; overflow:hidden; }
  #spi-scan #reader>div{ width:100%!important; display:grid; place-items:center; }
  #spi-scan .controls{ display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
  #spi-scan .select, #spi-scan .input{ border:1px solid rgba(0,0,0,.12); background:var(--surface); color:var(--text); border-radius:12px; padding:10px 12px; }
  body.dark #spi-scan .select, body.dark #spi-scan .input{ border-color:rgba(255,255,255,.14); }
  #spi-scan .select:focus, #spi-scan .input:focus{ border-color:var(--accent); box-shadow:0 0 0 4px var(--ring); outline:0; }
  #spi-scan .btn-primary{ background:linear-gradient(135deg,var(--accent), color-mix(in srgb, var(--accent) 80%, #155e75)); color:#fff; }
  #spi-scan .btn-ghost{ background:transparent; color:var(--primary); box-shadow:inset 0 0 0 1px rgba(0,0,0,.14); }
  body.dark #spi-scan .btn-ghost{ color:var(--text); box-shadow:inset 0 0 0 1px rgba(255,255,255,.2); }
  #spi-scan .btn-success{ background:linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 70%, #065f46)); color:#fff; }
  #spi-scan .btn-danger{ background:linear-gradient(135deg, var(--danger), #991b1b); color:#fff; }
  #spi-scan .zoom-wrap{ display:flex; align-items:center; gap:10px; }
  #spi-scan .slider{ appearance:none; width:220px; height:6px; border-radius:999px; background:rgba(0,0,0,.12); outline:none; }
  body.dark #spi-scan .slider{ background:rgba(255,255,255,.18); }
  #spi-scan .slider::-webkit-slider-thumb{ appearance:none; width:16px; height:16px; border-radius:50%; background:var(--accent); cursor:pointer; }
  #spi-scan .panel{ background:var(--surface); border:1px solid rgba(0,0,0,.08); border-radius:14px; padding:clamp(12px,2vw,16px); box-shadow:var(--shadow); }
  body.dark #spi-scan .panel{ border-color:rgba(255,255,255,.10); }
  #spi-scan .status{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; margin-bottom:10px; }
  #spi-scan .status.success{ background:rgba(16,185,129,.12); color:var(--success); }
  #spi-scan .status.warn{ background:rgba(245,158,11,.15); color:#b45309; }
  #spi-scan .status.error{ background:rgba(239,68,68,.15); color:#b91c1c; }
  #spi-scan .list{ display:grid; gap:8px; }
  #spi-scan .row{ display:grid; grid-template-columns:120px 1fr; gap:10px; }
  #spi-scan .k{ color:var(--muted); font-weight:700; }
  #spi-scan .badge{ background:rgba(2,132,199,.10); color:var(--accent); border-radius:999px; padding:4px 10px; font-weight:800; }
  #spi-scan .sellos{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
  #spi-scan .tag{ border-radius:999px; padding:6px 10px; background:rgba(16,185,129,.12); color:var(--success); font-weight:800; }
  #spi-scan .toast{
    position:fixed; left:50%; transform:translateX(-50%); bottom:22px;
    background:linear-gradient(135deg,var(--accent), color-mix(in srgb, var(--accent) 70%, #0c4a6e));
    color:#fff; padding:10px 14px; border-radius:999px; font-weight:800; box-shadow:var(--shadow);
    opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:9999;
  }
  #spi-scan .toast.show{ opacity:1; transform:translate(-50%,-4px); }
  #spi-scan .modal{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; place-items:center; z-index:10000; }
  #spi-scan .modal.open{ display:grid; }
  #spi-scan .sheet{
    background:var(--surface); color:var(--text); border-radius:16px; box-shadow:var(--shadow);
    padding:16px; max-width:640px; width:clamp(280px,92vw,640px);
  }
  #spi-scan .sheet h3{ margin:0 0 6px 0; }
  #spi-scan .actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
  #spi-scan .sellos{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
  #spi-scan .tag{ border-radius:999px; padding:6px 10px; background:rgba(16,185,129,.12); color:var(--success); font-weight:800; }
  .spi-alert{ border-radius:12px; padding:10px 12px; margin-bottom:10px; font-weight:700; }
  .spi-alert.success{ background:rgba(16,185,129,.12); color:#10b981; }
  .spi-alert.error{ background:rgba(239,68,68,.15); color:#b91c1c; }
  .spi-help-guide .spi-help-menu a{
    background:linear-gradient(135deg,var(--accent),var(--accent-2));
    color:#fff; padding:6px 12px; border-radius:8px; font-weight:700; text-decoration:none; transition:filter .2s;
  }
  .spi-help-guide .spi-help-menu a:hover{ filter:brightness(.96); }
  .spi-help-section{ margin-bottom:32px; }
  .spi-faq details{
    background:var(--surface); border:1px solid rgba(0,0,0,.1);
    border-radius:12px; padding:12px 16px; margin-bottom:10px;
  }
  .spi-faq summary{ cursor:pointer; font-weight:700; outline:none; }
  .spi-faq summary::-webkit-details-marker{ display:none; }
  .spi-faq details[open]{ background:rgba(2,132,199,.04); }
  .spi-card.spi-auth{ text-align:center; }
  .spi-card.spi-auth .spi-logo{
    display:block; width:160px; max-width:70%; height:auto; margin:0 auto 20px;
  }
  .spi-card.spi-auth h3.step-title{ font-size:1.15rem; margin-bottom:16px; }
  .spi-card.spi-auth .field label{ font-size:.9rem; }
  .spi-card.spi-auth .input{ font-size:.95rem; padding:10px 12px; border-radius:10px; }
  .spi-card.spi-auth .btn{ font-size:.95rem; padding:12px; border-radius:12px; }
  .spi-card.spi-auth .spi-link{ font-size:.9rem; }
  .spiux-docs{
    --font:'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    --surface:#ffffff; --text:#1f2937; --muted:#6b7280; --primary:#0f172a;
    --accent:#0284c7; --accent-2:#10b981; --ring:rgba(2,132,199,.25);
    --shadow:0 12px 28px rgba(0,0,0,.10);
    --success: var(--accent-2, #10b981);
    --warning:#f59e0b; --error:#ef4444; --info:var(--accent, #0284c7);
    font-family:var(--font); color:var(--text);
    width:95%; 
  }
  body.dark .spiux-docs{
    --surface:#1f2937; --text:#e5e7eb; --muted:#9ca3af; --primary:#f8fafc;
    --accent:#7dd3fc; --accent-2:#6ee7b7; --ring:rgba(125,211,252,.25);
    --shadow:0 16px 36px rgba(0,0,0,.35);
  }
  .spiux-docs{ line-height:1.6; background:var(--surface); color:var(--text); }
  .spiux-docs h1, .spiux-docs h2, .spiux-docs h3{ letter-spacing:-.01em; margin:0 0 .6rem; }
  .spiux-docs h1{ font-size:clamp(1.6rem,2.4vw,2.1rem); color:var(--primary); }
  .spiux-docs h2{ font-size:clamp(1.3rem,2vw,1.6rem); margin-top:1.2rem; color:var(--primary); }
  .spiux-docs h3{ font-size:clamp(1.1rem,1.6vw,1.25rem); margin-top:1rem; color:var(--muted); }
  .spiux-docs p{ margin:.4rem 0 1rem; color:var(--muted); }
  .spiux-docs hr{ border:0; border-top:1px solid rgba(0,0,0,.12); margin:1.2rem 0; }
  body.dark .spiux-docs hr{ border-top-color:rgba(255,255,255,.14); }
  .spiux-docs .spiux-card{
    background:var(--surface); border:1px solid rgba(0,0,0,.12);
    border-radius:16px; padding:1rem; box-shadow:var(--shadow); margin:.8rem 0;
  }
  body.dark .spiux-docs .spiux-card{ border-color:rgba(255,255,255,.14); }
  .spiux-docs .spiux-dl{
    display:grid; grid-template-columns:max-content 1fr; gap:.25rem .75rem; margin:.5rem 0 1rem;
  }
  .spiux-docs .spiux-dl dt{ color:var(--muted); }
  .spiux-docs .spiux-dl dd{ margin:0; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
  .spiux-docs .spiux-alert{
    border-radius:12px; padding:.75rem .9rem; border:1px solid rgba(0,0,0,.12);
    background:rgba(0,0,0,.03); display:grid; gap:.25rem; font-size:.95rem;
  }
  body.dark .spiux-docs .spiux-alert{ border-color:rgba(255,255,255,.14); background:rgba(255,255,255,.03); }
  .spiux-docs .spiux-alert--success{
    border-color: color-mix(in srgb, var(--success) 25%, transparent);
    background: color-mix(in srgb, var(--success) 8%, transparent);
    color: var(--text);
  }
  .spiux-docs .spiux-alert--warning{
    border-color: color-mix(in srgb, var(--warning) 25%, transparent);
    background: color-mix(in srgb, var(--warning) 10%, transparent);
  }
  .spiux-docs .spiux-alert--error{
    border-color: color-mix(in srgb, var(--error) 25%, transparent);
    background: color-mix(in srgb, var(--error) 10%, transparent);
  }
  .spiux-docs .spiux-alert--info{
    border-color: color-mix(in srgb, var(--info) 25%, transparent);
    background: color-mix(in srgb, var(--info) 10%, transparent);
  }
  .spiux-docs .spiux-btn{
    appearance:none; border:0; cursor:pointer; padding:.55rem .85rem; border-radius:12px;
    font-weight:800; display:inline-flex; align-items:center; gap:.5rem; box-shadow:var(--shadow);
  }
  .spiux-docs .spiux-btn--primary{ background:linear-gradient(135deg, var(--accent), var(--accent-2)); color:#fff; }
  .spiux-docs .spiux-btn--ghost{ background:transparent; color:var(--primary); box-shadow:inset 0 0 0 1px rgba(0,0,0,.14); }
  body.dark .spiux-docs .spiux-btn--ghost{ color:var(--text); box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
  .spiux-docs .spiux-btn:focus-visible{ outline:0; box-shadow:0 0 0 4px var(--ring); }
  .spiux-docs .spiux-pre{
    position:relative; background:rgba(0,0,0,.04); color:var(--text);
    border:1px solid rgba(0,0,0,.12); border-radius:16px; padding:.9rem 1rem;
    overflow:auto; box-shadow:var(--shadow); 
  }
  body.dark .spiux-docs .spiux-pre{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.14); }
  .spiux-docs .spiux-pre .spiux-copy{
    position:absolute; top:.5rem; right:.5rem; font:inherit; border:1px solid rgba(0,0,0,.14);
    background:transparent; color:inherit; border-radius:10px; padding:.25rem .5rem; cursor:pointer;
  }
  body.dark .spiux-docs .spiux-pre .spiux-copy{ border-color:rgba(255,255,255,.18); }
  .spiux-docs .spiux-code{ font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.95rem; }
  .spiux-docs .spiux-inline{
    font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background:rgba(0,0,0,.04); border:1px dashed rgba(0,0,0,.14); border-radius:10px; padding:.2rem .4rem;
  }
  body.dark .spiux-docs .spiux-inline{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.18); }
  .spiux-docs .spiux-kbd{
    font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--text); padding:.1rem .35rem; border-radius:6px;
    border:1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  }
  .spiux-docs .spiux-badge{
    font-size:.75rem; background:rgba(0,0,0,.04); border:1px solid rgba(0,0,0,.12);
    border-radius:999px; padding:.15rem .5rem;
  }
  body.dark .spiux-docs .spiux-badge{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.14); }
  .spiux-docs .spiux-ol{ counter-reset:step; list-style:none; padding:0; margin:.5rem 0 0; }
  .spiux-docs .spiux-ol > li{
    counter-increment:step; padding:.7rem .8rem; border:1px solid rgba(0,0,0,.12);
    border-radius:12px; margin:.6rem 0; background: color-mix(in srgb, var(--surface) 88%, #000);
  }
  body.dark .spiux-docs .spiux-ol > li{ border-color:rgba(255,255,255,.14); background: color-mix(in srgb, var(--surface) 92%, #fff); }
  .spiux-docs .spiux-ol > li::marker{ content:none; }
  .spiux-docs .spiux-ol > li::before{ content: counter(step) "."; font-weight:800; margin-right:.5rem; color:var(--muted); }
  .spiux-docs .spiux-meta{ color:var(--muted); font-size:.9rem; }
  .spiux-docs .spiux-row{ display:flex; gap:.8rem; align-items:center; flex-wrap:wrap; }
  .spiux-docs .spiux-grow{ flex:1 1 auto; }
  .spiux-docs .spiux-card ul{ padding-left:1.2rem; margin:.4rem 0 1rem; }
  .spiux-docs{
    inline-size:min(100%);
    padding:clamp(12px, 2.5vw, 24px);
  }
  .spiux-docs img,
  .spiux-docs svg,
  .spiux-docs video,
  .spiux-docs iframe{
    max-width:100%; height:auto; display:block;
  }
  .spiux-docs h1{ font-size:clamp(1.6rem, 2.6vw, 2.2rem); }
  .spiux-docs h2{ font-size:clamp(1.3rem, 2.1vw, 1.7rem); }
  .spiux-docs h3{ font-size:clamp(1.1rem, 1.7vw, 1.3rem); }
  .spiux-docs p, .spiux-docs li{ font-size:clamp(.95rem, 1.25vw, 1rem); }
  .spiux-docs .spiux-layout{
    display:grid; grid-template-columns:260px 1fr; gap:clamp(14px,2vw,28px); align-items:start;
  }
  @media (max-width:1080px){ .spiux-docs .spiux-layout{ grid-template-columns:220px 1fr; } }
  @media (max-width:920px){ .spiux-docs .spiux-layout{ grid-template-columns:1fr; } }
  .spiux-docs .spiux-toc{
    position:sticky; top:12px; background:var(--surface); border:1px solid rgba(0,0,0,.12);
    border-radius:12px; padding:12px; max-height:calc(100dvh - 24px); overflow:auto;
  }
  body.dark .spiux-docs .spiux-toc{ border-color:rgba(255,255,255,.14); }
  @media (max-width:920px){
    .spiux-docs .spiux-toc{ position:relative; top:auto; max-height:none; padding:0; border:0; background:transparent; }
    .spiux-docs .spiux-toc details{
      background:var(--surface); border:1px solid rgba(0,0,0,.12); border-radius:12px; padding:10px 12px;
    }
    body.dark .spiux-docs .spiux-toc details{ border-color:rgba(255,255,255,.14); }
    .spiux-docs .spiux-toc summary{ cursor:pointer; font-weight:800; color:var(--primary); list-style:none; }
    .spiux-docs .spiux-toc summary::-webkit-details-marker{ display:none; }
  }
  .spiux-docs .spiux-grid{ display:grid; gap:clamp(10px,2vw,16px); grid-template-columns:repeat(12, 1fr); }
  .spiux-docs .spiux-grid > .spiux-card{ grid-column:span 6; }
  @media (max-width:960px){ .spiux-docs .spiux-grid > .spiux-card{ grid-column:span 12; } }
  .spiux-docs .spiux-actions-stack .spiux-btn{ inline-size:auto; }
  @media (max-width:560px){
    .spiux-docs .spiux-actions-stack .spiux-btn{ inline-size:100%; justify-content:center; }
  }
  .spiux-docs .spiux-table-wrap{ overflow-x:auto; border-radius:12px; border:1px solid rgba(0,0,0,.12); }
  body.dark .spiux-docs .spiux-table-wrap{ border-color:rgba(255,255,255,.14); }
  .spiux-docs .spiux-table{ width:100%; border-collapse:collapse; min-width:560px; }
  .spiux-docs .spiux-table th, .spiux-docs .spiux-table td{ padding:.65rem .8rem; border-bottom:1px solid rgba(0,0,0,.08); }
  body.dark .spiux-docs .spiux-table th, body.dark .spiux-docs .spiux-table td{ border-bottom-color:rgba(255,255,255,.12); }
  .spiux-docs .spiux-pre{ font-size:clamp(.85rem, 1.2vw, .95rem); -webkit-overflow-scrolling:touch; }
  .spiux-docs .spiux-pre code, .spiux-docs .spiux-code{ white-space:pre; }
  @media (max-width:640px){
    .spiux-docs .spiux-pre code, .spiux-docs .spiux-code{ white-space:pre-wrap; word-break:break-word; }
  }
  .spiux-docs .spiux-alert{ display:grid; gap:.35rem; border-radius:12px; }
  @media (max-width:560px){ .spiux-docs .spiux-alert{ padding:.7rem .8rem; } }
  .spiux-docs .spiux-topbar{
    position:sticky; top:0; z-index:20;
    background:color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter:saturate(1.2) blur(6px);
    border-bottom:1px solid rgba(0,0,0,.08);
  }
  body.dark .spiux-docs .spiux-topbar{ border-bottom-color:rgba(255,255,255,.12); }
  .spiux-docs .spiux-topbar .spiux-topbar-row{ display:flex; align-items:center; gap:10px; padding:8px 0; }
  @media (max-width:720px){ .spiux-docs .spiux-topbar .spiux-topbar-actions{ margin-left:auto; } }
  .spiux-docs .spiux-steps{ display:flex; gap:8px; flex-wrap:wrap; }
  .spiux-docs .spiux-step{ padding:6px 10px; border-radius:999px; border:1px solid rgba(0,0,0,.12); }
  body.dark .spiux-docs .spiux-step{ border-color:rgba(255,255,255,.14); }
  @media (max-width:560px){
    .spiux-docs .spiux-footer{ text-align:center; }
    .spiux-docs .spiux-footer .spiux-row{ justify-content:center; }
  }
  @media (prefers-reduced-motion: reduce){
    .spiux-docs *{
      animation-duration:0.01ms !important;
      animation-iteration-count:1 !important;
      transition-duration:0.01ms !important;
      scroll-behavior:auto !important;
    }
  }
  .spiux-docs .spiux-hide-sm{ display:initial; }
  @media (max-width:560px){
    .spiux-docs .spiux-hide-sm{ display:none !important; }
    .spiux-docs .spiux-show-sm{ display:initial !important; }
  }
  #spi-scan #mlRowUrl > .k + div{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
    width:100%;
    min-width:0;
  }
  #spi-scan .url-field{
    flex:1 1 220px;
    min-width:0;
    width:100%;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  #spi-scan #mlRowUrl .btn{ 
    flex:0 0 auto;
  }
  @media (max-width:480px){
    #spi-scan .url-field{ inline-size:100%; }
    #spi-scan #mlRowUrl .btn{ flex:1 1 120px; }
    #spi-scan #mlRowUrl .tag{ width:100%; }
  }

  #qrSuggestList button {
    font: inherit;
  }
  #qrSuggestList .material-symbols-rounded {
    font-size: 20px;
    opacity: .7;
  }
  /* === Estilos del Autocompletar QR === */

.qr-suggest-list {
  position: absolute;
  z-index: 20;
  background: var(--panel-bg, #fff);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  min-width: 280px;
  max-width: 420px;
  max-height: 260px;
  overflow-y: auto;
  box-sizing: border-box;
}

.qr-suggest-item {
  display: flex;
  width: 100%;
  gap: 12px; /* Un poco más de espacio */
  align-items: center;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease-out;
}

/* Interactividad */
.qr-suggest-item:hover {
  background-color: #f4f4f4;
}
.qr-suggest-item:focus {
  background-color: #f0f0f0;
  outline: 2px solid #007bff;
  outline-offset: -2px;
}

/* Icono */
.qr-suggest-item .material-symbols-rounded {
  color: #007bff;
  font-size: 28px;
}

/* Texto */
.qr-suggest-item-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.qr-suggest-item-text strong {
  font-weight: 600;
  color: #222;
}

.qr-suggest-item-text small {
  color: #555;
}

/* Scrollbar (Opcional) */
.qr-suggest-list::-webkit-scrollbar {
  width: 6px;
}
.qr-suggest-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}