/* Base theme, page background, header, upload controls, tabs, and shared primitives. */

/* Knowledge Graph Explorer application styles.
   This file currently owns the full single-page layout: header/upload controls,
   search panels, graph canvases, selection sidebars, and assistant drawer. */

:root{
  --bg: #0b0f17;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.90);
  --muted: rgba(255,255,255,0.65);
  --muted2: rgba(255,255,255,0.50);
  --accent: #7dd3fc;
  --accent2: #a78bfa;
  --good: #86efac;
  --warn: #fbbf24;
  --bad: #fb7185;
  --shadow: 0 18px 60px rgba(0,0,0,0.45);
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing:border-box; }
*{ caret-color: transparent; }
input, textarea, [contenteditable="true"]{ caret-color: var(--accent); }
html,body{ height:100%; scrollbar-width:none; -ms-overflow-style:none; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  position: relative;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar{ width:0; height:0; }

body::before{
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(1350px 720px at 20% 0%, rgba(167,139,250,0.14), transparent 62%),
    radial-gradient(1100px 620px at 100% 30%, rgba(125,211,252,0.12), transparent 58%),
    radial-gradient(900px 760px at 0% 55%, rgba(167,139,250,0.06), transparent 66%),
    radial-gradient(900px 760px at 100% 55%, rgba(125,211,252,0.055), transparent 66%),
    radial-gradient(1400px 700px at 50% 50%, rgba(255,255,255,0.045), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

body::after{
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background:
    radial-gradient(1350px 620px at 18% 100%, rgba(167,139,250,0.13), transparent 64%),
    radial-gradient(1200px 560px at 82% 100%, rgba(125,211,252,0.11), transparent 62%),
    radial-gradient(880px 620px at 0% 78%, rgba(167,139,250,0.05), transparent 68%),
    radial-gradient(880px 620px at 100% 78%, rgba(125,211,252,0.045), transparent 68%),
    radial-gradient(1250px 560px at 50% 92%, rgba(255,255,255,0.04), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.app{
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 18px 22px;
}

.header{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items:center;
  gap: 16px;
  padding: 18px 18px;
  border: 1px solid var(--border);
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.07),
    rgba(167,139,250,0.05) 35%,
    rgba(125,211,252,0.09) 100%
  );
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 20;
}

.ingest{
  display:flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  margin-left: 0;
  justify-self: start;
  max-width: 430px;
  width: 100%;
}

.ingest .btn{ white-space: nowrap; }

.recent-select{
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 224px;
  min-width: 0;
  max-width: 224px;
}

.recent-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
}

.recent-row select{
  width: 100%;
}

.recent-menu{
  position: relative;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  overflow: visible;
}

.llm-menu{
  position: relative;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  overflow: visible;
}
.llm-menu > summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted2);
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
  font-family: var(--font-body);
}
.llm-menu > summary::-webkit-details-marker{
  display: none;
}
.llm-menu > summary::after{
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.8px solid rgba(255,255,255,0.65);
  border-bottom: 1.8px solid rgba(255,255,255,0.65);
  transform: rotate(45deg);
  transition: transform 180ms ease;
  margin-left: auto;
}
.llm-menu[open] > summary::after{
  transform: rotate(-135deg);
}
#llmCurrentLabel{
  color: rgba(234, 246, 255, 0.96);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.llm-options{
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 100%;
  max-height: 240px;
  overflow: auto;
  border-radius: 12px;
  background: rgba(12,14,20,0.98);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  z-index: 80;
  padding: 6px;
}
.llm-option{
  padding: 7px 8px;
  border-radius: 10px;
}
.llm-option-btn{
  border: none;
  background: transparent;
  color: rgba(232,244,255,0.95);
  text-align: left;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.2;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.llm-option-btn:disabled{
  color: rgba(232,244,255,0.38);
  cursor: default;
}
.llm-option-active{
  background: rgba(255,255,255,0.04);
}
.recent-menu > summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted2);
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
  font-family: var(--font-body);
  min-width: 0;
}
.recent-menu > summary::-webkit-details-marker{
  display: none;
}
.recent-menu > summary::after{
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.8px solid rgba(255,255,255,0.65);
  border-bottom: 1.8px solid rgba(255,255,255,0.65);
  transform: rotate(45deg);
  transition: transform 180ms ease;
  margin-left: auto;
}
.recent-menu[open] > summary::after{
  transform: rotate(-135deg);
}
#recentCurrentLabel{
  color: rgba(234, 246, 255, 0.96);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-options{
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  width: 100%;
  max-height: none;
  overflow: visible;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(12,14,20,0.98);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  z-index: 80;
  padding: 6px;
}
.recent-option{
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
}
.recent-option:hover{
  background: transparent;
}
.recent-option-btn{
  border: none;
  background: transparent;
  color: rgba(232,244,255,0.95);
  text-align: left;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}
