/* ============================================================
   FREQUENCELAB
   FRONTEND 1 — INVESTIGATIONS WORKSPACE
   ============================================================ */

#investigations-workspace {
  padding: 28px;
  min-height: 100%;
}

#investigations-workspace[hidden] {
  display: none !important;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.inv-eyebrow {
  color: #35d7ce;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.inv-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.inv-header p {
  margin: 0;
  max-width: 760px;
  opacity: 0.68;
  line-height: 1.55;
}

.inv-live-box {
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(55, 218, 208, 0.18);
  border-radius: 14px;
  background: rgba(4, 24, 30, 0.78);
  padding: 14px 16px;
}

.inv-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e7b34f;
}

.inv-live-dot.ok {
  background: #4de18b;
  box-shadow: 0 0 12px rgba(77, 225, 139, 0.48);
}

.inv-live-dot.bad {
  background: #ef6464;
}

.inv-live-box small {
  display: block;
  opacity: 0.55;
  margin-bottom: 3px;
}

.inv-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.inv-card,
.inv-panel {
  border: 1px solid rgba(58, 210, 202, 0.14);
  background: rgba(5, 25, 31, 0.76);
  border-radius: 16px;
}

.inv-card {
  padding: 20px;
}

.inv-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  opacity: 0.56;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.inv-value {
  display: block;
  font-size: 23px;
  margin-bottom: 6px;
}

.inv-card small {
  opacity: 0.52;
  line-height: 1.4;
}

.inv-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.inv-panel {
  padding: 22px;
}

.inv-panel + .inv-panel {
  margin-top: 0;
}

.inv-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.inv-panel-header h2 {
  margin: 0;
  font-size: 19px;
}

.inv-panel-header small {
  color: #35d7ce;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.inv-button {
  border: 1px solid rgba(55, 215, 206, 0.28);
  background: rgba(55, 215, 206, 0.08);
  color: inherit;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}

.inv-button:hover {
  background: rgba(55, 215, 206, 0.14);
}

.inv-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
}

.inv-table th,
.inv-table td {
  text-align: left;
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.inv-table th {
  opacity: 0.5;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inv-runtime-list {
  margin: 0;
}

.inv-runtime-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-runtime-row dt {
  opacity: 0.64;
}

.inv-runtime-row dd {
  margin: 0;
  font-weight: 700;
}

.inv-case-search {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.inv-input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
  color: inherit;
  font-size: 14px;
}

.inv-case-result {
  border: 1px solid rgba(55, 215, 206, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.13);
  padding: 16px;
  min-height: 110px;
  overflow-wrap: anywhere;
}

.inv-case-result.error {
  border-color: rgba(239, 100, 100, 0.35);
}

.inv-case-json {
  margin: 0;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
}

.inv-status-message {
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.62;
}

@media (max-width: 1050px) {
  .inv-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inv-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #investigations-workspace {
    padding: 18px;
  }

  .inv-header {
    flex-direction: column;
  }

  .inv-live-box {
    width: 100%;
  }

  .inv-card-grid {
    grid-template-columns: 1fr;
  }

  .inv-case-search {
    grid-template-columns: 1fr;
  }
}


/* FRONTEND_1_STANDALONE_LAYOUT_FIX */

/*
 * investigations.html is a standalone workspace.
 * It therefore owns its two-column application shell.
 */

.investigations-page-shell {
  display: grid;
  grid-template-columns: 305px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  background: #031116;
}

.investigations-page-shell > .sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  width: 305px;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.investigations-page-main {
  min-width: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  box-sizing: border-box;
}

/*
 * Prevent anchors in the sidebar from inheriting normal
 * browser hyperlink decoration.
 */

.investigations-page-shell a.nav-item,
.investigations-page-shell a.nav-item:link,
.investigations-page-shell a.nav-item:visited,
.investigations-page-shell a.nav-item:hover,
.investigations-page-shell a.nav-item:active {
  text-decoration: none !important;
  color: inherit;
}

/*
 * Keep disabled future-module buttons visually consistent.
 */

.investigations-page-shell .nav-item:disabled {
  opacity: 0.62;
  cursor: default;
}

/*
 * Investigations content must occupy the second column.
 */

#investigations-workspace {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 38px 42px 48px;
}

/*
 * Responsive layout.
 */

@media (max-width: 900px) {
  .investigations-page-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .investigations-page-shell > .sidebar {
    width: 240px;
  }

  #investigations-workspace {
    padding: 26px;
  }
}

@media (max-width: 720px) {
  .investigations-page-shell {
    display: block;
  }

  .investigations-page-shell > .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .investigations-page-main {
    min-height: auto;
  }

  #investigations-workspace {
    padding: 20px;
  }
}
