/* =======================
   flask.css
   ======================= */

/* -----------------------
   Reset & base
   ----------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  color: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

body.login-bg {
  background: url('/static/api5.png') no-repeat center center fixed;
  background-size: cover;
}

body.main-bg {
  background: url('/static/baggrund1.png') no-repeat center center fixed;
  background-size: cover;
}

::selection {
  background: rgba(91, 192, 222, 0.35);
  color: #0f1115;
}

/* -----------------------
   Layout helpers
   ----------------------- */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* RETTET: var grid før, nu centreret uden fælles-panel */
.page-grid {
  max-width: 1480px;
  margin: 80px auto;
  padding: 0 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* -----------------------
   Navbar
   ----------------------- */
.navbar {
  background: linear-gradient(180deg, rgba(12, 14, 18, 0.92), rgba(12, 14, 18, 0.55));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.navbar-brand,
.logo-button {
  background: none;
  border: none;
  color: #5bc0de !important;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 1.8em;
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
  transition: color 0.25s ease;
}

.logo-button:hover,
.navbar-brand:hover {
  color: #4aa7c3 !important;
}

.logo-button:focus {
  outline: none;
  box-shadow: none;
}

.navbar-nav .nav-link {
  color: #c5c8c6 !important;
}

.navbar-nav .nav-link:hover {
  color: #5bc0de !important;
}

.dropdown-menu {
  background-color: #1f2328;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown-item {
  color: #c5c8c6 !important;
}

.dropdown-item:hover {
  background-color: #293037;
}

/* -----------------------
   Shared glass panels
   ----------------------- */
.glass-panel {
  background: rgba(20, 23, 27, 0.72);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  border: none;
  color: #e9eef5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 30px;
}

/* -----------------------
   Main containers
   ----------------------- */
.search-container {
  width: 100%;
  max-width: 1900px;
  min-width: 0;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 0 25px rgba(0, 153, 255, 0.4);
  color: #e9eef5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-container {
  max-width: 440px;
  width: 92%;
  margin: clamp(40px, 10vh, 80px) auto;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.auth-container .card {
  background: rgba(20, 23, 27, 0.72) !important;
  color: #e9eef5 !important;
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.auth-container .card .card-body {
  padding: 28px;
}

/* -----------------------
   Titles & text
   ----------------------- */
.auth-container h3,
.search-container h1,
.card h4 {
  color: #e6f6fb;
  text-align: center;
  margin-bottom: 18px;
  font-weight: 700;
}

.panel,
.card,
.box,
.risk-card,
.rules-card {
  color: rgba(255, 255, 255, 0.92);
}

.panel p,
.card p,
.box p,
.rules-card p,
.rules-card li {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.mini-muted {
  color: rgba(255, 255, 255, 0.78);
}

/* -----------------------
   Forms
   ----------------------- */
.form-label {
  color: #cfd6dc;
  letter-spacing: 0.2px;
}

.form-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #6bd4ee;
  box-shadow: 0 0 0 3px rgba(91, 192, 222, 0.25);
  color: #ffffff;
}

.form-control::placeholder {
  color: #9aa3ad;
}

.address-year-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.address-year-select:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #6bd4ee;
  box-shadow: 0 0 0 3px rgba(91, 192, 222, 0.25);
  color: #ffffff;
}

.address-year-select option {
  background: #1a2535;
  color: #fff;
}

/* -----------------------
   Buttons
   ----------------------- */
.btn-primary {
  background-color: #5bc0de;
  border: none;
  color: #0f1115;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  transition: transform 0.06s ease, filter 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #4aa7c3;
  filter: brightness(1.02);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-success {
  background-color: #28a745;
  border: none;
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-outline-light {
  border-radius: 0 12px 12px 0;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* -----------------------
   Alerts
   ----------------------- */
.alert {
  border-radius: 12px;
  border: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.18);
  color: #ffd6db;
}

/* -----------------------
   Loading / progress
   ----------------------- */
#loadingSpinner {
  display: none;
  margin-top: 20px;
}

#progressContainer {
  display: none;
  margin-top: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  height: 25px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

#progressBar {
  height: 100%;
  width: 0%;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, #0d6efd, #28a745);
  box-shadow: 0 0 20px rgba(13, 110, 253, 0.9), 0 0 25px rgba(40, 167, 69, 0.6);
  color: white;
  font-weight: bold;
  text-align: center;
  line-height: 25px;
  border-radius: 10px;
}

#progressText {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #ffffff;
  opacity: 0.9;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

/* -----------------------
   Case cards
   ----------------------- */
.case-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 153, 255, 0.18);
}

.case-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tab-panel {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 0 15px rgba(0, 153, 255, 0.12);
  color: #fff;
}

.nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-tabs .nav-link {
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: 0;
  opacity: 0.9;
}

.nav-tabs .nav-link:hover {
  opacity: 1;
}

.nav-tabs .nav-link.active {
  color: #ffffff;
  opacity: 1;
  background: transparent;
  border: 0;
}

/* -----------------------
   Context menu
   ----------------------- */
#ctxMenu {
  position: fixed;
  z-index: 99999;
  min-width: 220px;
  display: none;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 153, 255, 0.25);
  padding: 10px;
  backdrop-filter: blur(6px);
}