.recent-option-btn:hover,
.recent-option-btn:focus,
.recent-option-btn:active{
  background: transparent;
  color: rgba(232,244,255,0.95);
  outline: none;
  box-shadow: none;
}
.recent-folder-dot{
  margin: 0;
  flex: 0 0 auto;
}
.recent-folder-arrow{
  width: 14px;
  height: 14px;
  border: none;
  background: transparent;
  color: rgba(240, 248, 255, 0.95);
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.recent-folder-arrow::before{
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid rgba(240, 248, 255, 0.95);
  border-bottom: 1.6px solid rgba(240, 248, 255, 0.95);
  transform: rotate(-45deg);
  transition: transform 140ms ease;
}
.recent-folder-arrow.is-open::before{
  transform: rotate(45deg);
}
.recent-folder-arrow:hover{
  color: #fff;
}
.recent-folder-delete{
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: rgba(240, 248, 255, 0.55);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 140ms ease, background 140ms ease;
}
.recent-folder-delete:hover{
  color: #ff8a80;
  background: rgba(255, 138, 128, 0.14);
}
.recent-files-popout{
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  width: 186px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(12,14,20,0.98);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  padding: 6px;
  z-index: 120;
}
.recent-file-row{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
}
.recent-file-row .pipeline-dot{
  margin: 0;
}
.recent-file-row .recent-option-btn{
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 0;
}
.recent-file-delete{
  margin-left: auto;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(251,113,133,0.55);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(127,29,29,0.92), rgba(153,27,27,0.96));
  color: rgba(255,244,246,0.98);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
}
.recent-file-delete:hover{
  background: linear-gradient(180deg, rgba(153,27,27,0.95), rgba(185,28,28,0.98));
  border-color: rgba(251,113,133,0.78);
  color: rgba(255,255,255,1);
}
.recent-file-add-row{
  padding-top: 6px;
}
.recent-file-add-btn{
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(187, 229, 255, 0.94);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.recent-file-add-btn:hover{
  color: rgba(219, 241, 255, 0.98);
}
.recent-file-add-icon{
  display: inline-flex;
  width: 12px;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.recent-file-add-text{
  white-space: nowrap;
}
.recent-option-active{
  background: transparent;
}

.trash-btn{
  width: 32px;
  height: 32px;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.recent-stack{
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 224px;
  min-width: 224px;
  max-width: 224px;
}

.pipeline-toggle{
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.pipeline-toggle-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: stretch;
  gap: 8px;
}

.pipeline-menu{
  flex: 1 1 auto;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  overflow: hidden;
}

.icon-btn.pipeline-run-btn{
  width: 32px;
  min-width: 32px;
  height: 32px;
  align-self: center;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.62);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.88), rgba(18, 71, 39, 0.92));
  color: rgba(220,255,232,0.98);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.icon-btn.pipeline-run-btn:hover{
  background: linear-gradient(180deg, rgba(22, 97, 52, 0.92), rgba(20, 83, 45, 0.96));
  border-color: rgba(74, 222, 128, 0.78);
}
.icon-btn.pipeline-run-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.pipeline-menu > summary{
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted2);
  cursor: pointer;
  user-select: none;
}

.pipeline-menu > summary::-webkit-details-marker{
  display: none;
}

.pipeline-menu > summary::after{
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.8px solid rgba(255,255,255,0.65);
  border-bottom: 1.8px solid rgba(255,255,255,0.65);
  transform: rotate(45deg);
  transition: transform 180ms ease;
  margin-left: auto;
}

.pipeline-menu[open] > summary::after{
  transform: rotate(-135deg);
}

.pipeline-options{
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 7px 7px 24px;
}

