
  :root {
    --brand-blue: #2880c2;
    --card-bg: #81c241; /* Green theme base */
    --card-accent: #2e6b1f; /* Dark green accent */
  }

  /* =========================================================
     Sidebar Panels (Green Theme)
     ========================================================= */
  .home-panel {
    position: relative;
    overflow: hidden;
    border-radius: 5px !important;
    border: 10px solid rgba(255,255,255,.22);
    border-color: color-mix(in srgb, var(--card-bg, rgba(255,255,255,.22)) 78%, white 22%);
    background-color: color-mix(in srgb, var(--card-bg, #ffffff) 86%, white 14%) !important;
    color: rgba(15,23,42,.92) !important;
    box-shadow: 0 12px 32px rgba(15,23,42,.14);
    transform: translateZ(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
  }
  .home-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(15,23,42,.18);
  }

  /* Header Badge/Kicker */
  .panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-bg, #2880c2) 86%, black 14%);
    color: #fff;
    font-weight: 700;
    letter-spacing: .01em;
    box-shadow: 0 10px 22px rgba(15,23,42,.16);
    width: fit-content !important;
    max-width: max-content !important;
    align-self: flex-start !important;
    font-size: .86rem; 
  }
  
  .panel-title {
    margin-top: .6rem;
    margin-bottom: .15rem;
    font-weight: 800;
    letter-spacing: -.02em;
    font-size: 1.32rem;
  }
  .panel-sub {
    margin: 0;
    color: rgba(15,23,42,.72);
    line-height: 1.45;
    font-size: .95rem;
  }

  .home-panel.bg-green .panel-kicker,
  .home-panel.bg-green .panel-title {
    color: #fff !important;
    text-shadow: 0 10px 20px rgba(15,23,42,.22);
  }
  .home-panel.bg-green .panel-sub {
    color: rgba(255,255,255,.88) !important;
    text-shadow: 0 10px 20px rgba(15,23,42,.22);
  }
  .home-panel.bg-green .panel-inner {
    color: rgba(15,23,42,.92);
  }

  /* Inner content area for forms */
  .panel-inner {
    margin-top: 1.1rem;
    background: rgba(255,255,255,.70);
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 16px;
    padding: .85rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
  }

  .label-compact {
    font-size: .92rem;
    font-weight: 800;
    margin-bottom: .35rem !important;
  }

  /* Input Fields */
  .panel-inner .form-control {
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,.18);
    box-shadow: 0 8px 18px rgba(15,23,42,.06);
    transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
    font-size: .95rem;
  }
  .panel-inner .form-control:focus {
    border-color: color-mix(in srgb, var(--card-accent, #2880c2) 45%, white 55%);
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--card-accent, #2880c2) 22%, transparent 78%);
    transform: translateY(-1px);
  }
  .panel-inner .form-label {
    font-weight: 700;
    color: rgba(15,23,42,.84);
    font-size: .95rem;
  }

  /* Radio group - arranged vertically for the sidebar */
  .searchby-row {
    gap: .5rem;
    display: grid;
    grid-template-columns: 1fr; 
  }
  .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: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: .44rem .7rem;
    border-radius: 12px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(15,23,42,.12);
    font-weight: 900;
    font-size: .92rem;
    color: rgba(15,23,42,.78);
    cursor: pointer;
    user-select: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
  }
  .searchby-row .form-check-label:hover {
    transform: translateY(-1px);
    border-color: rgba(15,23,42,.18);
    box-shadow: 0 12px 22px rgba(15,23,42,.10);
  }
  /* Active state for radio buttons */
  .searchby-row .form-check-input:checked + .form-check-label {
    background: rgba(15,23,42,.92);
    color: #fff;
    border-color: rgba(15,23,42,.92);
    box-shadow: 0 14px 28px rgba(15,23,42,.14);
  }

  /* Submit button */
  .panel-inner .btn.btn-dark {
    border-radius: 12px !important;
    padding: .6rem .85rem;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .01em;
    box-shadow: 0 14px 28px rgba(15,23,42,.16);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  }
  .panel-inner .btn.btn-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(15,23,42,.20);
  }

  /* Info card */
  .info-card .info-item {
    display: flex;
    gap: .75rem;
    padding: .62rem .7rem;
    border-radius: 16px;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(15,23,42,.12);
  }
  .info-card .info-ico {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--card-bg, #81c241) 16%, white 84%);
    border: 1px solid color-mix(in srgb, var(--card-bg, #81c241) 22%, rgba(15,23,42,.10) 78%);
  }
  .info-card .info-ico i { color: color-mix(in srgb, var(--card-bg, #81c241) 78%, black 22%); }
  .info-card .info-title { font-weight: 800; margin: 0; font-size: .90rem; }
  .info-card .info-desc { margin: .15rem 0 0; color: rgba(15,23,42,.72); font-size: .74rem; line-height: 1.28; }

  /* =========================================================
     Graph Card (Right Column)
     ========================================================= */
  .graph-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(15,23,42,.14);
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(255,255,255,.92);
    display: flex;
    flex-direction: column;
  }
  .graph-card .card-header {
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(15,23,42,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
  }
  /* Node/Edge Counter Chips */
  .chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    background: rgba(15,23,42,.05);
    border: 1px solid rgba(15,23,42,.08);
    font-weight: 800;
    color: rgba(15,23,42,.72);
    font-size: .86rem;
  }
  /* Toolbar Buttons */
  .graph-toolbar {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .btn-ghost {
    border-radius: 12px !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    background: rgba(255,255,255,.86) !important;
    font-weight: 900 !important;
    color: rgba(15,23,42,.78) !important;
    padding: .42rem .7rem !important;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
  }
  .btn-ghost:hover { color: var(--brand-blue) !important; border-color: rgba(11,61,115,.25) !important; }

  /* Graph canvas container */
  #graph-container {
    height: 700px;
    min-height: 60vh;
    width: 100%;
    border-radius: 0 0 16px 16px;
    background: rgba(255,255,255,.92);
    position: relative; 
    flex-grow: 1;
  }

  /* Node/Edge Details Drawer */
  .details-drawer {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 380px; /* Slightly wider to accommodate larger images and inline buttons */
    max-width: calc(100% - 24px);
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(15,23,42,.18);
    overflow: hidden;
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
    z-index: 10;
  }
  .details-drawer.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .details-head {
    padding: .8rem .9rem;
    border-bottom: 1px solid rgba(15,23,42,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
  }
  .details-title {
    margin: 0;
    font-weight: 900;
    font-size: 1rem;
    color: rgba(15,23,42,.86);
  }
  .details-body { padding: .85rem .9rem; max-height: 500px; overflow-y: auto;}
  
  /* Key-Value styling for details */
  .kv {
    display: grid;
    grid-template-columns: 85px 1fr; /* Adjusted for inline buttons */
    gap: .5rem .6rem;
    font-size: .9rem;
    align-items: center; /* Center items vertically */
  }
  .k { color: rgba(15,23,42,.58); font-weight: 900; }
  .v { 
    color: rgba(15,23,42,.84); 
    min-width: 0; 
    display: flex; 
    align-items: center; 
    gap: 8px; /* Space between text and copy button */
  }
  /* Truncate text but leave room for copy button */
  .v-text {
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
  }
  .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
  .mini-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .75rem; }
  
  /* Inline Copy Button */
  .copy-inline-btn {
    background: transparent;
    border: none;
    color: rgba(15,23,42,.4);
    cursor: pointer;
    padding: 2px 4px;
    transition: color 150ms ease, transform 150ms ease;
  }
  .copy-inline-btn:hover {
    color: var(--brand-blue);
    transform: scale(1.1);
  }

  .icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .28rem .42rem;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.85);
    color: rgba(15,23,42,.78);
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
  }
  .icon-btn:hover { 
    transform: translateY(-1px);
    border-color: rgba(15,23,42,.18);
    box-shadow: 0 12px 20px rgba(15,23,42,.10);
    color: var(--brand-blue); 
  }

  /* Depiction Box (Bigger and Square) */
  .depict-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
  }
  .depict {
    width: 120px; /* Increased size */
    height: 120px; /* Square shape */
    border-radius: 4px; /* Less rounded, more square */
    border: 1px solid rgba(15,23,42,.15);
    background: rgba(255,255,255,1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }
  .depict img { width: 90%; height: 90%; object-fit: contain; }

  /* =========================================================
     Mobile Tweaks
     ========================================================= */
  @media (max-width: 991.98px){
    .searchby-row { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
    .searchby-row .form-check-label { font-size: .8rem; padding: .35rem; }
    #graph-container { height: 500px; }
  }
  @media (max-width: 768px){
    .home-panel.bg-green .panel-title { display: none !important; }
    .panel-inner .form-control { font-size: .9rem; }
    .panel-inner .form-label { font-size: .9rem; }
    .panel-inner .btn.btn-dark { font-size: .9rem; padding: .44rem .75rem; }

    #graph-container { height: 400px; }
    .details-drawer { width: 100%; right: 12px; left: 12px; }
  }