.ctx-muted {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 6px;
  word-break: break-word;
}

.ctx-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: #ffffff;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
}

.ctx-item:hover {
  background: rgba(13, 110, 253, 0.18);
}

.ctx-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}

/* -----------------------
   Risk profile
   ----------------------- */
.risk-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 16px;
}

.risk-card {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 0 12px rgba(0, 153, 255, 0.08);
  overflow: visible !important;
  min-width: 0 !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.risk-card-title {
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
  font-size: 16px;
  color: #ffffff;
}

.risk-ai-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(91, 192, 222, 0.25);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 0 20px rgba(91,192,222,0.08);
  min-height: 100%;
}

.risk-ai-text {
  color: #d9ecff;
  line-height: 1.7;
  font-size: 14px;
}

.risk-disclaimer {
  margin-bottom: 18px;
  color: #e0b84f;
  opacity: 0.92;
  line-height: 1.55;
  font-size: 13px;
  max-width: 1100px;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px;
  overflow: visible !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100%;
}

.chart-label {
  font-size: 12px;
  opacity: 0.86;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.82);
}

.rp-subtitle {
  margin: 4px 0 8px;
  font-weight: 700;
  opacity: 0.96;
  font-size: 13px;
}

.rp-details {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 6px;
}

.rp-rules-list {
  flex: 1;
  min-height: 0;
  max-height: 420px;
  overflow: auto;
  padding-right: 8px;
}

.rp-rule {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  margin-bottom: 10px;
}