.pipeline-option{
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  min-height: 27px;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.pipeline-option:hover{
  background: transparent;
}

.pipeline-option:active{
  transform: translateY(1px);
}

.pipeline-option input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pipeline-dot{
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  border-radius: 50%;
  border: 1.4px solid rgba(255,255,255,0.35);
  background: radial-gradient(circle at 45% 45%, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  box-shadow: inset 0 0 0 1.4px rgba(0,0,0,0.35);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  flex: 0 0 auto;
}

button.pipeline-dot{
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  outline: none;
}

.pipeline-label{
  color: var(--muted);
  font-size: 11px;
}

.pipeline-option input:checked + .pipeline-dot{
  border-color: rgba(125,211,252,0.95);
  background: radial-gradient(circle at 45% 45%, rgba(125,211,252,0.95), rgba(125,211,252,0.45));
  box-shadow:
    inset 0 0 0 1.6px rgba(8, 18, 28, 0.7),
    0 0 0 2px rgba(125,211,252,0.15),
    0 0 8px rgba(125,211,252,0.32);
}

.pipeline-dot.is-on{
  border-color: rgba(125,211,252,0.95);
  background: radial-gradient(circle at 45% 45%, rgba(125,211,252,0.95), rgba(125,211,252,0.45));
  box-shadow:
    inset 0 0 0 1.6px rgba(8, 18, 28, 0.7),
    0 0 0 2px rgba(125,211,252,0.15),
    0 0 8px rgba(125,211,252,0.32);
}

.pipeline-option input:checked ~ .pipeline-label{
  color: rgba(234, 246, 255, 0.96);
}

.pipeline-option.pipeline-option-complete{
  cursor: not-allowed;
}

.pipeline-option.pipeline-option-complete .pipeline-dot{
  border-color: rgba(125,211,252,0.9);
  background: radial-gradient(circle at 45% 45%, rgba(125,211,252,0.78), rgba(125,211,252,0.30));
  box-shadow:
    inset 0 0 0 1.6px rgba(8, 18, 28, 0.7),
    0 0 0 2px rgba(125,211,252,0.12);
}

.pipeline-option.pipeline-option-complete .pipeline-label{
  color: rgba(125,211,252,0.96);
}

.pipeline-option.pipeline-option-complete:hover{
  background: transparent;
}

.pipeline-option-toggle{
  justify-content: space-between;
  gap: 10px;
}

.pipeline-option-toggle .pipeline-label{
  color: rgba(234, 246, 255, 0.96);
  font-size: 11px;
}

.pipeline-switch{
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.58);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.92), rgba(153, 27, 27, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.03);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  flex: 0 0 auto;
}

.pipeline-switch-thumb{
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(226,232,240,0.92));
  box-shadow:
    0 1px 4px rgba(0,0,0,0.32),
    inset 0 0 0 1px rgba(255,255,255,0.42);
  transition: transform 160ms ease;
}

.pipeline-option-toggle:hover .pipeline-switch{
  border-color: rgba(248, 113, 113, 0.76);
}

.pipeline-option-toggle input:checked ~ .pipeline-switch{
  border-color: rgba(74, 222, 128, 0.72);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.9), rgba(22, 101, 52, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.24),
    0 0 0 2px rgba(74, 222, 128, 0.12),
    0 0 10px rgba(34, 197, 94, 0.18);
}

.pipeline-option-toggle input:checked ~ .pipeline-switch .pipeline-switch-thumb{
  transform: translateX(14px);
}

.help-tip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  font-size: 10px;
  line-height: 1;
  cursor: help;
  position: relative;
  z-index: 1000;
  background: rgba(255,255,255,0.04);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.help-tip:hover,
.help-tip:focus-visible{
  border-color: rgba(125,211,252,0.6);
  color: rgba(255,255,255,0.95);
  background: rgba(125,211,252,0.12);
}
.help-tip::after{
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: 320px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(12,14,20,0.98);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
}
.help-tip::before{
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(12,14,20,0.98);
  opacity: 0;
  pointer-events: none;
  z-index: 1201;
}
.help-tip:hover::after,
.help-tip:focus-visible::after,
.help-tip:hover::before,
.help-tip:focus-visible::before{
  opacity: 1;
}

.recent-select label{
  font-size: 12px;
  color: var(--muted2);
}

.dropzone{
  width: 180px;
  min-height: 0;
  padding: 8px 10px;
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.dropzone-title{
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
  line-height: 1.1;
}

.dropzone-sub{
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}

.dropzone.is-dragover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(134,239,172,0.6);
}

