
    :root{
      /* === Color palette (used if not overridden by base.css) === */
      --c1:#1f2937;   /* text color */
      --c2:#a9b4c5;   /* border color */
      --c3:#4E5571;   /* accent / brand color */
    }

    /* === Key-value list used in details panel and header === */
    .details-list{
      font-size:.92rem;
      line-height:1.65;
      margin:0; padding:0;
      list-style:none;
    }
    .details-list li{
      display:flex; align-items:center; gap:.5rem;
      margin-bottom:.25rem; overflow:hidden;
    }
    .details-list .label{
      flex:0 0 138px; font-weight:700; color:var(--c1);
    }
    .details-list .value{
      flex:1 1 auto; min-width:0; max-width:100%;
      overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
      color:var(--c1);
      font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
    }
    /* Show pointer cursor for tooltip-enabled fields */
    .details-list .value[data-bs-toggle="tooltip"]{ cursor: help; }

    /* === Small copy button beside each field === */
    .copy-btn{
      flex:0 0 auto;
      padding:.15rem .45rem;
      font-size:.75rem; line-height:1;
      border:1px solid #cfd6e4;
      border-radius:.35rem;
      background:#fff; color:#6b7280;
      cursor:pointer;
    }
    .copy-btn:hover{ background:#f3f4f6; color:#111827; }
    .copy-btn .fa-check{ display:none; }
    .copy-btn.copied .fa-copy{ display:none; }
    .copy-btn.copied .fa-check{ display:inline-block; }

    /* === Compound name === */
    .compound-name{
      font-size:1rem; font-weight:800; color:var(--c1);
      margin:.1rem 0 .4rem 0;
      white-space:normal; overflow-wrap:anywhere;
    }

    /* === Split button for downloads (Compounds/Reactions) === */
    .split-download{
      display:inline-flex; align-items:stretch; width:100%;
      border-radius:.9rem; overflow:visible; position:relative;
      box-shadow:0 6px 14px rgba(0,0,0,.06);
    }
    .split-download .btn{ border:0; border-radius:0; }
    .split-download .btn-main{
      flex:1 1 auto; height:56px; padding:0 18px;
      font-size:1.05rem; font-weight:600; color:#fff;
    }
    .split-download .btn-toggle{
      width:56px; height:56px; color:#fff;
      display:inline-flex; align-items:center; justify-content:center;
    }
    /* Node and edge button color variations */
    .split-download.node .btn-main{ background:#889EB3; }
    .split-download.node .btn-toggle{ background:#7a8da6; }
    .split-download.edge .btn-main{ background:#4E5571; }
    .split-download.edge .btn-toggle{ background:#41495f; }
    .split-download .dropdown-menu{ min-width:180px; z-index:2000; }

    /* Prevent duplicated caret icon */
    .split-download .btn-main::after,
    .split-download .btn-main.dropdown-toggle::after{ display:none !important; }

    /* === Right rail (sticky button section) === */
    .right-rail{ position:relative; padding-bottom:120px; }
    #nodeDetails{ position:relative; z-index:2; }
    .graph-dock{ position:sticky; bottom:12px; z-index:1; }

    /* === Big “Graph JPG” button === */
    .graph-btn{
      background:var(--c3); color:#fff; height:64px; font-size:1.25rem;
      border-radius:.9rem; box-shadow:0 6px 14px rgba(0,0,0,.08);
      transition:background-color .2s ease, filter .2s ease;
    }
    .graph-btn:hover, .graph-btn:focus{ background:#3f465e; color:#fff; }

    /* === Responsive layout tweaks for mobile === */
    .compound-header{ display:flex; align-items:flex-start; gap:1rem; }
    @media (max-width: 767.98px){
      .compound-header{ flex-direction:column; }
      .thumb img{ max-height:150px; }
      .info-col, .downloads-col{ width:100%; }
      .split-download{ width:100%; }
      .split-download .btn-main{ height:52px; font-size:1rem; }
      .right-rail{ padding-bottom:0; }
      .graph-dock{ position:static; }
    }

    /* === External link style === */
    .blue-link{ color:#0d6efd; text-decoration:underline; }
    .blue-link:hover{ text-decoration:none; }

    /* === Chemical chips / strips (gallery below graph) === */
    .chem-card h6{
      margin:0 0 .5rem 0; color:var(--c1); font-weight:700; font-size:.95rem;
    }
    .chem-strip{
      display:flex; gap:.5rem; overflow-x:auto; padding:.5rem;
      border:1px solid var(--c2); border-radius:.6rem; background:#fff;
      scrollbar-width:thin;
    }
    .chem-chip{
      width:86px; flex:0 0 auto; cursor:pointer; user-select:none;
      display:flex; flex-direction:column; align-items:center; gap:.35rem;
    }
    .chem-chip .thumb{
      width:64px; height:64px; display:flex; align-items:center; justify-content:center;
      border:1px solid var(--c2); background:#fff; border-radius:.5rem; overflow:hidden;
    }
    .chem-chip .thumb img{ width:100%; height:100%; object-fit:contain; display:block; }
    .chem-chip .title{
      width:100%; text-align:center; font-size:.72rem; line-height:1.15;
      white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#374151;
    }
    .chem-chip.active .thumb{ outline:2px solid var(--c3); }

    /* === Graph view mode tabs (Full / Neighbors) === */
    .graph-box{ position:relative; }
    .graph-tabs{
      position:absolute; top:10px; left:10px; z-index:10;
      display:inline-flex; gap:0;
      background: rgba(255,255,255,.7);
      backdrop-filter: blur(3px);
      border:1px solid var(--c2);
      border-radius:10px;
      padding:4px;
    }
    .graph-tab{
      appearance:none; border:1px solid var(--c2); background:#fff; color:var(--c1);
      font-weight:700; font-size:.9rem; line-height:1; cursor:pointer;
      padding:6px 10px; transition: all .15s ease; margin-left:-1px;
    }
    .graph-tab:first-child{ margin-left:0; border-top-left-radius:8px; border-bottom-left-radius:8px; }
    .graph-tab:last-child{ border-top-right-radius:8px; border-bottom-right-radius:8px; }
    .graph-tab:hover{ background: var(--c2); color:#fff; border-color: var(--c2); }
    .graph-tab.is-active{ background: var(--c3); color:#fff; border-color: var(--c3); box-shadow:0 6px 14px rgba(0,0,0,.08); }






    /* ===== Palette ===== */
  :root{ --c1:#4E5571; --c2:#6D7C95; --c3:#889EB3; --c4:#9AB4C7; }

  /* ===== Page scaffold ===== */
  .container-xxl{ max-width:1320px; }
  .results-grid{ --bs-gutter-x:1rem; --bs-gutter-y:1rem; align-items:flex-start; }
  @media (min-width:992px){ .sticky-aside{ position:sticky; top:96px; align-self:flex-start; } }

  /* ===== Sidebar card ===== */
  .filter-sidebar{
    background:#76809a; border-radius:14px; padding:18px 16px 20px;
    box-shadow:0 4px 18px rgba(0,0,0,.08); display:flex; flex-direction:column; gap:12px;
    overflow:visible;
  }
  .filter-sidebar h6{ color:#fff; font-weight:800; margin:2px 0 6px; }

  /* Collapsible help */
  .rf-help{
    background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.25);
    border-radius:10px; padding:10px 12px; color:#fff;
  }
  .rf-help summary{ list-style:none; display:flex; align-items:center; gap:.5rem; cursor:pointer; user-select:none; font-weight:600; }
  .rf-help summary::-webkit-details-marker{ display:none; }
  .rf-help summary .fa-caret-right{ transition:transform .2s ease; }
  .rf-help[open] summary .fa-caret-right{ transform:rotate(90deg); }
  .rf-help .help-body{ margin-top:.5rem; font-size:.92rem; line-height:1.6; color:#f7fafc; }

  /* Labels & controls */
  .filter-label{ color:#fff; font-size:.78rem; font-weight:700; margin-bottom:6px; }
  .form-control, .form-select{ border-radius:8px; }

  /* Radios compact */
  .radio-group{ display:flex; flex-wrap:wrap; gap:10px; margin-top:.25rem; }
  .radio-group label{ color:#fff; font-size:.78rem; }

  /* ===== "or" row + Upload ===== */
  .or-row{ display:flex; align-items:center; gap:12px; margin-top:.6rem; flex-wrap:nowrap; }
  .or-row > *{ flex:0 0 auto; }
  .or-chip{
    display:inline-flex; align-items:center; justify-content:center;
    width:34px; height:34px; border-radius:999px; background:rgba(255,255,255,.28);
    color:#2e2d4d; font-weight:700; box-shadow:0 1px 0 rgba(0,0,0,.08) inset;
  }
  .btn-uploadfile{
    height:30px; display:inline-flex; align-items:center; justify-content:center;
    padding:0 1rem; border-radius:8px; background:#4E5571 !important; color:#fff !important;
  }
  .btn-uploadfile:hover{ background:#889EB3 !important; color:#2E2D4D !important; transform:translateY(-1px); }
  .btn-uploadfile i{ font-size:1rem; opacity:.95; margin-right:.55rem; }

  /* Example chip */
  .example-row{ margin:.5rem 0 .2rem; }
  .example-pill{
    display:inline-flex; align-items:center; gap:.5rem; padding:.32rem .58rem;
    border:1px solid rgba(255,255,255,.35); background:rgba(0,0,0,.12); border-radius:10px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06); color:#ecf1f7; line-height:1; white-space:nowrap;
  }
  .example-pill .badge-example{ background:#4E5571; color:#fff; border-radius:6px; padding:.12rem .48rem; font-weight:700; font-size:.78rem; }
  .example-link{ color:#ecedf2 !important; text-decoration:underline !important; font-weight:600; }
  .example-link:hover{ color:#fff !important; }

  @media (max-width:520px){
    .or-row{ flex-direction:column; align-items:stretch; gap:.55rem; }
    .or-chip{ width:auto; height:auto; border-radius:6px; padding:.1rem .6rem; align-self:center; }
    .btn-uploadfile{ width:100%; }
  }

  /* ===== bootstrap-select polish ===== */
  .bootstrap-select > .dropdown-toggle{
    height:38px; padding:6px 10px; font-size:.9rem; border:1px solid #e2e8f0; border-radius:8px; background:#fff;
  }
  .bootstrap-select .dropdown-menu{ max-height:260px;  box-shadow:0 8px 20px rgba(0,0,0,.08); }
  .bootstrap-select .bs-searchbox input.form-control{ border:1px solid #e2e8f0; border-radius:6px; padding:.35rem .6rem; }
  body:not(.bs-ready) #biosystem.selectpicker{ position:static !important; left:auto !important; opacity:1 !important; pointer-events:auto !important; display:block !important; visibility:visible !important; width:100% !important; }
  body.bs-ready .filter-sidebar .bootstrap-select{ width:100% !important; }

  /* ===== Result cards ===== */
  .compound-card.card{
    position:relative; /* required for stretched-link */
    border:none; border-left:4px solid var(--c4); border-radius:12px;
    box-shadow:0 2px 10px rgba(0,0,0,.06);
    transition:transform .15s, box-shadow .2s; overflow:hidden; height:100%;
    cursor:pointer;
  }
  .compound-card.card:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.10); }
  .compound-card .card-body{ padding:16px 18px; }

  .left-col{ display:flex; flex-direction:column; gap:8px; }
  .right-col{ display:flex; flex-direction:column; gap:8px; min-width:0; font-size:.85rem; }

  .compound-name{ color:#0071bc; font-weight:700; line-height:1.2; font-size:.95rem; text-decoration:none; }
  .compound-name:hover{ text-decoration:underline; }
  .thumb{ display:flex; align-items:center; justify-content:center; height:110px; background:#fff; border-radius:10px; }
  .thumb img{ max-height:135px; width:auto; object-fit:contain; filter:grayscale(100%); transition:filter .25s; background:#fff; }
  .compound-card:hover .thumb img{ filter:none; }

  .inchi-row{ font-size:.68rem; color:#2f3140; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .meta{ display:flex; flex-direction:column; gap:6px; font-size:.78rem; }
  .m-row{ display:flex; align-items:baseline; gap:6px; }
  .m-label{ min-width:110px; color:#6b7280; font-weight:700; font-size:.68rem; }
  .m-val{ color:#1f2937; overflow-wrap:anywhere; word-break:break-word; }
  .m-link{ color:#0d6efd; text-decoration:underline; overflow-wrap:anywhere; word-break:break-word; position:relative; }
  .m-link:hover{ text-decoration:none; }
  .rc-num{ font-weight:700; font-size:.85rem; padding:0 .15rem; }

  /* ===== Pagination palette ===== */
  .pagination .page-link{ color:var(--c1); border:1px solid var(--c2); }
  .pagination .page-link:hover{ background:var(--c4); color:#fff; }
  .pagination .page-item.active .page-link{ background:var(--c3); border-color:var(--c3); color:#fff; }

/* Fix double scrollbar in bootstrap-select dropdown */
.bootstrap-select .dropdown-menu{
  max-height: 260px;           /* keep your height cap */
  overflow: hidden !important; /* the menu itself should NOT scroll */
}

.bootstrap-select .dropdown-menu .inner{
  max-height: 260px;           /* the element that SHOULD scroll */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch; /* smoother on mobile */
}

/* ==== One-scrollbar fix for bootstrap-select (BS5) ==== */
/* Kill Bootstrap's overflow on the wrapper and remove BS max-height */
.bootstrap-select .dropdown-menu,
.bootstrap-select .dropdown-menu.show {
  --bs-dropdown-max-height: none;   /* BS5 variable */
  max-height: none !important;      /* wrapper never capped */
  overflow: visible !important;     /* wrapper never scrolls */
  padding: 0 !important;            /* no extra space that can trigger scroll */
}

/* The ONLY scrollable element should be .inner */
.bootstrap-select .dropdown-menu .inner {
  max-height: 260px !important;     /* your desired cap */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Optional: tidy scrollbar look (does nothing on Firefox by default) */
.bootstrap-select .dropdown-menu .inner::-webkit-scrollbar { width: 10px; }
.bootstrap-select .dropdown-menu .inner::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 8px; }
/* ==== Single-scrollbar fix for bootstrap-select (works with container:'body') ==== */

/* Case 1: menu rendered inside the component */
.bootstrap-select .dropdown-menu,
.bootstrap-select .dropdown-menu.show {
  --bs-dropdown-max-height: none;    /* neutralize BS5 cap */
  max-height: none !important;       /* wrapper should not clip */
  overflow: visible !important;      /* wrapper must not scroll */
  padding: 0 !important;
}

/* Case 2: menu rendered in a portal (.bs-container appended to <body>) */
.bs-container .dropdown-menu,
.bs-container .dropdown-menu.show {
  --bs-dropdown-max-height: none;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

/* Only the .inner should scroll (applies to both cases) */
.bootstrap-select .dropdown-menu .inner,
.bs-container .dropdown-menu .inner {
  max-height: 260px !important;      /* your desired cap */
  overflow-y: auto !important;       /* the only scroller */
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

/* Optional: nicer scrollbar */
.bs-container .dropdown-menu .inner::-webkit-scrollbar,
.bootstrap-select .dropdown-menu .inner::-webkit-scrollbar { width: 10px; }
.bs-container .dropdown-menu .inner::-webkit-scrollbar-thumb,
.bootstrap-select .dropdown-menu .inner::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2); border-radius: 8px;
}

/* Single–scrollbar fix for bootstrap-select (v1.14, BS5, works with container:'body') */

/* 1) Wrapper must NOT scroll */
.bootstrap-select .dropdown-menu,
.bs-container .dropdown-menu {
  --bs-dropdown-max-height: none;
  max-height: none !important;
  overflow: visible !important;
  padding: 0 !important;
}

/* 2) Only the DIV.inner should scroll */
.bootstrap-select .dropdown-menu > .inner,
.bs-container .dropdown-menu > .inner {
  max-height: 260px !important;   /* your cap */
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

/* 3) The nested UL must NOT scroll */
.bootstrap-select .dropdown-menu > .inner > .dropdown-menu,
.bs-container .dropdown-menu > .inner > .dropdown-menu {
  max-height: none !important;
  overflow: visible !important;
}




  :root{
    --cardTop:#7a839b;
    --cardBot:#636c86;
    --ink:#ffffff;
    --muted:#dbe3f3;
    --ring:#bfd4ff;
    --chip:#eef2ff;
    --chipText:#334155;
    --btnL:#334155;
    --btnR:#7886a4;
    --ghostL:#5d6a86;
    --ghostR:#7886a4;
  }

  .page-wrap{ max-width:1140px; margin:0 auto; }

  /* ===== Card + Header band (looks like the screenshot) ===== */
  .sp-card{
    color:var(--ink);
    border-radius:22px;
    padding:0; /* header band manages its own padding */
    background:linear-gradient(180deg,var(--cardTop),var(--cardBot));
    box-shadow:0 22px 50px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.14);
    overflow:hidden; /* keeps header band and content flush */
  }
  .sp-head{
    position:relative;
    padding:26px 28px 18px;
    background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.02));
  }
  .sp-title{
    font-weight:500; letter-spacing:.2px; margin:0;
    font-size:clamp(1.3rem,2.8vw,2.6rem); line-height:1.05;
    text-shadow:0 2px 0 rgba(0,0,0,.1);
  }
  /* soft highlight bar tucked into the header */
  .sp-head::after{
    content:"";
    position:absolute; left:18px; right:18px; bottom:0;
    height:10px; border-radius:8px 8px 0 0;
  }

  /* Body area under header band */
  .sp-body{
    padding:18px 22px 22px;
  }

  /* ===== Form layout ===== */
  .form-grid{ display:grid; grid-template-columns:1fr; gap:16px; }
  @media (min-width:992px){ .form-grid{ grid-template-columns:1fr 1fr; } }

  .step-label{ display:flex; align-items:center; gap:.6rem; font-weight:800; }
  .step-badge{
    width:28px; height:28px; line-height:28px; border-radius:50%;
    background:rgba(255,255,255,.18); color:#fff; font-weight:600; font-size:.7rem; text-align:center;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.22);
  }
  .step-icon{ width:18px; height:18px; opacity:.9; }

  /* Pill inputs (thicker, friendlier) */
  .sp-card .form-control,.sp-card .form-select{
    background:rgba(255,255,255,.98);
    border:1px solid rgba(0,0,0,.06);
    color:#0f172a;
    border-radius:14px;
    padding:1rem 1.1rem;
    transition: box-shadow .18s ease, transform .06s ease;
  }
  .sp-card .form-control:focus, .sp-card .form-select:focus{
    box-shadow:0 0 0 4px var(--ring);
    transform: translateY(-1px);
  }

  /* Inline clear button */
  .input-wrap{ position:relative; }
  .clear-btn{
    position:absolute; right:8px; top:50%; transform:translateY(-50%);
    border:0; width:28px; height:28px; border-radius:999px; cursor:pointer;
    background:rgba(255,255,255,.25); color:#fff; font-weight:600; display:none;
  }
  .clear-btn:hover{ background:rgba(255,255,255,.35); }

  /* Radio row styled like the shot */
  .sp-radio{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin:.35rem 0 .4rem; }
  .sp-radio .form-check-input{ cursor:pointer; }
  .sp-radio label{ font-weight:800; }

  /* Buttons */
  .btn-hero, .btn-ghost{
    width:100%; padding:1.05rem 1.1rem; border-radius:12px; font-weight:600; border:none;
    display:flex; align-items:center; justify-content:center; gap:.6rem;
    transition: transform .06s ease, filter .15s ease, box-shadow .2s ease;
  }
  .btn-hero{
    background: linear-gradient(90deg, var(--btnL), var(--btnR));
    color:#ffffff; box-shadow:0 12px 28px rgba(0, 0, 0, 0.35);
  }
  .btn-hero:hover{ filter:brightness(1.06); transform: translateY(-1px); }
  .btn-ghost{
    background:linear-gradient(90deg, var(--ghostL), var(--ghostR)); color:#fff;
  }
  .btn-ghost:hover{ filter:brightness(1.05); transform: translateY(-1px); }

  .icon{ width:18px; height:18px; display:inline-block; }

  /* Typeahead */
  .ta-wrap{ position:relative; }
  .ta-menu{
    position:absolute; left:0; right:0; top:100%; z-index:2050;
    background:#fff; border:1px solid #e5e7eb; border-top:none;
    max-height:260px; overflow:auto; border-radius:0 0 .7rem .7rem;
    box-shadow:0 12px 28px rgba(0,0,0,0.1); display:none;
  }
  .ta-menu.loading::before{
    content:"Searching…"; position:sticky; top:0; display:block; background:#f8fafc; color:#232d3c;
    font-size:.85rem; padding:.5rem .6rem; border-bottom:1px solid #eef2f7;
  }
  .ta-item{ width:100%; text-align:left; border:0; background:#fff; padding:.65rem .85rem; cursor:pointer; }
  .ta-item:hover, .ta-item.ta-active{ background:#f1f5f9; }
  .ta-empty{ padding:.75rem .9rem; color:#6b7280; }
  .ta-mark{ font-weight:900; }

  /* Path preview */
  .node-circle{
    background:#f8fafc; width:100px; height:100px; border-radius:50%;
    border:2px solid rgba(255,255,255,.65); display:flex; align-items:center; justify-content:center;
    overflow:hidden; margin:0 6px; box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  .node-name{ margin-top:8px; font-weight:500; text-align:center; max-width:140px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .arrow{ font-size:2rem; color:#000000; margin:0 6px; }

  /* Reachables list */
  .reach-card{
    background:#ffffff; border-radius:16px; box-shadow:0 16px 34px rgba(0,0,0,.12);
    padding:16px 16px 14px; margin-top:24px;
  }
  .reach-card h5{ color:#1f2a44; font-weight:600; margin-bottom:8px; letter-spacing:.1px; }
  .reach-toolbar{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin-bottom:10px; }
  .reach-toolbar .form-control{ max-width:380px; }
  .reach-counter{ color:#334155; font-size:.95rem; }
  .btn-download{
    background: linear-gradient(90deg, #334155, #475569);
    color:#fff; border:0; border-radius:12px; padding:10px 16px; font-weight:600;
  }
  .btn-download:hover{ filter:brightness(1.06); }
  .preview-img{ max-height:48px; width:auto; display:block; }
  .table td, .table th{ vertical-align:middle; }
  a.link{ text-decoration:none; }


    /* Reachables table: dark-blue name and blue CID link */
    .reach-name{ color:#324a73; font-weight:600; }
    a.reach-cid{ color:#324a73; }


    /* Detail card: blue single-line name */
.detail-name{
    color: #324a73;
    font-weight: 700;
    line-height: 1.2;
    font-size: .95rem;
    text-decoration: none;
}
 
.detail-name a:hover{ text-decoration:underline; }

/* Put the image and text nicely side-by-side */
.detail-wrap{ display:flex; gap:12px; align-items:flex-start; }

/* Make “CID:” and InChIKey lines stay on one line */
.detail-line{ margin-bottom:.35rem; }
.detail-line.text-nowrap{ white-space:nowrap; }

/* Reuse the blue CID link color */
a.reach-cid{ color:#324a73; }



 .ta-wrap{ position:relative; }
.ta-wrap .ta-menu{
  top: calc(100% - 5px);   
  border-top: none;      
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

 .ta-wrap.ta-open .form-control{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

 
 .result-summary{
    display:flex; justify-content:space-between; align-items:center;
    gap:12px; flex-wrap:wrap; margin-top:12px;
  }
  .btn-dl{
    background: linear-gradient(90deg, #334155, #475569);
    color:#fff; border:0; border-radius:12px; padding:.5rem 1rem;
    box-shadow:0 6px 14px rgba(0,0,0,.18);
    text-decoration:none; width:auto; display:inline-flex; align-items:center; gap:.4rem;
  }
  .btn-dl:hover{ filter:brightness(1.06); transform:translateY(-1px); }
</style>


<style>
  .form-grid-two{ display:grid; grid-template-columns:1fr; gap:16px; }
  @media (min-width:992px){ .form-grid-two{ grid-template-columns:1fr 1fr; } }

  .pane{
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.20);
    border-radius:12px;
    padding:14px;
  }
  .pane .sp-radio{ margin-top:.5rem; }
  .pane .btn-ghost{ width:100%; margin-top:.35rem; }

  /* stick the dropdown to the input */
.ta-wrap{ position:relative; }
.ta-wrap .ta-menu{
  position:absolute; left:0; right:0;
  top:100%;
  margin-top:-8px;              /* pull up to cover ring/border gap */
  border-top:none;
  border-top-left-radius:0;
  border-top-right-radius:0;
}
.ta-wrap.ta-open .form-control{
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
}

#search-btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
#search-btn {
  width: 300px;             
  height: 70px;             
  font-size: 1.2rem;        
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  transition: all 0.25s ease;
}
#search-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.preview-img {
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.2s ease;
}

.preview-img:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.thumb img {
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.25s ease;
}

.thumb:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}




:root { --c1:#4E5571; --c2:#6D7C95; --c3:#889EB3; --c4:#9AB4C7; --brand:#52576e; }

  .filter-sidebar{
    background: var(--c3); border-radius:14px; box-shadow:0 4px 18px rgba(0,0,0,0.08);
    display:flex; flex-direction:column; gap:16px; padding:22px; position:sticky; top:20px;
  }
  @media (max-width:991px){ .filter-sidebar{ position:static; } }
  .sidebar-title{ color:#fff; font-weight:800; font-size:1.8rem; }
  .btn-upload, .sidebar-search-btn{
    background: var(--brand); color:#fff; border:none; border-radius:10px; padding:12px; font-weight:600;
  }
  .btn-upload:hover, .sidebar-search-btn:hover{ filter:brightness(.95); }
  .filter-label{ color:#fff; font-weight:600; margin-bottom:4px; display:block; }

  .compound-card{
    background:#fff !important; border-left:4px solid var(--c4) !important;
    border-radius:12px !important; box-shadow:0 2px 6px rgba(0,0,0,0.1) !important; border:none !important;
  }
  .compound-card .card-body{ display:flex; align-items:flex-start; padding:1rem !important; }
  .compound-card .thumb h5{ color:var(--c1); }
  .compound-card .info{ font-size:.9rem; color:var(--c1) !important; }

  /* Chips base style (unchanged) */
  .chip{
    display:inline-block; background:#eef3fb; color:#31425e;
    border-radius:999px; padding:.2rem .5rem; font-size:.8rem; margin:0 .25rem 0 0;
    white-space:nowrap;
  }

  ul.list-unstyled{ list-style:none !important; margin:0 !important; padding:0 !important; }

  /* NEW: inline chips row next to the label */
  .matching-row{                 /* the li that holds the label + chips */
    display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; margin-top:.35rem;
  }
  .matching-row .label{          /* "Matching SMILES:" */
    font-weight:700; color:#31425e; margin-right:.25rem;
  }
  .chips-inline{                 /* container for chips so they sit on the same line */
    display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  }
  .more-ellipsis{ font-weight:700; padding:0 .25rem; }

/* Fix double scrollbars in bootstrap-select with Bootstrap 5.3 */
.bootstrap-select .dropdown-menu{
  overflow: hidden !important;     /* outer menu shouldn't scroll */
  max-height: none !important;     /* let the inner control the height */
  padding: 0 !important;           /* optional: cleaner look */
}
.bootstrap-select .dropdown-menu .inner{
  overflow-y: auto !important;     /* only the inner should scroll */
  -webkit-overflow-scrolling: touch;
  max-height: 260px;               /* adjust if you want a taller/shorter list */
}

  /* --- Upload row (match Relationship page) --- */
.or-row{ display:flex; align-items:center; gap:12px; margin-top:.6rem; flex-wrap:nowrap; }
.or-row > *{ flex:0 0 auto; }
.or-chip{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:999px; background:rgba(255,255,255,.28);
  color:#2e2d4d; font-weight:700; box-shadow:0 1px 0 rgba(0,0,0,.08) inset;
}
/* match the button style you used در Relationship */
.btn-uploadfile{
  height:36px; display:inline-flex; align-items:center; justify-content:center;
  padding:0 1rem; border-radius:10px; background:var(--brand); color:#fff;
  border:none; font-weight:600;
}
.btn-uploadfile:hover{ filter:brightness(.95); transform:translateY(-1px); }
.btn-uploadfile i{ font-size:1rem; opacity:.95; margin-right:.55rem; }
@media (max-width:520px){
  .or-row{ flex-direction:column; align-items:stretch; gap:.55rem; }
  .or-chip{ width:auto; height:auto; border-radius:6px; padding:.1rem .6rem; align-self:center; }
  .btn-uploadfile{ width:100%; }
}

.or-row .w-100 { flex: 0 0 100%; height: 0; }

.or-row .upload-msg { flex: 0 0 100%; }

.or-row .upload-msg .alert { margin-top: 6px; }