.rp-rule-title,
.rp-rule-meta,
.rp-rule-meta div,
.rp-rule-meta small {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.rp-rule-meta {
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
  opacity: 1;
  margin-top: 6px;
}

.rp-rule-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.rp-rule-title {
  font-weight: 700;
}

.rp-rule-points {
  font-weight: 800;
  opacity: 0.95;
}

.rules-card,
.rules-list,
#rulesContainer,
.rule-evidence,
.rule-meta,
.rule-card small,
.rule-card .evidence {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ekstra spacing i risikoprofil */
.risk-top-wrap {
  margin-bottom: 6px;
}

.risk-top-wrap .badge {
  margin-right: 6px;
}

.risk-top-wrap .btn {
  min-width: 92px;
}

.risk-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.risk-card li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.risk-card li:last-child {
  margin-bottom: 0;
}

.risk-compact-card {
  padding: 14px;
}

.risk-compact-card .mini-muted {
  font-size: 12px;
  margin-bottom: 6px !important;
}

.risk-category-row .weight-badge {
  font-size: 11px;
  opacity: 0.75;
}

.person-risk-narrative h5 {
  color: inherit;
}

.risk-compact-card ul {
  padding-left: 16px;
  margin-bottom: 0;
}

.risk-compact-card li {
  margin-bottom: 4px;
  line-height: 1.35;
  font-size: 13px;
}

.risk-compact-content {
  max-height: 180px;
  overflow: auto;
  padding-right: 6px;
}
/* -----------------------
   Historik
   ----------------------- */
.hist-block {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.hist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.22);
}

.hist-head .title {
  font-weight: 700;
}

.hist-head .meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.hist-body {
  padding: 12px;
}

.hist-long {
  max-height: 420px;
  overflow: auto;
}

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

.cvr-table th,
.cvr-table td {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: top;
}

.cvr-table th {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.hist-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hist-badge.current {
  background: rgba(40, 167, 69, 0.18);
}

.hist-badge.past {
  background: rgba(13, 110, 253, 0.18);
}

/* Company status badge (shown next to every company mention) */
.company-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}

.company-status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.company-status-badge.risk-green {
  background: rgba(40, 167, 69, 0.15);
  border-color: rgba(40, 167, 69, 0.4);
  color: #6fe08c;
}
.company-status-badge.risk-green .dot { background: #3ecf62; }

.company-status-badge.risk-yellow {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.4);
  color: #ffd873;
}
.company-status-badge.risk-yellow .dot { background: #ffc107; }

.company-status-badge.risk-red {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.45);
  color: #ff8f97;
}
.company-status-badge.risk-red .dot { background: #dc3545; }

.company-status-badge.risk-gray {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.65);
}
.company-status-badge.risk-gray .dot { background: rgba(255, 255, 255, 0.5); }

/* Status badge overlaid on Cytoscape graph nodes (Netværk view) */
.cy-status-badge-label {
  pointer-events: none;
}
.cy-status-badge-label .company-status-badge {
  pointer-events: auto;
}

.capital-box {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
}

.capital-box .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.capital-box .left {
  opacity: 0.85;
}

.capital-box .note {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 6px;
}

/* -----------------------
   Premium Timeline
   ----------------------- */

.tl-yearstack{
  display:grid;
  gap:18px;
  position:relative;
}

/* TIMELINE AXIS */
.tl-axis{
  position:relative;
  padding:8px 0;
}

.tl-axis::before{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:2px;
  background:linear-gradient(180deg, rgba(91,192,222,0.55), rgba(91,192,222,0.08));
  transform:translateX(-50%);
}

.tl-axis-row{
  position:relative;
  display:grid;
  grid-template-columns:1fr 64px 1fr;
  align-items:start;
  margin-bottom:22px;
}

.tl-axis-marker{
  grid-column:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  position:relative;
  z-index:2;
}

.tl-axis-dot{
  width:14px;
  height:14px;
  border-radius:50%;
  margin-top:18px;
  background:#5bc0de;
  box-shadow:0 0 0 4px rgba(91,192,222,0.18), 0 0 14px rgba(91,192,222,0.55);
}

.tl-axis-year{
  margin-top:6px;
  font-weight:900;
  font-size:0.95rem;
  color:#eaf7ff;
  text-shadow:0 0 10px rgba(91,192,222,0.35);
  white-space:nowrap;
}

.tl-axis-row--left .tl-yearcard{ grid-column:1; }
.tl-axis-row--right .tl-yearcard{ grid-column:3; }

.tl-axis-row--left .tl-yearcard::after,
.tl-axis-row--right .tl-yearcard::after{
  content:"";
  position:absolute;
  top:28px;
  height:2px;
  background:rgba(91,192,222,0.45);
}

.tl-axis-row--left .tl-yearcard::after{ right:-24px; width:24px; }
.tl-axis-row--right .tl-yearcard::after{ left:-24px; width:24px; }

@media (max-width: 820px){
  .tl-axis::before{ left:14px; }
  .tl-axis-row{ grid-template-columns:28px 1fr; margin-bottom:16px; }
  .tl-axis-marker{ grid-column:1; }
  .tl-axis-row--left .tl-yearcard,
  .tl-axis-row--right .tl-yearcard{ grid-column:2; }
  .tl-axis-row--left .tl-yearcard::after,
  .tl-axis-row--right .tl-yearcard::after{ display:none; }
}

/* YEAR CARD */
.tl-yearcard{
  position:relative;
  padding:10px;
  border:1px solid rgba(91,192,222,0.18);
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(
    180deg,
    rgba(10,18,26,0.72),
    rgba(0,0,0,0.36)
  );
  box-shadow:
    0 12px 28px rgba(0,0,0,0.28),
    0 0 18px rgba(91,192,222,0.06);
}

/* YEAR HEADER */
.tl-yearhead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.05);
  margin-bottom:10px;
}