.ingest-bar{
  width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
  text-align: center;
  transition: opacity 0.4s ease;
}

.ingest-bar.under-status{
  width: 100%;
  margin-left: 0;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
}

.ingest-bar.under-status .ingest-top{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.ingest-bar.under-status .ingest-msg{
  justify-self: start;
}

.ingest-bar.under-status .ingest-state{
  justify-self: center;
  text-align: center;
}

.ingest-bar.under-status .ingest-controls{
  justify-self: end;
}

.ingest-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.ingest-msg{
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  line-height: 1.2;
}
.ingest-state{
  font-size: 12px;
  color: var(--muted);
  display: inline-block;
  line-height: 1.2;
}
.ingest-controls{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.ingest-controls .btn.small{
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  opacity: 1;
}
.ingest-controls .btn.primary{
  border-color: rgba(125,211,252,0.9);
  background: linear-gradient(135deg, rgba(125,211,252,0.72), rgba(56,189,248,0.62));
  box-shadow: 0 0 0 1px rgba(125,211,252,0.78), 0 0 18px rgba(56,189,248,0.5);
  color: rgba(245,252,255,0.98);
}
.ingest-controls .btn.danger{
  background: linear-gradient(135deg, rgba(251,113,133,0.58), rgba(239,68,68,0.52));
  color: rgba(255,244,246,0.98);
}
#ingestPauseResumeBtn,
#ingestCancelBtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-indent: 0;
  letter-spacing: 0;
  min-width: 26px;
  width: 26px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
}

.ingest-log{
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.ingest-count{
  margin: 2px 0 6px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
}

.progress{
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: none;
  overflow: hidden;
}

.progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125,211,252,0.9), rgba(167,139,250,0.9));
  transition: width 200ms ease;
  position: relative;
  overflow: hidden;
}

.progress-fill::after{
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  opacity: 0;
  animation: progress-shimmer 1.6s linear infinite;
}

.progress.is-active .progress-fill::after{
  opacity: 1;
}

@keyframes progress-shimmer{
  0% { left: -60%; }
  100% { left: 100%; }
}
@keyframes title-glow{
  0%, 100% {
    text-shadow:
      0 1px 0 rgba(0,0,0,0.35),
      0 0 10px rgba(125,211,252,0.25);
  }
  50% {
    text-shadow:
      0 1px 0 rgba(0,0,0,0.35),
      0 0 16px rgba(125,211,252,0.45);
  }
}

