    .hero{display:flex;justify-content:center;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:18px;padding:18px 20px;border-radius:18px;background:rgba(17,24,39,.86);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.08);box-shadow:0 8px 24px rgba(0,0,0,.28);position:relative;z-index:40;overflow:visible}
    .brand{display:flex;align-items:center;gap:16px;padding-left:60px !important}.hero > div:first-child{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;width:100%}.theme-toggle{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#1f2937;color:#e5e7eb;border:1px solid rgba(255,255,255,.1);cursor:pointer}.theme-toggle:hover{border-color:rgba(56,189,248,.65)}body.light .theme-toggle{background:#ffffff;color:#0f172a;border-color:rgba(15,23,42,.12)}.theme-icon{font-size:20px;line-height:1}
    .toolbar-group{position:relative}
    .menu{position:absolute;top:calc(100% + 8px);right:0;min-width:220px;background:rgba(17,24,39,.98);border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:8px;box-shadow:0 16px 30px rgba(0,0,0,.35);z-index:9999}
    .menu button,.menu .filelbl{display:block;width:100%;text-align:left;background:transparent;border-radius:10px;border:none;padding:10px 12px}
    .menu button:hover,.menu .filelbl:hover{background:rgba(56,189,248,.08);border:none}
    .menu.hidden{display:none}
    h1{margin:0;font-size:32px;padding:0} h1 .brand-lockup{display:flex}.version-tag{color:#f8fafc;font-weight:800;text-shadow:0 1px 8px rgba(0,0,0,.35)} body.light .version-tag{color:#0f172a;text-shadow:0 1px 6px rgba(255,255,255,.35)}
    .sub{color:var(--sub)}
    .card{background:rgba(17,24,39,.86);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:16px;box-shadow:0 8px 24px rgba(0,0,0,.28)}
    .metric{font-size:20px;font-weight:700;margin-top:2px}
    input,select{
      background:#0b1220;
      color:var(--text);
      border:1px solid rgba(255,255,255,.12);
      border-radius:var(--control-radius);
      padding:10px 12px;
      transition:
        border-color var(--motion-med) ease,
        box-shadow var(--motion-med) ease,
        background var(--motion-med) ease;
    }
    .tablewrap{max-height:440px;overflow:auto;border-radius:14px;border:1px solid rgba(255,255,255,.08)}
    .pill{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700}
    .loop{background:#082f49;color:#bae6fd}.southern{background:#1f2937;color:#e5e7eb}.breakthru{background:#2b1a05;color:#fde68a}.wine{background:#2a1234;color:#f5d0fe}.unknown{background:#3f3f46;color:#e4e4e7}
    .muted{color:var(--sub)}
    .hidden{display:none!important}
    .tabs{display:flex;gap:8px;flex-wrap:wrap}
    .tabs button.active{outline:2px solid var(--accent)}
    .modalbg{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:18px}
    .modal{width:min(560px,100%);background:#0f172a;border:1px solid rgba(255,255,255,.1);border-radius:18px;padding:18px}
    .formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
    .formgrid .full{grid-column:1/-1}
    .status{
      margin-top:10px;
      font-size:14px;
      color:#cbd5e1;
      transition:color var(--motion-med) ease, opacity var(--motion-med) ease;
    }
    #statusBar{
      min-height:22px;
    }
    .rowactions{display:flex;gap:8px;flex-wrap:wrap}
    .small{font-size:12px}
    .toorder-col{background:rgba(56,189,248,.12)!important;font-weight:800;color:#e0f2fe}
    .toorder-head{background:linear-gradient(180deg,rgba(2,132,199,.38),rgba(17,24,39,1))!important;color:#e0f2fe}
    .notice{margin-top:8px;padding:10px 12px;border-radius:12px;background:rgba(56,189,248,.08);border:1px solid rgba(56,189,248,.18);color:#dbeafe}
    .vendor-summary{padding:8px 12px;border-radius:12px;background:rgba(56,189,248,.08);border:1px solid rgba(56,189,248,.18);color:#dbeafe;font-weight:700}
    .vendorbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
    .vendorbar .vendor-summary{min-width:320px;min-height:52px;display:flex;align-items:center}
    .vendorbar .tabs{display:flex;gap:8px;flex-wrap:wrap}
    .vendorbar .tabs button{min-width:160px;min-height:52px;height:52px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:14px}
    .vendorbar .toolbar-group{position:relative;width:160px}
    .vendorbar .toolbar-group #vendorExportMenuBtn{width:100%;min-height:52px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:14px}
    .vendorbar .menu{right:auto;left:0;width:200px}
    #vendorSearchInput{min-width:220px;min-height:52px;font-size:14px}
    #vendorExportArea td,#vendorExportArea th{font-size:14px}
    .toorder-low{background:rgba(255,255,255,.04)!important;color:#e5e7eb!important;font-weight:700}
    .toorder-mid{background:rgba(245,158,11,.16)!important;color:#fde68a!important;font-weight:800}
    .toorder-high{background:rgba(239,68,68,.18)!important;color:#fecaca!important;font-weight:800}
    .final-override{background:rgba(56,189,248,.08);border-radius:12px;padding:6px}
    .final-override input{border-color:rgba(56,189,248,.5)!important;box-shadow:0 0 0 1px rgba(56,189,248,.18) inset}
    #vendorExportArea table{table-layout:fixed;width:100%}
    #vendorExportArea col.vendor-col{width:11%}
    #vendorExportArea col.badge-col{width:5%}
    #vendorExportArea col.item-col{width:34%}
    #vendorExportArea col.onhand-col{width:10%}
    #vendorExportArea col.suggested-col{width:10%}
    #vendorExportArea col.toorder-col-width{width:12%}
    #vendorExportArea col.final-col{width:18%}
    #vendorExportArea th,#vendorExportArea td{font-size:14px;line-height:1.35;vertical-align:middle}
    #vendorExportArea .rowactions{display:flex;gap:8px;align-items:center;flex-wrap:nowrap}
    #vendorExportArea .rowactions input{width:110px;min-width:110px}
    #vendorExportArea .rowactions button{min-width:72px}
    #vendorExportArea td:nth-child(3), #vendorExportArea th:nth-child(3){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    #vendorExportArea td.badgecell, #vendorExportArea th.badgehead{text-align:center;padding-left:6px;padding-right:6px}
    .verified-badge{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      width:20px;
      height:20px;
      min-width:20px;
      border-radius:999px;
      background:#16a34a;
      color:#ffffff;
      font-size:12px;
      line-height:1;
      font-weight:800;
      box-shadow:0 2px 8px rgba(22,163,74,.28);
    }
    .verified-placeholder{
      display:inline-block;
      width:20px;
      height:20px;
    }
    @media(max-width:980px){.grid{grid-template-columns:repeat(2,1fr)}}
    @media(max-width:640px){.grid{grid-template-columns:1fr}.formgrid{grid-template-columns:1fr}}
  
.section-title{
  font-size:32px;
  font-weight:800;
  text-align:left;
  margin-bottom:20px;
  letter-spacing:0.5px;
}
.card{margin-bottom:30px;position:relative;z-index:1}

    body.light .card{background:rgba(255,255,255,.96);border-color:rgba(15,23,42,.08);box-shadow:0 8px 22px rgba(15,23,42,.08)}
    body.light .hero{background:rgba(255,255,255,.96);border-color:rgba(15,23,42,.08);box-shadow:0 8px 22px rgba(15,23,42,.08)}
    body.light .muted, body.light .small, body.light .status{color:#475569!important}
    body.light .metric, body.light h1, body.light .section-title, body.light strong, body.light th, body.light td, body.light label{color:#0f172a}
    body.light input, body.light select{background:#ffffff;color:#0f172a;border-color:rgba(15,23,42,.12)}
    body.light button, body.light .filelbl{background:#e8eef7;color:#0f172a;border-color:rgba(15,23,42,.12)}
    body.light .primary, body.light .filelbl.primary{background:linear-gradient(90deg,#0284c7,#38bdf8)!important;color:#ffffff!important;border:none!important}
    body.light .danger{background:#7f1d1d!important;color:#fee2e2!important;border:none!important}
    body.light .success{background:#166534!important;color:#dcfce7!important;border:none!important}
    body.light .tabs button.active{background:#dbeafe;color:#0f172a;outline:2px solid #38bdf8}
    body.light .vendor-summary{background:rgba(14,165,233,.08);border-color:rgba(14,165,233,.18);color:#0f172a}
    body.light .loop{background:#dbeafe;color:#0c4a6e}
    body.light .southern{background:#e2e8f0;color:#334155}
    body.light .breakthru{background:#fef3c7;color:#92400e}
    body.light .wine{background:#f3e8ff;color:#7e22ce}
    body.light .unknown{background:#e5e7eb;color:#374151}
    body.light .toorder-low{background:rgba(15,23,42,.04)!important;color:#0f172a!important}
    body.light .toorder-mid{background:rgba(245,158,11,.16)!important;color:#92400e!important}
    body.light .toorder-high{background:rgba(239,68,68,.14)!important;color:#991b1b!important}
    #vendorExportArea{overflow:auto; background:var(--card)}
    #vendorExportArea table{border-collapse:separate;border-spacing:0}
    #vendorExportArea thead th{position:sticky;top:0;z-index:5;background:var(--card);background-clip:padding-box}
    #vendorExportArea th.toorder-head{background:linear-gradient(180deg,rgba(2,132,199,.38),rgba(17,24,39,1))!important}
    body.light #vendorExportArea th.toorder-head{background:linear-gradient(180deg,rgba(2,132,199,.18),rgba(248,251,255,1))!important;color:#0f172a!important}

    #vendorExportArea{max-height:440px}
    #vendorExportArea table{table-layout:fixed;width:100%;border-collapse:collapse}

    body.light .notice{background:rgba(14,165,233,.08)!important;border-color:rgba(14,165,233,.18)!important;color:#0f172a!important}
    body.light .notice strong{color:#0f172a!important}
    body.light .sectionhead .small, body.light .small.muted{color:#475569!important}
    body.light .tablewrap{border:1px solid rgba(15,23,42,.12)!important}
    body.light th{
      background:#f8fbff!important;
      color:#0f172a!important;
      border-bottom:1px solid rgba(15,23,42,.12)!important;
    }
    body.light td{
      color:#0f172a!important;
      border-bottom:1px solid rgba(15,23,42,.12)!important;
    }
    body.light #inventoryBody tr, body.light #vendorBody tr, body.light #noMatchBody tr{
      background:transparent;
    }
    body.light #inventoryBody tr:hover, body.light #vendorBody tr:hover, body.light #noMatchBody tr:hover{
      background:rgba(15,23,42,.025);
    }
    body.light .toorder-col{
      background:rgba(14,165,233,.12)!important;
      color:#0f172a!important;
    }
    body.light .toorder-head{
      background:linear-gradient(180deg,rgba(14,165,233,.16),rgba(248,251,255,1))!important;
      color:#0f172a!important;
    }

    #searchInput{
      min-width:220px;
      min-height:52px;
      font-size:14px;
    }

    .section-card{padding:22px}
    .section-card .sectionhead{margin-bottom:16px}
    .section-card + .section-card{margin-top:2px}
    .section-header-row{margin-bottom:18px}
    .history-controls-top,
    .inventory-controls-bottom,
    .vendor-controls-bottom,
    .compare-toolbar{margin-bottom:16px}

    .vendor-header-row{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      width:100%;
    }
    .vendor-header-row > div:first-child{
      display:flex;
      flex-direction:column;
      justify-content:center;
      min-height:52px;
    }
    .vendor-header-row .vendor-summary{
      margin-left:auto;
      align-self:center;
      white-space:nowrap;
      min-width:52px;
      min-height:52px;
      height:52px;
      padding:0 16px;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      border-radius:12px;
      font-size:16px;
      line-height:1;
      font-weight:700;
      flex:0 0 auto;
    }
    .vendor-controls-top{display:flex;gap:12px;align-items:center;flex-wrap:nowrap;margin-bottom:14px}
    .vendor-controls-top .tabs{display:flex;gap:12px;align-items:center;flex-wrap:nowrap;flex:1}
    .vendor-controls-top .tabs button{flex:1 1 0}
    .vendor-export-wrap{width:220px;min-width:220px}
    .vendor-export-wrap #vendorExportMenuBtn{width:100%;min-height:52px}
    .vendor-controls-bottom{
      display:flex;
      justify-content:flex-end;
      align-items:center;
      gap:12px;
      margin-bottom:14px;
    }
    .vendor-controls-bottom #vendorSearchInput{
      min-width:330px;
    }
    #quickOrderBtn{
      min-width:220px;
      height:52px;
      min-height:52px;
      font-size:14px;
      padding:0 16px;
      flex:0 0 auto;
    }

    .tabs button{
      min-height:52px !important;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .vendor-controls-top .tabs button{
      flex:1 1 0;
      min-height:52px !important;
      height:52px;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
    }
    #vendorExportMenuBtn{
      min-height:52px !important;
      font-size:14px !important;
    }

    .section-header-row{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:16px;
    }
    .section-toggle{
      min-width:52px;
      min-height:52px;
      font-size:18px !important;
      line-height:1;
      padding:0 16px !important;
      display:flex;
      align-items:center;
      justify-content:center;
      flex:0 0 auto;
    }
    .section-body.collapsed{
      display:none;
    }

    .inventory-controls-top{
      display:flex;
      gap:12px;
      align-items:center;
      flex-wrap:nowrap;
      margin-bottom:14px;
    }
    .inventory-controls-top .tabs{
      display:flex;
      gap:12px;
      align-items:center;
      flex-wrap:nowrap;
      flex:1;
    }
    .inventory-controls-top .tabs button{
      flex:1 1 0;
      min-height:52px !important;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    .inventory-controls-bottom{
      display:flex;
      justify-content:flex-end;
      margin-bottom:14px;
    }
    .inventory-controls-bottom #searchInput{
      min-width:330px;
    }

    body.light .menu{
      background:rgba(255,255,255,.98)!important;
      border:1px solid rgba(15,23,42,.12)!important;
      box-shadow:0 16px 30px rgba(15,23,42,.12)!important;
    }
    body.light .menu button,
    body.light .menu .filelbl{
      color:#0f172a!important;
      background:transparent!important;
    }
    body.light .menu button:hover,
    body.light .menu .filelbl:hover{
      background:rgba(14,165,233,.08)!important;
      color:#0f172a!important;
    }

    #usageSection{
      margin-top:22px;
    }
    #usageSection .inventory-controls-top{
      display:flex;
      gap:12px;
      align-items:center;
      flex-wrap:nowrap;
      margin-bottom:14px;
    }
    #usageSection .inventory-controls-top .filelbl{
      min-height:52px;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      font-size:14px;
      min-width:240px;
    }
    #usageSection .inventory-controls-top #resetUsageBtn{
      min-height:52px !important;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex;
      align-items:center;
      justify-content:center;
      min-width:160px;
    }
    #usageSection .tablewrap{
      max-height:440px;
      overflow:auto;
      border-radius:14px;
      border:1px solid rgba(255,255,255,.08);
    }
    #usageSection table{
      width:100%;
      border-collapse:collapse;
      table-layout:fixed;
      font-size:14px;
    }
    #usageSection th, #usageSection td{
      padding:10px;
      border-bottom:1px solid rgba(255,255,255,.08);
      text-align:left;
    }
    #usageSection th{
      position:sticky;
      top:0;
      background:#111827;
      z-index:1;
    }
    #usageSection col.code-col{width:14%}
    #usageSection col.item-col{width:38%}
    #usageSection col.vendor-col{width:20%}
    #usageSection col.sold-col{width:12%}
    #usageSection col.usage-col{width:16%}
    #usageSection #usageEmpty{margin-top:10px}
    body.light #usageSection .tablewrap{
      border:1px solid rgba(15,23,42,.12)!important;
    }
    body.light #usageSection th{
      background:#f8fbff!important;
      color:#0f172a!important;
      border-bottom:1px solid rgba(15,23,42,.12)!important;
    }
    body.light #usageSection td{
      color:#0f172a!important;
      border-bottom:1px solid rgba(15,23,42,.12)!important;
    }

    #usageSection .inventory-controls-bottom{
      display:flex;
      justify-content:flex-end;
      margin-bottom:14px;
    }
    #usageSection .inventory-controls-bottom #usageSearchInput{
      min-width:330px;
      min-height:52px;
      font-size:14px;
    }

    body.light .modal{
      background:#ffffff!important;
      color:#0f172a!important;
      border:1px solid rgba(15,23,42,.12)!important;
      box-shadow:0 20px 40px rgba(15,23,42,.14)!important;
    }
    body.light .modal h3,
    body.light .modal label,
    body.light .modal .small,
    body.light .modal .muted{
      color:#0f172a!important;
    }
    body.light .modal input,
    body.light .modal select,
    body.light .modal textarea{
      background:#ffffff!important;
      color:#0f172a!important;
      border:1px solid rgba(15,23,42,.14)!important;
    }
    body.light .modal input::placeholder,
    body.light .modal textarea::placeholder{
      color:#64748b!important;
    }
    body.light .modal .card{
      background:#f8fbff!important;
      border-color:rgba(15,23,42,.08)!important;
    }

    .modalbg{
      overflow:auto;
      align-items:flex-start;
      padding:18px;
    }
    .modal{
      max-height:calc(100vh - 36px);
      overflow:auto;
      margin:auto 0;
    }
    #previewModalBg .modal{
      width:min(900px, calc(100vw - 36px)) !important;
      max-height:calc(100vh - 36px);
      overflow:auto;
    }
    @media(max-width:1280px){
      .topbar > button,.topbar > .filelbl,.topbar > .toolbar-group{
        width:calc(50% - 5px);
        min-width:240px;
      }
      .inventory-controls-top,
      .vendor-controls-top,
      #usageSection .inventory-controls-top{
        flex-wrap:wrap !important;
      }
      .inventory-controls-top .tabs,
      .vendor-controls-top .tabs{
        flex-wrap:wrap !important;
      }
      .inventory-controls-bottom,
      .vendor-controls-bottom,
      #usageSection .inventory-controls-bottom{
        justify-content:stretch !important;
      }
      .inventory-controls-bottom #searchInput,
      .vendor-controls-bottom #vendorSearchInput,
      #usageSection .inventory-controls-bottom #usageSearchInput{
        min-width:100% !important;
        width:100% !important;
      }
    }
    @media(max-width:900px){
      .vendor-header-row{
        align-items:flex-start;
        flex-wrap:wrap;
      }
      .vendor-header-row > div:first-child{
        min-height:0;
      }
      .vendor-header-row .vendor-summary{
        margin-left:0;
        font-size:15px;
        width:auto;
      }
      .topbar > button,.topbar > .filelbl,.topbar > .toolbar-group{
        width:100%;
        min-width:0;
      }
      .vendor-export-wrap{
        width:100% !important;
        min-width:0 !important;
      }
      .vendor-export-wrap #vendorExportMenuBtn{
        width:100% !important;
      }
      .grid{
        grid-template-columns:1fr !important;
      }
      #previewModalBg .grid{
        grid-template-columns:1fr 1fr !important;
      }
    }
    @media(max-width:640px){
      #previewModalBg .grid{
        grid-template-columns:1fr !important;
      }
      .section-title{
        font-size:22px;
      }
    }

    body{
      background:
        radial-gradient(1200px 700px at 8% 0%, rgba(56,189,248,.12), transparent 55%),
        radial-gradient(900px 600px at 100% 10%, rgba(168,85,247,.10), transparent 50%),
        radial-gradient(900px 700px at 50% 100%, rgba(14,165,233,.08), transparent 55%),
        linear-gradient(180deg,#020617 0%, #07111f 50%, #0b1220 100%);
      background-attachment: fixed;
    }
    .hero{
      background:rgba(15,23,42,.42);
      border:1px solid rgba(255,255,255,.12);
      box-shadow:
        0 24px 60px rgba(2,6,23,.38),
        inset 0 1px 0 rgba(255,255,255,.10);
      backdrop-filter: blur(20px) saturate(150%);
      -webkit-backdrop-filter: blur(20px) saturate(150%);
    }
    .card{
      background:rgba(15,23,42,.50);
      border:1px solid rgba(255,255,255,.10);
      box-shadow:
        0 16px 38px rgba(2,6,23,.30),
        inset 0 1px 0 rgba(255,255,255,.08);
      backdrop-filter: blur(18px) saturate(145%);
      -webkit-backdrop-filter: blur(18px) saturate(145%);
    }
    .tablewrap{
      background:rgba(2,6,23,.22);
      backdrop-filter: blur(14px) saturate(135%);
      -webkit-backdrop-filter: blur(14px) saturate(135%);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    }
    .notice,
    .vendor-summary{
      background:rgba(56,189,248,.10) !important;
      border:1px solid rgba(125,211,252,.20) !important;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
      backdrop-filter: blur(14px) saturate(135%);
      -webkit-backdrop-filter: blur(14px) saturate(135%);
    }
    button,.filelbl{
      background:rgba(31,41,55,.62);
      border:1px solid rgba(255,255,255,.11);
      box-shadow:
        0 10px 24px rgba(2,6,23,.18),
        inset 0 1px 0 rgba(255,255,255,.07);
      backdrop-filter: blur(12px) saturate(135%);
      -webkit-backdrop-filter: blur(12px) saturate(135%);
      transition: transform .12s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    }
    button:hover,.filelbl:hover{
      transform: translateY(-1px);
      box-shadow:
        0 14px 28px rgba(2,6,23,.22),
        inset 0 1px 0 rgba(255,255,255,.08);
    }
    input,select,textarea{
      background:rgba(11,18,32,.68);
      border:1px solid rgba(255,255,255,.12);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
      backdrop-filter: blur(10px) saturate(130%);
      -webkit-backdrop-filter: blur(10px) saturate(130%);
    }
    .menu{
      background:rgba(15,23,42,.84);
      border:1px solid rgba(255,255,255,.10);
      box-shadow:
        0 22px 50px rgba(2,6,23,.42),
        inset 0 1px 0 rgba(255,255,255,.06);
      backdrop-filter: blur(18px) saturate(150%);
      -webkit-backdrop-filter: blur(18px) saturate(150%);
    }
    .modal{
      position:relative;
      z-index:20001;
      background:rgba(15,23,42,.68) !important;
      border:1px solid rgba(255,255,255,.12) !important;
      box-shadow:
        0 28px 70px rgba(2,6,23,.48),
        inset 0 1px 0 rgba(255,255,255,.08) !important;
      backdrop-filter: blur(22px) saturate(155%);
      -webkit-backdrop-filter: blur(22px) saturate(155%);
    }
    .modalbg{
      background:rgba(15,23,42,.30);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index:20000;
    }
    body{
      position:relative;
      background:
        linear-gradient(180deg, rgba(8,12,19,.62) 0%, rgba(10,15,24,.70) 52%, rgba(8,12,19,.78) 100%),
        radial-gradient(1100px 720px at 0% 0%, rgba(56,189,248,.07), transparent 52%),
        radial-gradient(900px 620px at 100% 10%, rgba(168,85,247,.06), transparent 48%) !important;
    }
    body::before{
      content:'';
      position:fixed;
      inset:0;
      z-index:-2;
      background:url('../assets/bar-background.jpg') center center / cover no-repeat;
      pointer-events:none;
      backface-visibility:hidden;
    }
    body::after{
      content:'';
      position:fixed;
      inset:0;
      z-index:-1;
      background:
        linear-gradient(180deg, rgba(8,12,19,.46) 0%, rgba(10,15,24,.52) 52%, rgba(8,12,19,.62) 100%),
        radial-gradient(1100px 720px at 0% 0%, rgba(56,189,248,.05), transparent 52%),
        radial-gradient(900px 620px at 100% 10%, rgba(168,85,247,.05), transparent 48%);
      pointer-events:none;
    }
    .hero{
      background:rgba(15,23,42,.58) !important;
      border-color:rgba(255,255,255,.10) !important;
      box-shadow:
        0 22px 50px rgba(2,6,23,.34),
        inset 0 1px 0 rgba(255,255,255,.05) !important;
      backdrop-filter: blur(26px) saturate(155%);
      -webkit-backdrop-filter: blur(24px) saturate(150%);
    }
    .card{
      background:rgba(15,23,42,.50) !important;
      border-color:rgba(255,255,255,.10) !important;
      box-shadow:
        0 18px 40px rgba(2,6,23,.26),
        inset 0 1px 0 rgba(255,255,255,.05) !important;
      backdrop-filter: blur(22px) saturate(150%);
      -webkit-backdrop-filter: blur(22px) saturate(150%);
    }
    body.light{
      background:
        linear-gradient(180deg, rgba(233,238,244,.30) 0%, rgba(229,235,241,.26) 48%, rgba(220,227,235,.34) 100%),
        radial-gradient(1000px 640px at 0% 0%, rgba(148,163,184,.08), transparent 54%),
        radial-gradient(860px 580px at 100% 12%, rgba(203,213,225,.08), transparent 48%) !important;
    }
    body.light::after{
      background:
        linear-gradient(180deg, rgba(233,238,244,.42) 0%, rgba(229,235,241,.38) 48%, rgba(220,227,235,.46) 100%),
        radial-gradient(1000px 640px at 0% 0%, rgba(148,163,184,.08), transparent 54%),
        radial-gradient(860px 580px at 100% 12%, rgba(203,213,225,.08), transparent 48%);
    }
    body.light .hero{
      background:rgba(255,255,255,.42);
      border-color:rgba(255,255,255,.52);
      box-shadow:
        0 20px 45px rgba(15,23,42,.08),
        inset 0 1px 0 rgba(255,255,255,.68);
      backdrop-filter: blur(24px) saturate(158%);
      -webkit-backdrop-filter: blur(24px) saturate(158%);
    }
    body.light .card{
      background:rgba(255,255,255,.44) !important;
      border-color:rgba(255,255,255,.58) !important;
      box-shadow:
        0 16px 34px rgba(15,23,42,.08),
        inset 0 1px 0 rgba(255,255,255,.72) !important;
      backdrop-filter: blur(22px) saturate(152%);
      -webkit-backdrop-filter: blur(22px) saturate(152%);
    }
    body.light .tablewrap{
      background:rgba(255,255,255,.28) !important;
      border-color:rgba(255,255,255,.48) !important;
      backdrop-filter: blur(18px) saturate(148%);
      -webkit-backdrop-filter: blur(18px) saturate(148%);
    }
    body.light .notice,
    body.light .vendor-summary{
      background:rgba(255,255,255,.42) !important;
      border-color:rgba(255,255,255,.58) !important;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
    }
    body.light button,
    body.light .filelbl{
      background:rgba(255,255,255,.50);
      border-color:rgba(255,255,255,.55);
      box-shadow:
        0 10px 24px rgba(15,23,42,.08),
        inset 0 1px 0 rgba(255,255,255,.85);
      backdrop-filter: blur(14px) saturate(145%);
      -webkit-backdrop-filter: blur(14px) saturate(145%);
    }
    body.light button:hover,
    body.light .filelbl:hover{
      background:rgba(255,255,255,.62);
      border-color:rgba(56,189,248,.30);
    }
    body.light input,
    body.light select,
    body.light textarea{
      background:rgba(255,255,255,.62) !important;
      border-color:rgba(255,255,255,.62) !important;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.88),
        0 4px 12px rgba(15,23,42,.04);
    }
    body.light .menu{
      background:rgba(255,255,255,.82) !important;
      border-color:rgba(255,255,255,.68) !important;
      box-shadow:
        0 24px 52px rgba(15,23,42,.14),
        inset 0 1px 0 rgba(255,255,255,.92);
      backdrop-filter: blur(22px) saturate(162%);
      -webkit-backdrop-filter: blur(22px) saturate(162%);
    }
    body.light .modal{
      background:rgba(255,255,255,.78) !important;
      border-color:rgba(255,255,255,.70) !important;
      box-shadow:
        0 28px 60px rgba(15,23,42,.16),
        inset 0 1px 0 rgba(255,255,255,.94) !important;
      backdrop-filter: blur(26px) saturate(168%);
      -webkit-backdrop-filter: blur(26px) saturate(168%);
    }

    .vendor-section-inner{display:block;min-height:0}
    .vendor-section-inner.compact-empty{min-height:auto}
    .vendor-section-inner.compact-empty .vendor-table-shell{flex:0 0 auto}
    .vendor-section-inner.compact-empty #vendorExportArea{max-height:none;height:auto}
    .vendor-table-shell{min-height:0;flex:0 0 auto;height:auto}
    .vendor-placebar{position:sticky;bottom:0;z-index:8;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding-top:14px;margin-top:14px;background:transparent;backdrop-filter:none}
    body.light .vendor-placebar{background:transparent;}
    .vendor-subtotal{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);font-weight:700;color:var(--text);box-shadow:0 8px 22px rgba(0,0,0,.18);min-width:240px;justify-content:flex-start;overflow:visible}
    .vendor-subtotal .label{font-size:13px;letter-spacing:.4px;text-transform:uppercase;color:var(--sub)}
    .vendor-subtotal .amount{font-size:28px;line-height:1;color:var(--text);white-space:nowrap}
    body.light .vendor-subtotal{background:#ffffff;border-color:rgba(15,23,42,.12);box-shadow:0 8px 22px rgba(15,23,42,.08)}
    body.light .vendor-subtotal .label, body.light .vendor-subtotal .amount{color:#0f172a}
    #placeOrderBtn{min-width:220px;min-height:52px;font-size:15px}
    
    .history-controls-top{display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
    .history-controls-top input,.history-controls-top select{
      min-height:52px;
      font-size:14px;
      border-radius:12px;
      padding:10px 12px;
    }
    .history-controls-top #historySearchInput{min-width:330px}
    .history-date-group{display:flex;flex-direction:column;gap:12px}
    .history-date-label{
      font-size:13px;
      font-weight:800;
      letter-spacing:.5px;
      text-transform:uppercase;
      color:var(--sub);
      padding:4px 2px 0;
    }

    
    
    .ui-control{
      height:52px !important;
      min-height:52px !important;
      border-radius:12px !important;
      font-size:14px !important;
      padding:0 16px !important;
      box-sizing:border-box !important;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      line-height:1.2;
    }
    input.ui-control{
      display:block;
      padding:0 16px !important;
    }
    select.ui-control{
      display:block;
      appearance:none;
      -webkit-appearance:none;
      padding:0 40px 0 16px !important;
      background-position:right 14px center;
      background-repeat:no-repeat;
    }

    .compare-toolbar{
      display:flex;
      justify-content:flex-end;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
      margin-bottom:14px;
    }
    .compare-toolbar.hidden{display:none!important}
    .compare-status{
      min-height:52px;
      display:flex;
      align-items:center;
      justify-content:center;
      padding:10px 16px;
      border-radius:12px;
      font-size:14px;
      font-weight:700;
      background:rgba(255,255,255,.04);
      border:1px solid rgba(255,255,255,.10);
      color:var(--text);
      box-shadow:0 8px 22px rgba(0,0,0,.18);
      backdrop-filter:blur(12px) saturate(135%);
      -webkit-backdrop-filter:blur(12px) saturate(135%);
    }
    body.light .compare-status{
      background:rgba(255,255,255,.50);
      border-color:rgba(255,255,255,.55);
      color:#0f172a;
      box-shadow:0 10px 24px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.85);
    }
    
    .compare-summary-grid{
      display:grid;
      grid-template-columns:repeat(3,1fr);
      gap:14px;
      margin:14px 0 18px;
    }
    .compare-section{margin-top:16px}
    .compare-section h4{margin:0 0 10px;font-size:16px}
    .compare-table-wrap{
      max-height:220px;
      overflow:auto;
      border-radius:14px;
      border:1px solid rgba(255,255,255,.08);
    }
    body.light .compare-table-wrap{border-color:rgba(15,23,42,.12)}
    .compare-empty{
      padding:14px;
      border-radius:14px;
      border:1px dashed rgba(255,255,255,.14);
      color:var(--sub);
    }
    body.light .compare-empty{border-color:rgba(15,23,42,.16)}
    .diff-pos{color:#16a34a;font-weight:800}
    .diff-neg{color:#dc2626;font-weight:800}
    .diff-zero{color:var(--sub);font-weight:700}
    .compare-note-warn{
      padding:10px 12px;
      border-radius:12px;
      background:rgba(245,158,11,.16);
      border:1px solid rgba(245,158,11,.28);
      color:#fde68a;
    }
    body.light .compare-note-warn{
      background:rgba(245,158,11,.12);
      border-color:rgba(245,158,11,.22);
      color:#92400e;
    }
    .compare-group-toggle{
      width:100%;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      min-height:52px;
      font-size:14px;
      padding:10px 14px;
      border-radius:12px;
      margin-bottom:10px;
    }
    .compare-summary-line{
      margin-top:6px;
      font-size:13px;
      color:var(--sub);
    }

    .compare-select-btn.active{
      outline:2px solid var(--accent);
      background:rgba(56,189,248,.12);
    }
    body.light .compare-select-btn.active{
      background:#dbeafe!important;
      color:#0f172a!important;
    }

    .history-list{display:flex;flex-direction:column;gap:12px}
    .history-card{padding:14px 16px;border-radius:14px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
    body.light .history-card{border-color:rgba(15,23,42,.12);background:rgba(15,23,42,.03)}
    .history-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
    .history-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
    
    .history-card-main{
      display:flex;
      flex-direction:column;
      gap:12px;
    }
    .history-line-1{
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
    }
    .history-line-2{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      flex-wrap:nowrap;
    }
    .history-line-2-left{
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
      min-width:0;
      flex:1 1 auto;
    }
    .history-line-2-right{
      display:flex;
      align-items:center;
      justify-content:flex-end;
      gap:8px;
      flex-wrap:nowrap;
      flex:0 0 auto;
      margin-left:auto;
    }
    .history-date-inline{
      font-size:16px;
      font-weight:800;
      color:var(--text);
    }
    .history-filetype{
      font-size:16px;
      font-weight:800;
      color:var(--text);
      white-space:nowrap;
    }
    .history-meta-pill{
      font-size:16px;
      font-weight:800;
      line-height:1;
      padding:9px 14px;
    }
    
    .history-line-2-right .ui-control{
      height:42px !important;
      min-height:42px !important;
      font-size:13px !important;
      padding:0 12px !important;
      border-radius:10px !important;
    }

    .history-line-2-right .ui-control{
      min-width:auto;
      flex:0 0 auto;
      white-space:nowrap;
    }
    @media(max-width:1400px){
      .history-line-2{
        flex-wrap:wrap;
      }
      .history-line-2-right{
        width:100%;
        justify-content:flex-end;
      }
    }

    .history-title-row{
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
      margin-bottom:10px;
    }
    .history-filetype{
      font-size:16px;
      font-weight:800;
      color:var(--text);
    }
    .history-meta .pill{
      font-size:14px;
      padding:8px 12px;
      line-height:1;
    }

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

    .history-card .history-top{
      display:flex;
      flex-direction:column;
      gap:12px;
      align-items:stretch;
    }
    .history-card .history-row-1{
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
    }
    .history-card .history-row-2{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      flex-wrap:nowrap;
    }
    .history-card .history-row-2-left{
      display:flex;
      align-items:center;
      gap:12px;
      flex-wrap:wrap;
      min-width:0;
      flex:1 1 auto;
    }
    .history-card .history-row-2-right{
      display:flex;
      align-items:center;
      justify-content:flex-end;
      gap:8px;
      flex-wrap:nowrap;
      flex:0 0 auto;
      margin-left:auto;
    }
    .history-card .history-filetype{
      font-size:16px;
      font-weight:800;
      color:var(--text);
      white-space:nowrap;
    }
    .history-card .history-date-inline{
      font-size:16px;
      font-weight:800;
      color:var(--text);
      white-space:nowrap;
      display:inline-flex;
      align-items:center;
      line-height:1;
      padding:9px 14px;
      border-radius:999px;
      background:rgba(255,255,255,.04);
      border:1px solid rgba(255,255,255,.10);
      box-shadow:0 8px 22px rgba(0,0,0,.18);
      backdrop-filter:blur(12px) saturate(135%);
      -webkit-backdrop-filter:blur(12px) saturate(135%);
    }
    body.light .history-card .history-date-inline{
      background:rgba(255,255,255,.50);
      border-color:rgba(255,255,255,.55);
      color:#0f172a;
      box-shadow:0 10px 24px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.85);
    }
    .history-card .history-meta-pill{
      font-size:16px;
      font-weight:800;
      line-height:1;
      padding:9px 14px;
    }
    .history-card .history-row-2-right .ui-control{
      height:36px !important;
      min-height:36px !important;
      font-size:12px !important;
      padding:0 8px !important;
      border-radius:9px !important;
      white-space:nowrap;
      min-width:auto;
      flex:0 0 auto;
    }
    .history-card .history-row-2-right{
      gap:6px;
    }
    @media (max-width: 1320px){
      .history-card .history-row-2{
        flex-wrap:wrap;
      }
      .history-card .history-row-2-right{
        width:100%;
        justify-content:flex-end;
      }
    }

    .history-items{margin-top:12px;border-top:1px solid rgba(255,255,255,.08);padding-top:12px}
    body.light .history-items{border-top-color:rgba(15,23,42,.12)}
    .history-items table{font-size:13px}
    .history-empty{padding:16px;border-radius:14px;border:1px dashed rgba(255,255,255,.14);color:var(--sub)}
    body.light .history-empty{border-color:rgba(15,23,42,.18)}

    .inventory-controls-top .inventory-tools{display:flex;gap:12px;align-items:center;justify-content:flex-end;min-width:260px}
    .inventory-controls-top .inventory-tools button,.inventory-controls-top .inventory-tools .filelbl{min-height:52px;display:flex;align-items:center;justify-content:center;text-align:center;min-width:220px;font-size:14px}
    .scan-summary{padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);font-weight:700;color:var(--text)}
    body.light .scan-summary{background:rgba(15,23,42,.03);border-color:rgba(15,23,42,.12)}
    .scan-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
    .scan-toolbar .filelbl,.scan-toolbar button,.scan-toolbar select{min-height:52px;font-size:14px}
    .scan-toolbar .filelbl{min-width:220px;display:flex;align-items:center;justify-content:center;text-align:center}
    .scan-toolbar select{min-width:220px}
    .scan-table td,.scan-table th{font-size:13px;vertical-align:middle}
    .scan-table .price-cell,.scan-table .value-cell{white-space:nowrap}
    .scan-table .status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:110px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}
    .status-ok{background:rgba(34,197,94,.16);color:#bbf7d0}
    .status-review{background:rgba(245,158,11,.18);color:#fde68a}
    .status-manual{background:rgba(56,189,248,.18);color:#bae6fd}
    .status-none{background:rgba(239,68,68,.18);color:#fecaca}
    body.light .status-ok{background:rgba(34,197,94,.12);color:#166534}
    body.light .status-review{background:rgba(245,158,11,.14);color:#92400e}
    body.light .status-manual{background:rgba(56,189,248,.14);color:#0369a1}
    body.light .status-none{background:rgba(239,68,68,.12);color:#991b1b}
    .scan-actions{display:flex;gap:8px;flex-wrap:wrap}
    .scan-empty{padding:16px;border-radius:14px;border:1px dashed rgba(255,255,255,.14);color:var(--sub)}
    body.light .scan-empty{border-color:rgba(15,23,42,.16)}
    @media(max-width:980px){
      .inventory-controls-top{flex-wrap:wrap}
      .inventory-controls-top .tabs{flex:1 1 100%;flex-wrap:wrap}
      .inventory-controls-top .inventory-tools{width:100%;justify-content:flex-start}
      .inventory-controls-top .inventory-tools button{min-width:220px}
    }

    .scan-debug{margin-top:12px;border-radius:18px;padding:12px 14px;background:rgba(255,255,255,.56);border:1px solid rgba(148,163,184,.24)}
    body.dark .scan-debug{background:rgba(15,23,42,.42);border-color:rgba(148,163,184,.18)}
    .scan-debug summary{cursor:pointer;font-weight:800}
    .scan-debug textarea{width:100%;min-height:150px;margin-top:10px;border-radius:14px;padding:12px}
    .scan-debug-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px;flex-wrap:wrap}

  
    button:focus-visible,
    .filelbl:focus-visible,
    input:focus-visible,
    select:focus-visible{
      outline:none;
      border-color:rgba(56,189,248,.72);
      box-shadow:0 0 0 3px rgba(56,189,248,.18);
    }
    .pill{
      transition:background var(--motion-med) ease,color var(--motion-med) ease,border-color var(--motion-med) ease,transform var(--motion-fast) ease;
    }
    .card,
    .hero,
    .menu,
    .modal,
    .tablewrap{
      transition:
        background var(--motion-med) ease,
        border-color var(--motion-med) ease,
        box-shadow var(--motion-med) ease,
        backdrop-filter var(--motion-med) ease,
        transform var(--motion-med) ease;
    }
    .section-body{
      transition:opacity var(--motion-med) ease, transform var(--motion-med) ease;
    }
    .section-body.collapsed{
      opacity:0;
      transform:translateY(-4px);
    }
    .section-toggle{
      transition:
        transform var(--motion-fast) ease,
        background var(--motion-med) ease,
        border-color var(--motion-med) ease,
        box-shadow var(--motion-med) ease;
    }
    .section-toggle:hover{
      transform:translateY(-1px);
    }
    .history-card,
    .vendor-subtotal,
    .notice,
    .vendor-summary,
    .compare-status{
      transition:
        background var(--motion-med) ease,
        border-color var(--motion-med) ease,
        box-shadow var(--motion-med) ease,
        transform var(--motion-fast) ease;
    }
    .history-card:hover{
      transform:translateY(-1px);
    }
    .menu{
      animation:menuFadeIn var(--motion-med) ease;
      transform-origin:top left;
    }
    .modalbg:not(.hidden) .modal{
      animation:modalRise var(--motion-med) ease;
    }
    @keyframes modalRise{
      from{opacity:0; transform:translateY(8px) scale(.985);}
      to{opacity:1; transform:translateY(0) scale(1);}
    }
    @keyframes menuFadeIn{
      from{opacity:0; transform:translateY(-4px) scale(.99);}
      to{opacity:1; transform:translateY(0) scale(1);}
    }

    .item-with-suggestion{
      display:flex;
      align-items:center;
      gap:8px;
      min-width:0;
      flex-wrap:wrap;
    }
    .item-with-suggestion .item-text{
      min-width:0;
      overflow:hidden;
      text-overflow:ellipsis;
      white-space:nowrap;
      display:block;
      max-width:100%;
    }
    .suggestion-chip{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      padding:4px 8px;
      border-radius:999px;
      font-size:11px;
      font-weight:800;
      line-height:1;
      letter-spacing:.2px;
      white-space:nowrap;
      border:1px solid transparent;
    }
    .suggestion-low{
      background:rgba(245,158,11,.16);
      color:#fde68a;
      border-color:rgba(245,158,11,.24);
    }
    .suggestion-high{
      background:rgba(239,68,68,.16);
      color:#fecaca;
      border-color:rgba(239,68,68,.22);
    }
    .suggestion-skip{
      background:rgba(56,189,248,.16);
      color:#bae6fd;
      border-color:rgba(56,189,248,.22);
    }
    body.light .suggestion-low{
      background:rgba(245,158,11,.12);
      color:#92400e;
      border-color:rgba(245,158,11,.18);
    }
    body.light .suggestion-high{
      background:rgba(239,68,68,.10);
      color:#991b1b;
      border-color:rgba(239,68,68,.16);
    }
    body.light .suggestion-skip{
      background:rgba(56,189,248,.10);
      color:#0369a1;
      border-color:rgba(56,189,248,.16);
    }
    #smartSuggestionsSummary.hidden{
      display:none !important;
    }

    .quick-order-empty{
      color:var(--sub);
      text-align:center;
      padding:18px 12px;
    }
    .quick-order-item-name{
      font-weight:700;
    }

    .history-vendor-tabs{
      display:flex;
      gap:12px;
      align-items:center;
      flex-wrap:nowrap;
      min-width:0;
    }
    .history-vendor-tabs button{
      min-width:160px !important;
      min-height:52px !important;
      height:52px !important;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      flex:1 1 0;
    }
    #quickOrderBtn{
      min-width:220px !important;
      width:220px;
      height:52px !important;
      min-height:52px !important;
      font-size:14px !important;
      padding:0 16px !important;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
      border-radius:12px !important;
    }
    #quickOrderModalBg .modal{
      width:min(1120px,100%) !important;
    }
    .quick-order-shell{
      display:flex;
      flex-direction:column;
      gap:14px;
    }
    .quick-order-top{
      display:grid;
      grid-template-columns:1.35fr .9fr .8fr 1.2fr;
      gap:12px;
    }
    .quick-order-card{
      padding:16px;
      border-radius:16px;
      border:1px solid rgba(255,255,255,.08);
      background:rgba(255,255,255,.04);
      box-shadow:0 12px 28px rgba(2,6,23,.14);
    }
    body.light .quick-order-card{
      background:rgba(255,255,255,.56);
      border-color:rgba(15,23,42,.08);
      box-shadow:0 10px 24px rgba(15,23,42,.06);
    }
    .quick-order-vendor-tabs{
      display:flex;
      gap:12px;
      flex-wrap:nowrap;
    }
    .quick-order-vendor-tabs button{
      flex:1 1 0;
      min-height:52px !important;
      height:52px !important;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex;
      align-items:center;
      justify-content:center;
      text-align:center;
    }
    .quick-order-entry{
      display:grid;
      grid-template-columns:minmax(300px,1.8fr) 140px 160px 170px;
      gap:12px;
      align-items:end;
    }
    .quick-order-entry .ui-control,
    .quick-order-top input,
    .quick-order-top select,
    .quick-order-entry input{
      width:100%;
    }
    .quick-order-items-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:10px;
    }
    .quick-order-count{
      min-height:42px;
      display:flex;
      align-items:center;
      padding:0 14px;
      border-radius:12px;
      background:rgba(255,255,255,.04);
      border:1px solid rgba(255,255,255,.08);
      font-size:14px;
      font-weight:700;
    }
    body.light .quick-order-count{
      background:rgba(255,255,255,.56);
      border-color:rgba(15,23,42,.08);
    }
    .quick-order-table td:last-child .danger{
      min-width:110px;
    }
    @media (max-width: 1200px){
      .quick-order-top{
        grid-template-columns:1fr 1fr;
      }
      .quick-order-entry{
        grid-template-columns:1fr 1fr;
      }
    }

    .history-controls-bottom{
      display:flex;
      justify-content:flex-end;
      align-items:center;
      gap:12px;
      margin-bottom:14px;
    }
    .history-controls-bottom #historySearchInput{
      min-width:330px;
    }
    .history-controls-bottom #historyDateFilter{
      min-width:220px;
    }
    .vendor-subtotal{
      justify-content:flex-end !important;
      text-align:right !important;
    }
    .vendor-subtotal > div{
      width:100%;
      text-align:right !important;
    }
    .vendor-subtotal .amount{
      text-align:right !important;
      width:100%;
    }

    .history-controls-top{
      display:flex;
      justify-content:center !important;
      align-items:center;
      gap:12px;
      flex-wrap:nowrap;
      margin-bottom:14px;
    }
    .history-vendor-tabs{
      display:flex;
      gap:12px;
      align-items:center;
      justify-content:center !important;
      flex-wrap:nowrap;
      width:100%;
      max-width:980px;
      margin:0 auto;
    }
    .history-vendor-tabs button{
      flex:1 1 0 !important;
      min-width:160px !important;
      min-height:52px !important;
      height:52px !important;
      font-size:14px !important;
      padding:0 18px !important;
      display:flex !important;
      align-items:center !important;
      justify-content:center !important;
      text-align:center !important;
      border-radius:12px !important;
    }

    body.light .hero{
      background:rgba(255,255,255,.58) !important;
      border-color:rgba(255,255,255,.60) !important;
      box-shadow:
        0 14px 28px rgba(15,23,42,.08),
        inset 0 1px 0 rgba(255,255,255,.88) !important;
      backdrop-filter:blur(16px) saturate(145%) !important;
      -webkit-backdrop-filter:blur(16px) saturate(145%) !important;
    }
    body.light .hero h1{
      color:#0f172a !important;
    }

    .grid > .card.metric-inline{
      display:flex !important;
      flex-direction:row !important;
      align-items:center !important;
      gap:10px !important;
      padding:14px 16px !important;
      height:auto !important;
      overflow:hidden;
    }
    .grid > .card.metric-inline .muted{
      font-size:14px;
      white-space:nowrap;
      flex:1 1 auto;
      margin-right:auto;
    }
    .grid > .card.metric-inline .metric{
      font-size:28px !important;
      font-weight:700 !important;
      margin:0 !important;
      line-height:1 !important;
      white-space:nowrap;
      flex:0 0 auto;
      text-align:right;
    }
    .grid > .card.metric-inline .metric.small{
      font-size:13px !important;
      font-weight:700 !important;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
      min-width:0;
      flex:0 1 auto;
      text-align:right;
    }
    .grid > .card.metric-inline .metric-card-icon{
      flex:0 0 auto;
    }
    .metric-card-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      width:100%;
    }
    .metric-card-icon{
      width:22px;
      height:22px;
      display:flex;
      align-items:center;
      justify-content:center;
      border-radius:6px;
      flex:0 0 auto;
      background:rgba(255,255,255,.08);
      border:1px solid rgba(255,255,255,.10);
      box-shadow:0 8px 18px rgba(2,6,23,.12);
      color:currentColor;
    }
    .metric-card-icon svg{
      width:12px;
      height:12px;
      display:block;
      stroke:currentColor;
    }
    body.light .metric-card-icon{
      background:rgba(255,255,255,.62);
      border-color:rgba(255,255,255,.66);
      box-shadow:0 8px 16px rgba(15,23,42,.06);
    }
    .brand-lockup{
      display:flex;
      align-items:center;
      gap:12px;
    }
    .brand-mark{
      width:34px;
      height:34px;
      display:flex;
      align-items:center;
      justify-content:center;
      flex:0 0 auto;
      color:currentColor;
    }
    .brand-mark svg{
      width:30px;
      height:30px;
      display:block;
      stroke:currentColor;
    }
    .brand-text{
      display:flex;
      flex-direction:column;
      gap:2px;
      line-height:1;
    }
    .brand-name{
      font-size:20px;
      font-weight:800;
      letter-spacing:.1px;
    }
    .brand-version{
      font-size:11px;
      opacity:.62;
      font-weight:700;
      letter-spacing:.3px;
      text-transform:uppercase;
    }

    .brand-logo-type{
      font-size:46px;
      font-weight:800;
      letter-spacing:-0.03em;
      line-height:1;
      display:inline-flex;
      align-items:baseline;
      color:inherit;
    }
    .brand-logo-dot{
      color:#3b82f6;
    }
    .brand-logo-pro{
      font-size:17px;
      font-weight:700;
      color:#64748b;
      margin-left:7px;
      letter-spacing:0.08em;
      text-transform:uppercase;
    }

    .brand-lockup{
      display:flex;
      align-items:center;
      gap:12px;
    }
    .brand-logo-img{
      width:42px;
      height:42px;
      object-fit:contain;
      display:block;
      filter: drop-shadow(0 2px 8px rgba(15,23,42,.10));
      flex:0 0 auto;
    }
    .brand-text{
      display:flex;
      flex-direction:column;
      gap:2px;
      line-height:1;
    }
    .brand-name{
      font-size:20px;
      font-weight:800;
      letter-spacing:.1px;
    }
    .brand-version{
      font-size:11px;
      opacity:.62;
      font-weight:700;
      letter-spacing:.3px;
      text-transform:uppercase;
    }

    .brand-isotipo-img{
      width:42px;
      height:42px;
      object-fit:contain;
      display:block;
      flex:0 0 auto;
      filter: drop-shadow(0 2px 8px rgba(15,23,42,.10));
    }
    .brand-name{
      font-size:18px !important;
      font-weight:800 !important;
      letter-spacing:.1px !important;
    }
    .brand-version{
      font-size:10px !important;
      opacity:.58 !important;
      font-weight:700 !important;
      letter-spacing:.35px !important;
      text-transform:uppercase;
    }

    .brand-lockup{
      display:flex;
      align-items:center;
      gap:14px;
    }
    .brand-header-logo{
      width:110px;
      height:auto;
      object-fit:contain;
      display:block;
      flex:0 0 auto;
      filter:drop-shadow(0 2px 8px rgba(15,23,42,.10));
    }
    .brand-text{
      display:flex;
      flex-direction:column;
      gap:4px;
      line-height:1;
    }
    .brand-name{
      font-size:24px !important;
      font-weight:800 !important;
      letter-spacing:.1px !important;
    }
    .brand-version{
      font-size:11px !important;
      opacity:.62 !important;
      font-weight:700 !important;
      letter-spacing:.35px !important;
      text-transform:uppercase;
    }

    /* Responsive polish */
    .wrap{padding:20px}
    .hero > div:first-child{min-width:0}
    .brand-lockup{min-width:0;flex-wrap:nowrap}
    .brand-header-logo{max-width:100%;height:auto}
    .brand-text{min-width:0}
    .topbar{flex-wrap:wrap}
    .topbar > button,.topbar > .filelbl,.topbar > .toolbar-group{max-width:100%}

    @media (max-width: 1280px){
      .wrap{padding:18px}
      .grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
      .topbar > button,.topbar > .filelbl,.topbar > .toolbar-group{width:calc(50% - 6px)}
      .vendor-controls-top,
      .inventory-controls-top{flex-wrap:wrap !important}
      .vendor-controls-top .tabs,
      .inventory-controls-top .tabs{flex-wrap:wrap !important}
      .vendor-export-wrap{width:100%;min-width:0}
      .vendor-export-wrap #vendorExportMenuBtn{width:100%}
      .history-controls-top,
      .history-controls-bottom{flex-wrap:wrap !important}
      .history-vendor-tabs{max-width:none;flex-wrap:wrap !important}
      .history-vendor-tabs button{min-width:140px !important;flex:1 1 calc(33.333% - 8px) !important}
      .vendor-controls-bottom{flex-wrap:wrap}
      .vendor-controls-bottom #vendorSearchInput{min-width:0;width:100%}
      #quickOrderBtn{width:100% !important;min-width:0 !important}
      .quick-order-top{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
      .quick-order-entry{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
      .vendor-placebar{flex-wrap:wrap !important}
      .vendor-subtotal{width:100% !important;min-width:0 !important}
      .toolbar{flex-wrap:wrap}
    }

    @media (max-width: 900px){
      .wrap{padding:16px}
      .hero{padding:16px 18px !important}
      .brand-lockup{width:100%;justify-content:center;flex-wrap:wrap;gap:10px}
      .brand-header-logo{width:88px !important}
      .brand-text{align-items:center;text-align:center}
      .brand-name{font-size:22px !important}
      .grid{grid-template-columns:minmax(0,1fr) !important}
      .topbar > button,.topbar > .filelbl,.topbar > .toolbar-group{width:100%}
      .inventory-controls-top .tabs button,
      .vendor-controls-top .tabs button,
      .history-vendor-tabs button{
        min-width:0 !important;
        flex:1 1 calc(50% - 8px) !important;
      }
      .history-controls-bottom #historySearchInput,
      .history-controls-bottom #historyDateFilter,
      .vendor-controls-bottom #vendorSearchInput{width:100%;min-width:0}
      .quick-order-top,
      .quick-order-entry{grid-template-columns:minmax(0,1fr) !important}
      .history-row-2,
      .history-line-2{flex-wrap:wrap !important}
      .history-line-2-right,
      .history-row-2-right{width:100%;justify-content:flex-start !important}
      .history-actions{flex-wrap:wrap}
      .section-header-row{align-items:flex-start}
    }

    @media (max-width: 640px){
      .wrap{padding:14px}
      .hero{padding:14px 16px !important}
      .brand-header-logo{width:76px !important}
      .brand-name{font-size:20px !important}
      .section-card{padding:16px !important}
      .metric{font-size:24px !important}
      .inventory-controls-top .tabs button,
      .vendor-controls-top .tabs button,
      .history-vendor-tabs button{
        flex:1 1 100% !important;
      }
      .compare-toolbar{justify-content:stretch !important}
      .compare-toolbar .compare-status,
      #compareOrdersBtn,
      #clearCompareBtn{width:100% !important;min-width:0 !important}
      .vendor-placebar .toolbar,
      .quick-order-shell .toolbar{width:100%;justify-content:stretch !important}
      .vendor-placebar .toolbar button,
      .quick-order-shell .toolbar button{width:100%}
      .rowactions{flex-wrap:wrap}
      .rowactions > *{width:100%}
      table{font-size:13px}
      th,td{padding:8px}
    }

    .brand-header-logo{
      width:190px !important;
      max-width:34vw;
      height:auto !important;
      object-fit:contain;
      display:block;
      flex:0 0 auto;
      filter:drop-shadow(0 2px 8px rgba(15,23,42,.10));
    }
    .brand-lockup{
      gap:18px !important;
      align-items:center !important;
    }
    .brand-name{
      font-size:30px !important;
      font-weight:800 !important;
      letter-spacing:.1px !important;
    }
    .brand-version{
      font-size:13px !important;
      opacity:.62 !important;
      font-weight:700 !important;
      letter-spacing:.35px !important;
      text-transform:uppercase;
    }
    .metric-card-icon{
      width:48px !important;
      height:48px !important;
      border-radius:12px !important;
    }
    .metric-card-icon svg{
      width:24px !important;
      height:24px !important;
      stroke-width:2.1 !important;
    }
    .metric-card-head{
      align-items:flex-start !important;
    }
    @media (max-width: 900px){
      .brand-header-logo{
        width:118px !important;
        max-width:42vw !important;
      }
      .brand-name{
        font-size:24px !important;
      }
      .brand-version{
        font-size:12px !important;
      }
      .metric-card-icon{
        width:42px !important;
        height:42px !important;
      }
      .metric-card-icon svg{
        width:22px !important;
        height:22px !important;
      }
    }
    @media (max-width: 640px){
      .brand-header-logo{
        width:96px !important;
      }
      .brand-name{
        font-size:22px !important;
      }
      .metric-card-icon{
        width:38px !important;
        height:38px !important;
      }
      .metric-card-icon svg{
        width:20px !important;
        height:20px !important;
      }
    }

    /* v3.1 polish + stability */
    :root{
      --ease-smooth:cubic-bezier(.22,.61,.36,1);
      --dur-fast:.16s;
      --dur-med:.24s;
      --dur-slow:.34s;
    }

    *{
      -webkit-tap-highlight-color: transparent;
    }

    button,.filelbl,input,select,.card,.hero,.menu,.modal,.section-toggle,.pill,.metric-card-icon,.vendor-subtotal,.history-card{
      transition:
        transform var(--dur-fast) var(--ease-smooth),
        opacity var(--dur-fast) var(--ease-smooth),
        box-shadow var(--dur-med) var(--ease-smooth),
        border-color var(--dur-med) var(--ease-smooth),
        background var(--dur-med) var(--ease-smooth),
        color var(--dur-med) var(--ease-smooth),
        filter var(--dur-med) var(--ease-smooth);
      will-change:auto;
    }

    button:hover,.filelbl:hover{
      transform:translateY(-1px);
    }
    button:active,.filelbl:active{
      transform:translateY(0) scale(.985);
    }

    .section-toggle:hover{
      transform:translateY(-1px) rotate(0.001deg);
    }
    .section-toggle:active{
      transform:scale(.97);
    }

    .menu{
      animation:v30MenuIn var(--dur-med) var(--ease-smooth);
      transform-origin:top right;
    }
    .modalbg:not(.hidden) .modal{
      animation:v30ModalIn var(--dur-med) var(--ease-smooth);
    }
    .history-card:hover,
    .card:hover{
      box-shadow:0 12px 30px rgba(0,0,0,.22);
    }
    body.light .history-card:hover,
    body.light .card:hover{
      box-shadow:0 14px 28px rgba(15,23,42,.09);
    }

    .section-body{
      transition:
        opacity var(--dur-med) var(--ease-smooth),
        transform var(--dur-med) var(--ease-smooth),
        max-height var(--dur-slow) var(--ease-smooth),
        margin var(--dur-med) var(--ease-smooth);
      transform-origin:top center;
    }
    .section-body.collapsed{
      opacity:0;
      transform:translateY(-6px);
      pointer-events:none;
    }

    .history-card,
    .vendor-subtotal,
    .metric-card-icon{
      backface-visibility:hidden;
      transform:translateZ(0);
    }

    .brand-lockup{
      min-width:0;
    }
    .brand-text{
      min-width:0;
    }

    .topbar > .toolbar-group,
    .vendor-export-wrap{
      position:relative;
      min-width:0;
    }

    .menu button,
    .menu .filelbl{
      min-height:42px;
      display:flex;
      align-items:center;
    }

    .rowactions{
      align-items:center;
    }

    .metric-card-head{
      min-height:48px;
    }

    .history-actions .ui-control,
    .rowactions button{
      white-space:nowrap;
    }

    .tablewrap{
      overflow:auto;
      overscroll-behavior:contain;
    }

    .history-items table,
    #vendorExportArea table{
      min-width:720px;
    }

    .quick-order-table table{
      min-width:640px;
    }

    .vendor-subtotal .amount,
    #quickOrderSubtotalAmount{
      letter-spacing:.2px;
    }

    @keyframes v30MenuIn{
      from{opacity:0; transform:translateY(-4px) scale(.99);}
      to{opacity:1; transform:translateY(0) scale(1);}
    }
    @keyframes v30ModalIn{
      from{opacity:0; transform:translateY(10px) scale(.985);}
      to{opacity:1; transform:translateY(0) scale(1);}
    }

    @media (prefers-reduced-motion: reduce){
      *, *::before, *::after{
        animation:none !important;
        transition:none !important;
        scroll-behavior:auto !important;
      }
    }

  button:disabled,
  .filelbl.disabled,
  .ui-control:disabled{
    opacity:.62 !important;
    cursor:not-allowed !important;
    transform:none !important;
    box-shadow:none !important;
  }

  .btn-busy{
    position:relative;
    pointer-events:none !important;
  }

  .btn-busy::after{
    content:'';
    width:12px;
    height:12px;
    border-radius:999px;
    border:2px solid currentColor;
    border-top-color:transparent;
    display:inline-block;
    margin-left:8px;
    animation:barstockSpin .7s linear infinite;
    vertical-align:-2px;
  }

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

  #statusBar{
    transition:opacity .25s ease, transform .25s ease, color .2s ease;
  }

  #statusBar.status-fade{
    opacity:.72;
  }

  #statusBar.status-pop{
    transform:translateY(-1px);
  }

/* Header actions: logout + theme toggle */
.header-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.header-actions #authLogoutBtn,
.header-actions #themeToggle{
  height:42px !important;
  min-height:42px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
}

.header-actions #authLogoutBtn{
  min-width:92px !important;
}

.header-actions #themeToggle{
  width:42px !important;
  min-width:42px !important;
  flex:0 0 42px !important;
}