.tl-yearhead .y{
  font-weight:900;
  font-size:1.25rem;
  color:#ffffff;
  letter-spacing:0.5px;
  text-shadow:0 0 10px rgba(91,192,222,0.25);
}

.tl-yearhead .mini-muted{
  color:#6fcfff;
  font-size:13px;
  font-weight:600;
}

/* CONTENT */
.tl-sections{
  display:grid;
  gap:12px;
  padding:0;
}

/* SECTION CARD */
.tl-sec{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,0.025);
  transition:all 0.25s ease;
}

.tl-sec:hover{
  transform:translateY(-2px);
  border-color:rgba(91,192,222,0.35);
  box-shadow:0 0 20px rgba(91,192,222,0.12);
}

/* SECTION HEADER */
.tl-sec-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding:12px 14px;
  font-weight:800;
  color:#f3fbff;
  background:rgba(0,0,0,0.22);
  border-bottom:1px solid rgba(255,255,255,0.06);
}

.tl-sec-title i{
  color:#5bc0de;
  text-shadow:0 0 10px rgba(91,192,222,0.35);
}

.tl-sec-title small{
  color:rgba(255,255,255,0.50);
  font-size:12px;
  font-weight:500;
}

/* SECTION BODY */
.tl-sec-body{
  padding:10px;
  display:grid;
  gap:10px;
}

/* EVENT CARD */
.tl-change{
  position:relative;
  padding:10px 12px 10px 16px;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:14px;
  background:rgba(0,0,0,0.24);
  transition:all 0.18s ease;
}

.tl-change::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:999px;
  background:#5bc0de;
  box-shadow:0 0 12px rgba(91,192,222,0.45);
}

.tl-change:hover{
  transform:translateY(-1px);
  border-color:rgba(91,192,222,0.25);
  background:rgba(91,192,222,0.055);
}

/* TOP LINE */
.tl-change-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:4px;
}

.tl-change-type{
  font-size:12px;
  font-weight:800;
  color:#9fdcff;
  background:rgba(91,192,222,0.10);
  border:1px solid rgba(91,192,222,0.20);
  border-radius:999px;
  padding:4px 9px;
}

.tl-date{
  white-space:nowrap;
  color:#7f98a8;
  font-size:12px;
  letter-spacing:0.5px;
}

/* TEXT */
.tl-change-text{
  font-size:13px;
  line-height:1.55;
  color:rgba(255,255,255,0.88);
}

.tl-line{
  display:block;
  margin:2px 0;
  line-height:1.45;
}

.tl-key{
  color:#9fdcff;
  font-weight:800;
  margin-right:6px;
}

.tl-entry{
  color:#8dffb3;
  font-weight:600;
}

.tl-exit{
  color:#ff8a8a;
  font-weight:600;
}

/* MAP */
.tl-map-link{
  color:#5bc0de;
  font-size:16px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
}

.tl-map-link:hover{
  color:#b8efff;
  text-shadow:0 0 10px rgba(91,192,222,0.45);
}