.brand{ display:flex; flex-direction: column; align-items:center; gap:8px; }
.brand{
  grid-column: 2;
  justify-content: center;
  min-width: 320px;
}
.brand-text{ text-align: center; }
.header .brand{
  margin: 0;
  justify-self: center;
}
.logo{
  width:46px; height:46px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(125,211,252,0.9), rgba(167,139,250,0.9));
  color:#0b0f17;
  font-weight:800;
  letter-spacing: 0.5px;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.35),
    0 0 16px rgba(125,211,252,0.45),
    0 0 34px rgba(125,211,252,0.22);
}
.brand-text .title{
  font-size: 20px;
  font-weight: 700;
  font-family: "Manrope", var(--font-display);
  letter-spacing: 0.2px;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.35),
    0 0 10px rgba(125,211,252,0.25);
  animation: title-glow 4.2s ease-in-out infinite;
}
.brand-links{
  margin-top: 6px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.brand-github{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.03);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.brand-github:hover{
  transform: translateY(-1px);
  border-color: rgba(125,211,252,0.6);
  background: rgba(125,211,252,0.08);
}
.brand-github:focus-visible{
  outline: 2px solid rgba(125,211,252,0.8);
  outline-offset: 2px;
}
.github-icon{
  width: 14px;
  height: 14px;
  fill: rgba(255,255,255,0.82);
}
.brand-icon-img{
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  filter: brightness(0.95) saturate(1.1);
}
.brand-text .subtitle{ font-size: 13px; color: var(--muted); margin-top: 2px; }

.system-bar{
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 18px;
  background: transparent;
  border: none;
  flex: 1 1 0;
  align-items: center;
  text-align: center;
}
.system-row{
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.status{
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.auth-widget{
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(8, 18, 30, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: rgba(234, 246, 255, 0.9);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.auth-widget[hidden]{
  display: none !important;
}

.auth-widget:hover,
.auth-widget:focus{
  background: rgba(14, 116, 144, 0.22);
  border-color: rgba(125, 211, 252, 0.62);
  color: rgba(234, 246, 255, 0.98);
  transform: translateY(-1px);
  outline: none;
}

.auth-logout-icon{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.llm-select{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
}

.llm-select label{
  font-size: 12px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.llm-link{
  font-size: 12px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-decoration: none;
}

.llm-link:hover,
.llm-link:focus{
  color: rgba(234, 246, 255, 0.96);
  text-decoration: none;
}


.banner{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(251,113,133,0.45);
  background: rgba(251,113,133,0.12);
  color: rgba(255,255,255,0.92);
  font-size: 13px;
}

.banner.hidden{
  display: none;
}
.hidden{
  display: none;
}

.accent-line{
  height: 2px;
  margin: 10px 6px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125,211,252,0.0), rgba(125,211,252,0.7), rgba(167,139,250,0.7), rgba(167,139,250,0.0));
  opacity: 0.65;
}

.tabs{
  display:flex;
  gap: 10px;
  margin-top: 6px;
  padding: 6px 0;
  border: none;
  background: transparent;
  border-radius: 16px;
  backdrop-filter: none;
}

.app-disabled .tabs,
.app-disabled .main{
  opacity: 0.45;
  filter: grayscale(0.1);
  pointer-events: none;
}

.tab{
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 120ms ease;
}
.tab:hover{ background: rgba(255,255,255,0.06); color: var(--text); }
.tab.active{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.14);
  color: var(--text);
}
.tab.disabled{
  opacity: 0.35;
  filter: grayscale(0.2);
  pointer-events: none;
  cursor: not-allowed;
}

.main{ margin-top: -6px; }

/* ---- Compliance assessment panel ---- */
.compliance-results{ margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.compliance-summary{ display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 14px 16px; border: 1px solid rgba(255,255,255,0.10); border-radius: 12px;
  background: rgba(255,255,255,0.03); }
.compliance-risk{ font-size: 15px; }
.compliance-risk.risk-high b{ color: #ff8a80; }
.compliance-risk.risk-medium b{ color: #ffcf6b; }
.compliance-risk.risk-low b{ color: #7ee2a8; }
.compliance-counts{ display: flex; flex-wrap: wrap; gap: 6px; }
.compliance-chip{ font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.chip-ok{ color:#7ee2a8; background: rgba(126,226,168,0.14); }
.chip-warn{ color:#ffcf6b; background: rgba(255,207,107,0.14); }
.chip-bad{ color:#ff8a80; background: rgba(255,138,128,0.14); }
.chip-idle{ color:#9aa3b2; background: rgba(154,163,178,0.14); }
.compliance-grounded{ font-size: 12.5px; color: rgba(240,248,255,0.55); width: 100%; }
.compliance-loading{ font-size: 13.5px; color: rgba(240,248,255,0.7); }
.compliance-error{ font-size: 14px; color: #ff8a80; }
.compliance-findings{ display: flex; flex-direction: column; gap: 10px; }
.compliance-finding{ border: 1px solid rgba(255,255,255,0.10); border-radius: 12px;
  padding: 14px 16px; background: rgba(255,255,255,0.02); }
.finding-head{ display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.finding-status{ font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.03em; }
.status-ok{ color:#7ee2a8; background: rgba(126,226,168,0.14); }
.status-warn{ color:#ffcf6b; background: rgba(255,207,107,0.14); }
.status-bad{ color:#ff8a80; background: rgba(255,138,128,0.14); }
.status-idle{ color:#9aa3b2; background: rgba(154,163,178,0.14); }
.finding-cat{ font-size: 15px; font-weight: 600; }
.finding-row{ font-size: 13.5px; color: rgba(240,248,255,0.85); margin-top: 5px; line-height: 1.5; }
.finding-label{ color: rgba(240,248,255,0.55); font-weight: 600; margin-right: 4px; }
.finding-rec{ color: #9ec5ff; }
.finding-citations{ margin-top: 10px; }
.finding-citations summary{ cursor: pointer; font-size: 12.5px; color: rgba(158,197,255,0.9); }
.finding-citations blockquote{ margin: 8px 0 0; padding: 8px 12px; border-left: 2px solid rgba(158,197,255,0.4);
  background: rgba(255,255,255,0.03); font-size: 12.5px; color: rgba(240,248,255,0.75); border-radius: 0 6px 6px 0; }
.compliance-graph-wrap{ border: 1px solid rgba(255,255,255,0.10); border-radius: 12px;
  padding: 12px 14px 10px; background: rgba(255,255,255,0.02); }
.compliance-graph-head{ display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.compliance-graph-title{ font-size: 13.5px; font-weight: 600; color: rgba(240,248,255,0.9); }
.compliance-graph-hint{ font-size: 12px; color: rgba(240,248,255,0.5); }
.compliance-graph{ width: 100%; height: 340px; }
.compliance-graph-legend{ display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.compliance-graph-leg{ display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(240,248,255,0.7); }
.compliance-graph-leg .leg-swatch{ width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.compliance-io{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.compliance-io .btn{ height: 34px; padding: 6px 12px; font-size: 12.5px; }
.compliance-io .btn:disabled{ opacity: 0.45; cursor: not-allowed; }
.compliance-io-note{ font-size: 12px; }
.compliance-io-note.ok{ color: #7ee2a8; }
.compliance-io-note.err{ color: #ff8a80; }
.compliance-io-help{ flex-basis: 100%; font-size: 12px; color: rgba(240,248,255,0.55); margin-top: 2px; }
.compliance-io-help summary{ cursor: pointer; color: rgba(158,197,255,0.9); }
.compliance-io-help p{ margin: 6px 0 4px; }
.compliance-io-help pre{ margin: 4px 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); overflow-x: auto; font-size: 11.5px; line-height: 1.45;
  color: rgba(240,248,255,0.8); }
.compliance-disclaimer{ font-size: 12px; color: rgba(240,248,255,0.45); font-style: italic; }

/* Advisor panel */
.advisor-io{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.advisor-select-label{ font-size: 12.5px; color: rgba(240,248,255,0.6); font-weight: 600; }
.advisor-select{ height: 34px; border-radius: 10px; padding: 4px 10px; font-size: 12.5px;
  background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid rgba(255,255,255,0.14); }
.advisor-io-note{ font-size: 12px; }
.advisor-io-note.err{ color: #ff8a80; }
.advisor-results{ margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.advisor-meta{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.advisor-badge{ font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.03em; }
.advisor-rag{ color: #9ec5ff; background: rgba(158,197,255,0.14); }
.advisor-structured{ color: #7ee2a8; background: rgba(126,226,168,0.14); }
.advisor-symbolic{ color: #c6a8ff; background: rgba(198,168,255,0.14); }
.advisor-route{ font-size: 12px; color: rgba(240,248,255,0.55); }
.advisor-fallback{ font-size: 12px; color: #ffcf6b; }
.advisor-answer{ font-size: 14px; line-height: 1.6; color: rgba(240,248,255,0.9); white-space: pre-wrap;
  border: 1px solid rgba(255,255,255,0.10); border-radius: 12px; padding: 14px 16px; background: rgba(255,255,255,0.02); }
.advisor-loading{ color: rgba(240,248,255,0.7); font-size: 13.5px; white-space: normal; }
.advisor-error{ color: #ff8a80; font-size: 14px; }
.advisor-query summary{ cursor: pointer; font-size: 12.5px; color: rgba(158,197,255,0.9); }
.advisor-query pre{ margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); overflow-x: auto; font-size: 12px; line-height: 1.5;
  color: rgba(240,248,255,0.85); }
.advisor-evidence{ display: flex; flex-direction: column; gap: 8px; }
.advisor-evidence summary{ cursor: pointer; font-size: 12.5px; color: rgba(158,197,255,0.9); }
.advisor-triples ul{ margin: 8px 0 0; padding-left: 18px; }
.advisor-triples li{ font-size: 12.5px; color: rgba(240,248,255,0.8); margin: 3px 0; line-height: 1.45; }
.advisor-triples .triple-p{ color: rgba(240,248,255,0.5); font-style: italic; }
.advisor-citations blockquote{ margin: 8px 0 0; padding: 8px 12px; border-left: 2px solid rgba(158,197,255,0.4);
  background: rgba(255,255,255,0.03); font-size: 12.5px; color: rgba(240,248,255,0.75); border-radius: 0 6px 6px 0; }
