/* =========================================================
     CORE STYLES FOR PANELS & CARDS (Subtle Tinted Glass Design)
     ========================================================= */
  
  .home-panel {
    position: relative;
    overflow: hidden;
    border-radius: 20px !important;
    background-color: #ffffff;
    color: rgba(15,23,42,.92) !important;
    box-shadow: 0 12px 32px rgba(40, 128, 194, 0.06); 
    transform: translateZ(0);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
  .home-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(40, 128, 194, 0.12); 
  }

  .glass-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(242, 249, 255, 0.85)) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(40, 128, 194, 0.15) !important;
    box-shadow: 0 16px 40px rgba(40, 128, 194, 0.05);
  }
  
  .glass-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-blue, #2880c2), var(--brand-green, #81c241));
    z-index: 10;
  }

  .glass-panel .panel-kicker, .tips-col .panel-kicker {
    background: #475569 !important; 
    color: #fff !important;
    border: none !important;
    box-shadow: 0 6px 16px rgba(71, 85, 105, 0.25) !important;
  }
  .glass-panel .panel-title { color: rgba(15,23,42, 0.95); }
  .glass-panel .panel-sub { color: rgba(15,23,42, 0.65); }

  .panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: .02em;
  }
  
  .panel-title {
    margin-top: .75rem;
    margin-bottom: .15rem;
    font-weight: 800;
    letter-spacing: -.02em;
  }

  .panel-inner {
    margin-top: 1.25rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9); 
    border: 1px solid rgba(40, 128, 194, 0.12);
    border-radius: 16px;
    padding: 1.25rem;
  }
  .search-panel-inner {
    background: #ffffff !important;
    border: 1px solid rgba(40, 128, 194, 0.15) !important;
    box-shadow: 0 8px 24px rgba(40, 128, 194, 0.04);
  }

  .cx-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: .45rem;
    padding: .45rem;
    background: rgba(40, 128, 194, 0.04); 
    border: 1px solid rgba(40, 128, 194, 0.1);
    border-radius: 999px;
    overflow: hidden;
  }
  .cx-tabs .nav-item { flex: 1 1 0; }
  .cx-tabs .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 0 !important;
    border-radius: 999px !important;
    font-weight: 900;
    font-size: .95rem;
    padding: .55rem .8rem;
    color: rgba(15,23,42,.65);
    background: transparent;
    transition: all 200ms ease;
    white-space: nowrap;
  }
  .cx-tabs .nav-link i { opacity: .8; }
  .cx-tabs .nav-link:hover { color: var(--brand-blue, #2880c2); background: rgba(40, 128, 194, 0.08); }
  .cx-tabs .nav-link.active {
    background: #ffffff !important;
    color: var(--brand-blue, #2880c2) !important;
    box-shadow: 0 4px 14px rgba(40, 128, 194, 0.15);
    border: 1px solid rgba(40, 128, 194, 0.15) !important;
  }

  .label-compact {
    font-size: .92rem;
    font-weight: 800;
    margin-bottom: .35rem !important;
    color: rgba(15,23,42,0.85);
  }

  .panel-inner .form-control, .panel-inner .form-select {
    border-radius: 12px;
    border: 1px solid rgba(40, 128, 194, 0.2);
    box-shadow: inset 0 2px 4px rgba(40, 128, 194, 0.02);
    transition: all 200ms ease;
    background: rgba(248, 250, 252, 0.7);
  }
  .panel-inner .form-control:focus, .panel-inner .form-select:focus {
    border-color: var(--brand-blue, #2880c2);
    box-shadow: 0 0 0 .25rem rgba(40, 128, 194, 0.15);
    background: #ffffff;
  }

  .searchby-row { gap: .65rem; flex-wrap: wrap; }
  .searchby-row .form-check { position: relative; padding: 0; margin: 0; border: 0; background: transparent; }
  .searchby-row .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
  .searchby-row .form-check-label {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .44rem .7rem; border-radius: 12px;
    background: rgba(40, 128, 194, 0.03); 
    border: 1px solid rgba(40, 128, 194, 0.15);
    font-weight: 800; font-size: .92rem; color: rgba(15,23,42,.7);
    cursor: pointer; user-select: none;
    transition: all 200ms cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 92px;
  }
  .searchby-row .form-check-label:hover {
    background: rgba(40, 128, 194, 0.08); 
    border-color: rgba(40, 128, 194, 0.3); 
    color: var(--brand-blue, #2880c2);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(40, 128, 194, 0.08);
  }
  .searchby-row .form-check-input:checked + .form-check-label {
    background: var(--brand-blue, #2880c2); 
    color: #ffffff;
    border-color: var(--brand-blue, #2880c2);
    box-shadow: 0 8px 20px rgba(40, 128, 194, 0.3);
  }

  .panel-inner .btn.btn-dark {
    border-radius: 12px !important; padding: .48rem .85rem;
    font-weight: 800; font-size: .95rem; letter-spacing: .01em;
    background: var(--brand-blue, #2880c2) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 10px 24px rgba(40, 128, 194, 0.25);
    transition: all 200ms ease;
  }
  .panel-inner .btn.btn-dark:hover {
    transform: translateY(-2px); box-shadow: 0 14px 30px rgba(40, 128, 194, 0.4); filter: brightness(1.1);
  }

  .info-card .info-item {
    display: flex; gap: .75rem; padding: .85rem;
    border-radius: 16px; background: rgba(255,255,255,0.8); 
    border: 1px solid rgba(129, 194, 65, 0.15); 
    box-shadow: 0 4px 12px rgba(129, 194, 65, 0.03);
    transition: all 200ms ease;
  }
  .info-card .info-item:hover {
    background: #ffffff; border-color: rgba(129, 194, 65, 0.3); box-shadow: 0 8px 20px rgba(129, 194, 65, 0.08);
  }
  .info-card .info-ico {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(129, 194, 65, 0.1); border: 1px solid rgba(129, 194, 65, 0.2);
  }
  .info-card .info-ico i { color: var(--brand-green, #81c241); font-size: 1.1rem; }
  .info-card .info-title { font-weight: 800; margin: 0; color: rgba(15,23,42,0.9); }
  .info-card .info-desc { margin: .15rem 0 0; color: rgba(15,23,42,.65); font-size: 0.88rem; line-height: 1.5; }

  /* =========================================================
     LIST RESULTS & SIDEBAR STYLES
     ========================================================= */
  .results-shell { margin-top: 1.35rem; }
  
  .edges { display: grid; gap: .85rem; }
  .edge-card {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: .85rem; align-items: center;
    background: rgba(255,255,255,.9); border: 1px solid rgba(40, 128, 194, 0.12);
    border-radius: 18px; padding: .85rem .85rem; box-shadow: 0 10px 30px rgba(40, 128, 194, 0.04);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  }
  .edge-card:hover {
    transform: translateY(-2px); border-color: rgba(40, 128, 194, 0.25); box-shadow: 0 16px 40px rgba(40, 128, 194, 0.1);
  }
  .edge-mid { display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 84px; }
  .edge-mid i { font-size: 1.15rem; color: rgba(40, 128, 194, 0.5); }
  .edge-tag { font-size: .85rem; font-weight: 900; letter-spacing: .02em; color: rgba(40, 128, 194, 0.8); text-transform: uppercase; }

  .cmpd { display: flex; gap: .85rem; align-items: center; min-width: 0; }
  .cmpd-img {
    width: 92px; height: 92px; border-radius: 16px; background: #fff;
    border: 1px solid rgba(40, 128, 194, 0.12); box-shadow: 0 8px 20px rgba(40, 128, 194, 0.05);
    overflow: hidden; display: grid; place-items: center; flex: 0 0 auto;
  }
  .cmpd-img img { width: 100%; height: 100%; object-fit: contain; }
  .cmpd-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(40, 128, 194, 0.4); }
  
  .cmpd-meta { min-width: 0; }
  .cmpd-role { font-size: .82rem; font-weight: 900; letter-spacing: .02em; color: rgba(15,23,42,.55); text-transform: uppercase; margin-bottom: .2rem; }
  .cmpd-ik { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
  .cmpd-ik a { font-weight: 900; color: rgba(15,23,42,.92); text-decoration: none; overflow-wrap: anywhere; transition: color 0.2s;}
  .cmpd-ik a:hover { color: var(--brand-blue, #2880c2); }
  
  .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
  .cmpd-smiles { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; color: rgba(15,23,42,.6); min-width: 0; }
  .cmpd-smiles .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; font-size: 0.88rem; }

  /* Fully Reset and Stylized Copy Buttons */
  .icon-btn, .copy-btn {
    background: transparent !important; 
    border: none !important; 
    outline: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.4rem !important; 
    color: rgba(15,23,42,.4) !important;
    cursor: pointer; 
    transition: all 150ms ease; 
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
  }
  .icon-btn:hover, .copy-btn:hover { 
    color: var(--brand-blue, #2880c2) !important; 
    background: rgba(40, 128, 194, 0.1) !important; 
    transform: scale(1.1); 
  }
  .icon-btn i, .copy-btn i { font-size: 1rem; line-height: 1; }

  .download-bar {
    margin-top: .95rem; display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem; padding: .85rem .95rem; border-radius: 16px;
    background: rgba(255,255,255,.9); border: 1px solid rgba(40, 128, 194, 0.12);
    box-shadow: 0 6px 20px rgba(40, 128, 194, 0.04);
  }
  .download-note { margin: 0; color: rgba(15,23,42,.7); font-weight: 600; }
  .btn-csv {
    border-radius: 12px !important; padding: .55rem .9rem !important; font-weight: 800 !important;
    display: inline-flex; align-items: center; gap: .55rem; background: var(--brand-blue, #2880c2) !important;
    border: none !important; color: #fff !important; box-shadow: 0 8px 20px rgba(40,128,194,0.2);
    transition: all 0.2s ease;
  }
  .btn-csv:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(40,128,194,0.3); }

  .empty-state-box {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 250px; background: linear-gradient(to bottom, rgba(40,128,194,0.02), rgba(40,128,194,0.05));
    border: 2px dashed rgba(40, 128, 194, 0.25); border-radius: 18px; text-align: center;
    color: rgba(15,23,42,0.6); margin-top: 0.5rem; padding: 2rem; transition: all 0.3s ease;
  }
  .empty-state-box:hover { background: linear-gradient(to bottom, rgba(40,128,194,0.03), rgba(40,128,194,0.08)); border-color: rgba(40, 128, 194, 0.4); }
  .empty-state-box i { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.5; }
  .empty-state-box h5 { font-weight: 800; color: rgba(15,23,42,0.8); margin-bottom: 0.5rem; }
  .empty-state-box p { font-size: 0.95rem; max-width: 400px; margin-bottom: 0; }

  /* GRAPH CONTAINER & TABS */
  .graph-card {
    border-radius: 20px; overflow: hidden; box-shadow: 0 16px 40px rgba(40, 128, 194, 0.08);
    border: 1px solid rgba(40, 128, 194, 0.12);
  }
  .graph-card .card-header {
    background: rgba(248, 250, 252, 0.8); border-bottom: 1px solid rgba(40, 128, 194, 0.1);
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-bottom: 0;
  }
  
  .graph-tabs { border-bottom: none; margin-bottom: -1px; }
  .graph-tabs .nav-link {
    color: rgba(15,23,42,.5); font-weight: 800; border: none;
    border-bottom: 3px solid transparent; padding: 1rem 1.25rem; border-radius: 0; transition: all 0.2s ease;
  }
  .graph-tabs .nav-link:hover { color: var(--brand-blue, #2880c2); background: rgba(40,128,194,0.04); }
  .graph-tabs .nav-link.active { color: var(--brand-blue, #2880c2); background: transparent; border-bottom: 3px solid var(--brand-blue, #2880c2); }

  .chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem;
    border-radius: 999px; background: #ffffff; border: 1px solid rgba(40, 128, 194, 0.15);
    font-weight: 800; color: rgba(15,23,42,.75); font-size: .85rem; box-shadow: 0 4px 10px rgba(40, 128, 194, 0.05);
  }
  .chip i { color: var(--brand-blue, #2880c2); }

  .graph-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; padding-bottom: .75rem;  }
  .btn-ghost {
    border-radius: 10px !important; border: 1px solid rgba(40, 128, 194, 0.15) !important;
    background: #ffffff !important; font-weight: 800 !important; font-size: 0.9rem;
    color: rgba(15,23,42,.75) !important; padding: .38rem .7rem !important;
    display: inline-flex; align-items: center; gap: .45rem; transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(40, 128, 194, 0.03);
  }
  .btn-ghost i { color: var(--brand-blue, #2880c2); }
  .btn-ghost:hover { 
    background: rgba(40, 128, 194, 0.06) !important; border-color: rgba(40, 128, 194, 0.3) !important; 
    color: var(--brand-blue, #2880c2) !important; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(40, 128, 194, 0.08);
  }

  .graph-container { height: 650px; width: 100%; border-radius: 0 0 20px 20px; background: rgba(250,251,253,0.92); }

  /* DETAILS SIDE PANELS (Left of the Graph) - HEIGHT GAP FIXED HERE */
  .details-panel {
    background: #ffffff; border: 1px solid rgba(40, 128, 194, 0.15);
    border-radius: 20px; box-shadow: 0 12px 30px rgba(40, 128, 194, 0.05);
    display: flex; flex-direction: column; overflow: hidden;
  }
  .details-head { padding: .85rem 1.15rem; border-bottom: 1px solid rgba(40, 128, 194, 0.1); background: rgba(248, 250, 252, 0.6); }
  .details-title { margin: 0; font-weight: 900; font-size: .9rem; color: rgba(15,23,42,.8); text-transform: uppercase; letter-spacing: .02em; }
  .details-body { padding: 1rem; overflow-y: auto; flex: 1; }
  
  .kv-list { display: flex; flex-direction: column; gap: 0.35rem; }
  .kv-row {
    display: flex; align-items: center; gap: 0.5rem; background: rgba(40, 128, 194, 0.02);
    padding: 0.35rem 0.55rem; border-radius: 10px; border: 1px solid rgba(40, 128, 194, 0.08);
  }
  .kv-row .k { color: rgba(15,23,42,.55); font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; margin: 0; flex-shrink: 0; }
  .kv-row .v { color: rgba(15,23,42,.9); font-weight: 700; font-size: .82rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; }
  
 .depict {
    width: 100%; max-width: 110px; aspect-ratio: 1; 
    border-radius: 14px; border: 1px solid rgba(40, 128, 194, 0.15);
    background: #ffffff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(40, 128, 194, 0.06);
    overflow: hidden; margin: 0 auto 0.85rem auto; flex-shrink: 0;
  }
  .depict img { width: 100%; height: 100%; object-fit: contain; }
  
  .details-body::-webkit-scrollbar { width: 6px; }
  .details-body::-webkit-scrollbar-thumb { background: rgba(40, 128, 194, 0.2); border-radius: 999px; }

  #op-bulk .file-upload-wrapper{ background: rgba(40, 128, 194, 0.02) !important; border: 2px dashed rgba(40, 128, 194, 0.25) !important; border-radius: 16px !important; padding: .6rem .75rem !important; transition: all 0.3s ease; }
  #op-bulk .file-upload-wrapper:hover { background: rgba(40, 128, 194, 0.06) !important; border-color: rgba(40, 128, 194, 0.5) !important; box-shadow: inset 0 0 20px rgba(40, 128, 194, 0.05); }
  #op-bulk .file-upload-label{ padding: .75rem .7rem !important; }
  #op-bulk .file-upload-label i{ font-size: 1.5rem !important; color: var(--brand-blue, #2880c2); transition: transform 0.3s ease; }
  #op-bulk .file-upload-wrapper:hover .file-upload-label i { transform: translateY(-3px); }
  #op-bulk .file-upload-label p{ font-size: .96rem; margin-top: .3rem !important; margin-bottom: 0 !important; color: rgba(15,23,42,0.85); }
  #op-bulk .file-upload-label small{ font-size: .82rem; color: rgba(15,23,42,0.5); }

 .details-panel:first-of-type { border-top: 4px solid var(--brand-blue, #2880c2); }
  .details-panel:first-of-type .details-title i { color: var(--brand-blue, #2880c2) !important; }
  .details-panel:first-of-type .kv-row { border-left: 3px solid rgba(40, 128, 194, 0.4); }

  #detailsDrawer { border-top: 4px solid var(--brand-green, #81c241); }
  #detailsDrawer .details-title i { color: var(--brand-green, #81c241) !important; }
  #detailsDrawer .kv-row { border-left: 3px solid rgba(129, 194, 65, 0.4); background: rgba(129, 194, 65, 0.03); border-color: rgba(129, 194, 65, 0.15); }

  .degree-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(40, 128, 194, 0.1); color: var(--brand-blue, #2880c2);
    border-radius: 6px; padding: 2px 6px; font-weight: 800; font-size: 0.75rem; margin-left: auto;
  }
  .degree-badge.out { background: rgba(129, 194, 65, 0.1); color: var(--brand-green, #81c241); }

  /* Input flash animation */
  .cx-input-flash { animation: cxFlash 650ms ease-out 1; }
  @keyframes cxFlash{
    0%{ box-shadow: 0 0 0 0 rgba(40,128,194,0); }
    30%{ box-shadow: 0 0 0 .35rem rgba(40,128,194,.35); }
    100%{ box-shadow: 0 0 0 0 rgba(40,128,194,0); }
  }

  @media (max-width: 991.98px){ .tips-col{ display: none !important; } }
  @media (max-width: 768px){
    .home-panel.glass-panel .panel-kicker{ display: inline-flex !important; }
    .home-panel.glass-panel .panel-title{ text-align: left !important; font-size: 1.28rem !important; margin-top: .45rem !important; }
    .searchby-row{ flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: .45rem; }
    .searchby-row::-webkit-scrollbar{ height: 6px; }
    .searchby-row::-webkit-scrollbar-thumb{ background: rgba(40, 128, 194, 0.2); border-radius: 999px; }
    .searchby-row .form-check-label{ min-width: unset !important; padding: .40rem .60rem; font-size: .85rem; border-radius: 11px; }
    .edge-card{ grid-template-columns: 1fr; }
    .edge-mid{ flex-direction:row; justify-content:center; }
    .cmpd-img{ width: 86px; height: 86px; }
    .graph-container{ height: 430px; }
  }