/* ENTITY LINKS */
.entity-search-link{
  color:#35b8ff;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}

.entity-search-link:hover{
  color:#8fdcff;
}

/* EMPTY */
.tl-unchanged{
  color:rgba(255,255,255,0.58);
  font-size:13px;
  padding:2px 0;
}

/* -----------------------
   Premium Global CVR UI
   ----------------------- */

/* Main search/card shell */
.search-container,
.case-card,
.tab-panel,
.hist-block,
.risk-card,
.chart-box,
.capital-box {
  background: linear-gradient(
    180deg,
    rgba(10,18,26,0.72),
    rgba(0,0,0,0.36)
  ) !important;
  border: 1px solid rgba(91,192,222,0.16) !important;
  border-radius: 18px !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.28),
    0 0 18px rgba(91,192,222,0.06) !important;
}

/* Case header */
.case-header {
  background: rgba(255,255,255,0.025) !important;
  border-bottom: 1px solid rgba(91,192,222,0.14) !important;
}

.case-header:hover {
  background: rgba(91,192,222,0.06) !important;
}

/* Tabs */
.nav-tabs {
  border-bottom: 1px solid rgba(91,192,222,0.16) !important;
  gap: 6px;
}

.nav-tabs .nav-link {
  border-radius: 12px 12px 0 0 !important;
  padding: 10px 14px;
  color: rgba(255,255,255,0.72) !important;
}

.nav-tabs .nav-link:hover {
  color: #9fdcff !important;
  background: rgba(91,192,222,0.06) !important;
}

.nav-tabs .nav-link.active {
  color: #ffffff !important;
  background: rgba(91,192,222,0.13) !important;
  border: 1px solid rgba(91,192,222,0.22) !important;
  border-bottom: none !important;
}

/* Tables / Historik */
.cvr-table th {
  background: rgba(91,192,222,0.08);
  color: #9fdcff !important;
  font-weight: 800;
}

.cvr-table td {
  background: rgba(255,255,255,0.015);
}

.cvr-table tr:hover td {
  background: rgba(91,192,222,0.045);
}

/* Historik headers */
.hist-head {
  background: rgba(255,255,255,0.025) !important;
  border-bottom: 1px solid rgba(91,192,222,0.12);
}

.hist-head:hover {
  background: rgba(91,192,222,0.06) !important;
}

.hist-head .title {
  color: #f3fbff;
}

.hist-head .meta {
  color: #6fcfff;
}

/* Forms/buttons */
.form-control {
  background: rgba(0,0,0,0.28) !important;
  border: 1px solid rgba(91,192,222,0.18) !important;
}

.form-control:focus {
  border-color: rgba(91,192,222,0.5) !important;
  box-shadow: 0 0 0 3px rgba(91,192,222,0.18) !important;
}

.btn-primary {
  background: linear-gradient(90deg, #5bc0de, #6fcfff) !important;
  color: #061018 !important;
  box-shadow: 0 0 16px rgba(91,192,222,0.22);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* Risk cards */
.risk-card-title,
.chart-label,
.rp-subtitle {
  color: #9fdcff !important;
}

.rp-rule {
  background: rgba(0,0,0,0.24) !important;
  border: 1px solid rgba(91,192,222,0.12) !important;
  border-radius: 14px !important;
}

.rp-rule:hover {
  border-color: rgba(91,192,222,0.28) !important;
  background: rgba(91,192,222,0.045) !important;
}

/* Shared selectable/link style */
.cvr-selectable {
  cursor: context-menu;
  display: inline-block; 
  padding: 6px 10px; 
  border-radius: 8px;
  transition: background 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
}

.cvr-selectable:hover {
  background-color: rgb(33, 48, 64);
  box-shadow: 0 6px 18px rgba(91,192,222,0.06);
}

.cvr-selectable:hover:not([href]) {
  color: #9fdcff;
}



.entity-search-link,
a {
  color: #35b8ff;
}

.entity-search-link:hover,
a:hover {
  color: #8fdcff;
  cursor:pointer;
}



/* -----------------------
   CVR suggest
   ----------------------- */
#cvrSuggestBox {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 191, 255, 0.18);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 0 18px rgba(0, 153, 255, 0.18);
}

#cvrSuggestList {
  border-radius: 12px;
  overflow: hidden;
}

#cvrSuggestList .list-group-item {
  background: rgba(0, 0, 0, 0.55) !important;
  color: #e9f3ff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 0 !important;
  border-right: 0 !important;
  backdrop-filter: blur(6px);
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}

#cvrSuggestList .list-group-item + .list-group-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#cvrSuggestList .list-group-item:hover {
  background: rgba(13, 110, 253, 0.22) !important;
  box-shadow: 0 0 16px rgba(13, 110, 253, 0.25);
  transform: translateY(-1px);
}

#cvrSuggestList .list-group-item.active {
  background: rgba(13, 110, 253, 0.3) !important;
  border-color: rgba(13, 110, 253, 0.45) !important;
  box-shadow: 0 0 18px rgba(13, 110, 253, 0.35);
}

#cvrSuggestList .mini-muted,
#cvrSuggestList .small {
  color: rgba(233, 243, 255, 0.75) !important;
}

#cvrSuggestSearchAnyway {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: #e9f3ff;
}

#cvrSuggestSearchAnyway:hover {
  background: rgba(13, 110, 253, 0.18);
  border-color: rgba(13, 110, 253, 0.35);
  box-shadow: 0 0 14px rgba(13, 110, 253, 0.22);
}

#cvr_number:focus {
  border-color: rgba(0, 191, 255, 0.35);
}

/* -----------------------
   Graph modal
   ----------------------- */
#graphModal .modal-body {
  height: calc(100vh - 64px);
  position: relative;
}

#cy {
  width: 100%;
  height: 100%;
  background: #111;
  display: block;
}

#graphLoading {
  z-index: 10;
  pointer-events: none;
}

/* -----------------------
   Responsive
   ----------------------- */
@media (max-width: 1200px) {
  .search-container {
    max-width: 100%;
  }
}

@media (max-width: 992px) {
  .page-grid {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 14px;
  }

  .search-container {
    width: 100%;
    max-width: 100%;
  }

  .risk-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .search-container {
    max-width: 92%;
    padding: 24px;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }
}

.tavle-help-text {
  margin-bottom: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  text-align: left;
}

/* Fix: fjern sort tom boks i profil/overview tabeller */
.tab-panel table,
.tab-panel tbody,
.tab-panel tr,
.tab-panel td {
  background: transparent !important;
}

.tab-panel tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tab-panel td {
  height: auto !important;
}

.tab-panel td:empty {
  /*display: none;*/
}

/* Fix sort blok i Overblik/Profil */
.tab-panel * {
  box-shadow: none;
}

.tab-panel table,
.tab-panel tbody,
.tab-panel tr,
.tab-panel td,
.tab-panel th {
  background-color: transparent !important;
  background: transparent !important;
}

.tab-panel tr::before,
.tab-panel tr::after,
.tab-panel td::before,
.tab-panel td::after {
  background: transparent !important;
  display: none !important;
}

.tab-panel {
  overflow: hidden;
}

.profile-kv-list {
  display: grid;
  gap: 1px;
  margin-top: 14px;
}

.profile-kv-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.profile-kv-label {
  color: rgba(255,255,255,0.85);
  font-weight: 800;
}

.profile-kv-value {
  color: rgba(255,255,255,0.92);
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 36px;
  margin-bottom: 18px;
}

.profile-summary-grid > div {
  background: transparent !important;
  color: rgba(255,255,255,0.92);
}

.profile-summary-grid b {
  color: #ffffff;
}

@media (max-width: 768px) {
  .profile-summary-grid {
    grid-template-columns: 1fr;
  }
}
.case-card::before,
.case-card::after,
.tab-panel::before,
.tab-panel::after,
.search-container::before,
.search-container::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
}

/* -----------------------
   Relations
   ----------------------- */
.relation-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 12px;
  right: 12px;
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(3, 12, 20, 0.96);
  border: 1px solid rgba(91, 192, 222, 0.35);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.55), 0 0 18px rgba(91,192,222,0.14);
  backdrop-filter: blur(8px);
}

.relation-suggestion-item {
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  color: #e9f3ff;
  font-size: 13px;
  line-height: 1.35;
}

.relation-suggestion-item:hover,
.relation-suggestion-item.active {
  background: rgba(91,192,222,0.14);
  color: #ffffff;
}

.relation-step {
  background: rgba(13,20,30,0.6) !important;
  border: 1px solid rgba(61,107,142,0.35) !important;
  border-radius: 10px !important;
  transition: border-color 0.2s;
}
.relation-step:hover {
  border-color: rgba(91,192,222,0.5) !important;
}

#relationGraph,
[id$="_relationGraph"],
[id$="_ownershipGraph"] {
  background: #080e16;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 12px;
}

/* ── Relation path visualizer ── */
.rg-scroll {
  overflow-x: auto;
  padding: 36px 28px;
}

.rg-path {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
}

.rg-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rg-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  font-family: system-ui, Arial, sans-serif;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.rg-node-lbl {
  font-size: 12px;
  font-weight: 600;
  color: #cce0f5;
  text-align: center;
  max-width: 110px;
  line-height: 1.35;
  font-family: system-ui, Arial, sans-serif;
}

.rg-node-type {
  font-size: 10px;
  font-weight: 500;
  color: #4a6a8a;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: system-ui, Arial, sans-serif;
}

.rg-company-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(10, 35, 22, 0.8);
  border: 1.5px solid rgba(52, 211, 153, 0.3);
  border-radius: 10px;
  min-width: 130px;
  max-width: 175px;
  text-align: center;
}

.rg-company-lbl {
  font-size: 12px;
  font-weight: 600;
  color: #90e8c8;
  line-height: 1.35;
  font-family: system-ui, Arial, sans-serif;
}

.rg-edge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  flex-shrink: 0;
  min-width: 90px;
}

.rg-edge-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: system-ui, Arial, sans-serif;
  border: 1px solid;
  border-radius: 4px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
}

.rg-edge-line {
  display: flex;
  align-items: center;
  width: 100%;
}

.rg-edge-track {
  height: 1.5px;
  flex: 1;
}

/* ── Ownership tree (branching, same node design as relation path) ── */
.own-tree {
  position: relative;
  padding: 48px 32px;
  overflow-x: auto;
}

.own-tree-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
  position: relative;
  z-index: 2;
  margin-bottom: 72px;
}

.own-tree-row:last-child {
  margin-bottom: 0;
}

.own-tree-lines {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.own-tree-chip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: #0d1117;
}

.own-node-cvr {
  display: none;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}

.own-tree.show-cvr .own-node-cvr {
  display: block;
}

/* ── Ejerskab: graf-viewport ── */
.own-zoom-viewport {
  width: 100%;
  min-width: 0;
  height: 640px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0d1117;
  position: relative;
  display: flex;
  justify-content: center;
  justify-content: safe center;
  align-items: center;
  align-items: safe center;
}

.own-zoom-spacer {
  position: relative;
}

.own-zoom-spacer .own-tree {
  position: absolute;
  top: 0;
  left: 0;
}

/* ── Værktøjslinje (Ejerskab + Netværk): vandret bar over grafen ── */
.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
}

.graph-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.graph-toolbar-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

.graph-toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,0.10);
}

.graph-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 6px 10px;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.graph-toolbar-btn:hover {
  background: rgba(91,192,222,0.10);
  border-color: #5bc0de;
  color: #fff;
}

.graph-toolbar-btn.active {
  color: #5bc0de;
  border-color: #5bc0de;
}

.graph-toolbar-btn i {
  font-size: 14px;
}

.graph-toolbar-iconbtn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: rgba(255,255,255,0.8);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.graph-toolbar-iconbtn:hover {
  border-color: #5bc0de;
  color: #5bc0de;
}

.graph-toolbar-range {
  width: 110px;
}

@media (max-width: 700px) {
  .graph-toolbar-sep {
    display: none;
  }
}

.own-explain-box {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  font-size: 13.5px;
  line-height: 1.55;
}

.own-explain-box:empty {
  display: none;
}

.own-explain-box p {
  margin: 0 0 8px;
}

.own-explain-box p:last-child {
  margin-bottom: 0;
}

/* Print kun ejerskabstræet, ikke resten af siden */
@media print {
  body.own-print-mode * {
    visibility: hidden;
  }
  body.own-print-mode .own-print-root,
  body.own-print-mode .own-print-root * {
    visibility: visible;
  }
  body.own-print-mode .own-print-root {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }
}

/* -----------------------
   CVR Mode Selector
   ----------------------- */
.cvr-mode-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 12px;
}

.cvr-mode-btn {
  background: transparent;
  border: 1px solid rgba(91,192,222,0.25);
  color: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.cvr-mode-btn:hover {
  border-color: rgba(91,192,222,0.6);
  color: #fff;
  background: rgba(91,192,222,0.08);
}

.cvr-mode-btn.active {
  background: rgba(91,192,222,0.15);
  border-color: #5bc0de;
  color: #5bc0de;
  font-weight: 600;
}

/* -----------------------
   Person Card
   ----------------------- */
.case-card-header {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px 12px 0 0;
}

[id$="_network"] {
  background: #080e16;
}

.badge.bg-purple {
  background-color: #7b2d8b !important;
  color: #f0d0ff;
}

/* -----------------------
   Trustpilot
   ----------------------- */
.tp-card {
  background: rgba(0, 182, 122, 0.06);
  border: 1px solid rgba(0, 182, 122, 0.25);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  max-width: 620px;
}

.tp-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 620px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.tp-review {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

/* -----------------------
   Company Comparison
   ----------------------- */

/* Suggest dropdown shared with existing relation-suggestions style */
.compare-suggest-box {
  position: absolute;
  z-index: 9999;
  background: #1a2535;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  top: calc(100% + 4px);
  left: 0;
}

.compare-suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.compare-suggest-item:last-child { border-bottom: none; }
.compare-suggest-item:hover,
.compare-suggest-item.active {
  background: rgba(53,184,255,0.12);
}
.compare-suggest-name { color: #e8eaf0; font-size: 13px; }
.compare-suggest-cvr  { color: rgba(255,255,255,0.45); font-size: 11px; font-family: monospace; }

.compare-person-link {
  cursor: pointer;
  color: #35b8ff;
  border-bottom: 1px dashed rgba(53,184,255,0.4);
  transition: color 0.15s, border-color 0.15s;
}
.compare-person-link:hover {
  color: #7dd3fc;
  border-bottom-color: rgba(125,211,252,0.7);
}

.compare-maps-btn {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.4);
  margin-left: 6px;
  vertical-align: middle;
  transition: color 0.15s;
}
.compare-maps-btn:hover { color: #4caf7d; }

/* Companies overview header */
.compare-companies-overview {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.compare-companies-overview-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.6rem;
}
.compare-companies-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compare-company-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  background: rgba(255,255,255,0.03);
}
.compare-company-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.compare-company-name { color: #e8eaf0; font-weight: 500; }
.compare-company-cvr  { font-size: 11px; font-family: monospace; }

/* Company badge (inside result rows) */
.compare-company-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  color: #000;
  font-weight: 600;
  margin: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  vertical-align: middle;
}
.compare-shared-all {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

/* Category cards */
.compare-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.compare-category-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  overflow: hidden;
}
.compare-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}
.compare-category-count {
  margin-left: auto;
  background: rgba(53,184,255,0.2);
  color: #35b8ff;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
}
.compare-category-body {
  padding: 4px 0;
}
.compare-result-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.compare-result-row:last-child { border-bottom: none; }
.compare-result-value {
  color: #e8eaf0;
  font-size: 13px;
  flex: 1 1 180px;
}
.compare-result-companies {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
}

/* No results message */
.compare-no-results {
  text-align: center;
  color: rgba(255,255,255,0.45);
  padding: 2rem;
  font-size: 14px;
  font-style: italic;
}
