.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-wrap {
  width: min(100%, 520px);
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.login-brand {
  padding: 0 0 24px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(16,185,129,0.12);
  color: #10b981;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 18px;
}

.login-card h1 {
  font-size: 42px;
  font-weight: 950;
  letter-spacing: -0.06em;
  margin-bottom: 8px;
}

.login-card p {
  color: var(--muted);
  font-weight: 650;
}

.tg-input .input-group-text,
.tg-input .form-control {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 16px;
  padding: 13px 14px;
}

.tg-input .input-group-text {
  border-right: 0;
}

.tg-input .form-control {
  border-left: 0;
}

.tg-input .form-control:focus,
.tg-form .form-control:focus {
  box-shadow: 0 0 0 4px rgba(79,70,229,0.16);
  border-color: rgba(79,70,229,0.45);
}

.login-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 20px;
  text-align: center;
}

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

.protected-topbar h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 950;
  letter-spacing: -0.06em;
  margin: 6px 0 0;
}

.empty-state {
  min-height: 290px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  gap: 10px;
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--line);
}

.empty-state i {
  font-size: 52px;
  color: var(--primary-2);
}

.empty-state h4 {
  font-weight: 950;
  margin: 0;
}

.empty-state p {
  color: var(--muted);
  margin: 0 0 8px;
}

.tg-table-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.tg-table {
  margin: 0;
  color: var(--text);
}

.tg-table th {
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tg-table td {
  color: var(--text);
  border-color: var(--line);
  font-weight: 650;
}

.tg-table code {
  color: var(--primary-2);
}

.status-chip {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(16,185,129,0.13);
  color: #10b981;
  font-weight: 900;
  font-size: 12px;
}

.status-chip.big {
  padding: 10px 14px;
  font-size: 14px;
}

.tg-form .form-label {
  color: var(--muted);
  font-weight: 850;
  font-size: 13px;
}

.tg-form .form-control {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 16px;
  padding: 13px 14px;
}

.tg-form .form-control::placeholder {
  color: rgba(154,168,199,0.7);
}

.case-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  background:
    radial-gradient(circle at 90% 20%, rgba(34,211,238,0.18), transparent 35%),
    linear-gradient(135deg, rgba(79,70,229,0.18), rgba(6,182,212,0.08)),
    var(--panel);
}

.case-id {
  color: var(--primary-2);
  font-weight: 950;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.case-hero h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 950;
  letter-spacing: -0.06em;
  margin-bottom: 10px;
}

.case-hero p {
  color: var(--muted);
  max-width: 780px;
  margin: 0;
  font-weight: 650;
}

.case-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list div {
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.detail-list strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pipeline-card {
  text-decoration: none;
  color: var(--text);
  min-height: 185px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  transition: all 0.2s ease;
}

.pipeline-card:hover,
.pipeline-card.active {
  transform: translateY(-4px);
  border-color: rgba(79,70,229,0.35);
  background: rgba(79,70,229,0.12);
  color: var(--text);
}

.pipeline-card i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79,70,229,0.18), rgba(6,182,212,0.16));
  color: var(--primary-2);
  font-size: 22px;
  margin-bottom: 13px;
}

.pipeline-card h4 {
  font-size: 16px;
  font-weight: 950;
  margin-bottom: 8px;
}

.pipeline-card p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.upload-placeholder {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  gap: 12px;
  border-radius: 28px;
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.04);
}

.upload-placeholder > i {
  font-size: 72px;
  color: var(--primary-2);
}

.upload-placeholder h4 {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.04em;
  margin: 0;
}

.upload-placeholder p {
  color: var(--muted);
  font-weight: 700;
}

.upload-rules {
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--muted);
  font-weight: 750;
  margin-top: 10px;
}

.upload-rules i {
  color: #10b981;
  margin-right: 7px;
}

@media (max-width: 1100px) {
  .protected-topbar,
  .case-hero,
  .case-actions {
    flex-direction: column;
  }

  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pipeline-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 24px;
  }
}

.upload-security-box {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(16,185,129,0.22);
  background: rgba(16,185,129,0.10);
}

.upload-security-box div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-weight: 700;
}

.upload-security-box i {
  color: #10b981;
  font-size: 24px;
}

.upload-security-box strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.upload-security-box span {
  display: block;
}

.hash-code {
  display: inline-block;
  word-break: break-all;
  white-space: normal;
  color: #0f766e;
}

html[data-theme="dark"] .hash-code {
  color: #67e8f9;
}

.hash-short {
  color: var(--primary-2);
}

.small-empty {
  min-height: 220px;
}

.evidence-form select.form-control {
  appearance: auto;
}


/* ===== TraceGrid table dark/light theme hardening ===== */
.tg-table {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--text) !important;
  --bs-table-border-color: var(--line) !important;
  background: transparent !important;
}

.tg-table > :not(caption) > * > * {
  background-color: rgba(255,255,255,0.035) !important;
  color: var(--text) !important;
  border-bottom-color: var(--line) !important;
}

html[data-theme="light"] .tg-table > :not(caption) > * > * {
  background-color: rgba(255,255,255,0.88) !important;
  color: var(--text) !important;
}

.tg-table thead th {
  background-color: rgba(15,23,42,0.35) !important;
  color: var(--muted) !important;
}

html[data-theme="light"] .tg-table thead th {
  background-color: rgba(241,245,249,0.95) !important;
}

.tg-table tbody tr:hover td {
  background-color: rgba(79,70,229,0.12) !important;
}

.tg-table td,
.tg-table th {
  vertical-align: middle;
}

.tg-table td code,
.tg-table .hash-short {
  color: var(--primary-2) !important;
  font-weight: 900;
}

/* Better file input visibility */
.tg-form input[type="file"].form-control {
  padding: 8px;
}

.tg-form input[type="file"].form-control::file-selector-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-right: 12px;
  font-weight: 850;
  color: #111827;
  background: #ffffff;
}

/* Prevent important buttons from wrapping awkwardly */
.btn-primary-gradient,
.btn-soft,
.btn-light-strong {
  white-space: nowrap;
}

.panel-head .btn,
.case-actions .btn {
  min-width: fit-content;
}


/* ===== FINAL Bootstrap table override for TraceGrid dark evidence tables ===== */
.table.tg-table,
.table.tg-table thead,
.table.tg-table tbody,
.table.tg-table tr,
.table.tg-table th,
.table.tg-table td {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--text) !important;
  --bs-table-striped-bg: transparent !important;
  --bs-table-striped-color: var(--text) !important;
  --bs-table-active-bg: transparent !important;
  --bs-table-active-color: var(--text) !important;
  --bs-table-hover-bg: rgba(79,70,229,0.12) !important;
  --bs-table-hover-color: var(--text) !important;
  --bs-table-accent-bg: transparent !important;
  background-color: transparent !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

.table.tg-table thead tr th {
  background: rgba(15,23,42,0.72) !important;
  color: var(--muted) !important;
  border-bottom: 1px solid var(--line) !important;
}

.table.tg-table tbody tr {
  background: rgba(255,255,255,0.035) !important;
}

.table.tg-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.055) !important;
}

.table.tg-table tbody tr:hover {
  background: rgba(79,70,229,0.16) !important;
}

.table.tg-table tbody tr td {
  background: transparent !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--line) !important;
}

html[data-theme="dark"] .table.tg-table tbody tr td {
  color: #e8eefc !important;
}

html[data-theme="dark"] .table.tg-table tbody tr td:nth-child(1),
html[data-theme="dark"] .table.tg-table tbody tr td:nth-child(5) {
  color: #22d3ee !important;
}

html[data-theme="dark"] .table.tg-table tbody tr td:nth-child(3),
html[data-theme="dark"] .table.tg-table tbody tr td:nth-child(4),
html[data-theme="dark"] .table.tg-table tbody tr td:nth-child(6) {
  color: #dbeafe !important;
}

html[data-theme="light"] .table.tg-table tbody tr {
  background: rgba(255,255,255,0.88) !important;
}

html[data-theme="light"] .table.tg-table tbody tr:nth-child(even) {
  background: rgba(241,245,249,0.95) !important;
}


/* ===== Column Mapper UI ===== */
.mapper-preview-wrap {
  max-height: 430px;
  overflow: auto;
}

.mapper-preview-table {
  min-width: 980px;
}

.mapper-preview-table th {
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.mapper-preview-table td {
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mapping-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.mapping-meta span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(34,211,238,0.12);
  color: var(--primary-2);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.mapping-meta strong {
  display: block;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.35;
  margin-bottom: 5px;
}

.mapping-meta code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

html[data-theme="light"] .mapping-card {
  background: rgba(255,255,255,0.85);
}

@media (max-width: 960px) {
  .mapping-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Import Engine UI ===== */
.import-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.break-hash {
  word-break: break-all;
  color: var(--primary-2);
}

.form-check-label {
  color: var(--muted);
  font-weight: 800;
}

.form-check-input {
  background-color: rgba(255,255,255,0.08);
  border-color: var(--line);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 960px) {
  .import-detail-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== CDR Analytics Dashboard ===== */
.mini-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
}

.mini-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.analytics-bars {
  display: grid;
  gap: 16px;
}

.analytics-bar-row {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.bar-label strong {
  font-size: 15px;
  font-weight: 950;
}

.bar-label span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.analysis-file-list {
  display: grid;
  gap: 12px;
}

.analysis-file-list div {
  padding: 13px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.analysis-file-list strong {
  display: block;
  color: var(--primary-2);
  font-weight: 950;
  margin-bottom: 4px;
}

.analysis-file-list span {
  display: block;
  color: var(--muted);
  font-weight: 750;
  font-size: 13px;
}

.timeline-bars {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 130px minmax(150px, 1fr) 100px 110px;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.timeline-date {
  font-weight: 950;
  color: var(--text);
}

.timeline-count,
.timeline-duration {
  color: var(--muted);
  font-weight: 850;
  font-size: 13px;
}

@media (max-width: 860px) {
  .timeline-row {
    grid-template-columns: 1fr;
  }

  .bar-label {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ===== Target Profiler UI ===== */
.status-chip {
  white-space: nowrap;
}

.detail-list strong code,
.detail-list code {
  color: var(--primary-2);
}

.target-highlight {
  color: var(--primary-2);
  font-weight: 950;
}

.profile-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.22);
  color: var(--muted);
  font-weight: 750;
}

.profile-note strong {
  color: var(--text);
}


/* ===== Global layout overflow hardening ===== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.tg-shell {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.tg-main {
  width: calc(100vw - 292px);
  max-width: calc(100vw - 292px);
  min-width: 0;
  overflow-x: hidden;
}

.panel,
.metric-card,
.case-hero,
.row,
[class*="col-"] {
  min-width: 0;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.tg-table-wrap,
.mapper-preview-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.mapper-preview-table {
  width: max-content;
  min-width: 100%;
}

.tg-table th,
.tg-table td {
  overflow-wrap: anywhere;
}

.tg-table td code,
.tg-table th code {
  white-space: normal;
}

.case-hero {
  width: 100%;
  max-width: 100%;
}

.case-hero h2 {
  overflow-wrap: anywhere;
}

.top-actions {
  flex-shrink: 0;
}

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

@media (max-width: 860px) {
  .tg-main {
    width: 100%;
    max-width: 100%;
  }

  .tg-sidebar {
    position: relative;
  }
}


/* ===== Link Analysis UI ===== */
.link-hero h2 {
  font-size: clamp(28px, 3.2vw, 46px);
}

.link-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.link-summary-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  border-radius: 22px;
  padding: 18px;
  display: grid;
  gap: 9px;
}

.link-summary-card i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(34,211,238,0.12);
  color: var(--primary-2);
  font-size: 22px;
}

.link-summary-card strong {
  font-size: 15px;
  font-weight: 950;
}

.link-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.link-summary-card.positive {
  border-color: rgba(16,185,129,0.28);
  background: rgba(16,185,129,0.09);
}

.link-summary-card.warning {
  border-color: rgba(245,158,11,0.28);
  background: rgba(245,158,11,0.09);
}

.link-summary-card.positive i {
  background: rgba(16,185,129,0.14);
  color: #10b981;
}

.link-summary-card.warning i {
  background: rgba(245,158,11,0.16);
  color: #f59e0b;
}

@media (max-width: 1300px) {
  .link-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .link-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== Report Builder Foundation ===== */
.report-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}

.report-page {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 34px;
  color: var(--text);
}

.report-cover {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(79,70,229,0.18), rgba(34,211,238,0.10));
  border: 1px solid var(--line);
  margin-bottom: 28px;
}

.report-kicker {
  color: var(--primary-2);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  margin-bottom: 8px;
}

.report-cover h1 {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 950;
  letter-spacing: -0.06em;
  margin: 0 0 10px;
}

.report-cover p {
  color: var(--muted);
  font-weight: 700;
  max-width: 780px;
  margin: 0;
}

.report-meta-card {
  min-width: 260px;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  display: grid;
  gap: 5px;
  align-content: start;
}

.report-meta-card strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-meta-card span {
  font-weight: 850;
  margin-bottom: 7px;
}

.report-section {
  margin-top: 28px;
  padding-top: 8px;
}

.report-section h2 {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  color: var(--text);
}

.report-section h3 {
  font-size: 19px;
  font-weight: 950;
  margin: 22px 0 10px;
  color: var(--text);
}

.report-note {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 14px;
}

.report-empty {
  border: 1px dashed var(--line);
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
}

.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  vertical-align: top;
  color: var(--text);
}

.report-table tr:last-child th,
.report-table tr:last-child td {
  border-bottom: 0;
}

.report-table th {
  width: 28%;
  background: rgba(255,255,255,0.045);
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
}

.report-table thead th {
  width: auto;
}

.report-table.compact th,
.report-table.compact td {
  padding: 10px 11px;
  font-size: 13px;
}

.break-cell {
  word-break: break-all;
}

.report-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 20px;
}

.report-metric-grid div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: rgba(255,255,255,0.04);
}

.report-metric-grid strong {
  display: block;
  font-size: 21px;
  font-weight: 950;
  color: var(--primary-2);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.report-metric-grid span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.report-finding-box {
  border: 1px solid rgba(16,185,129,0.25);
  background: rgba(16,185,129,0.10);
  border-radius: 20px;
  padding: 18px;
  margin: 16px 0;
}

.report-finding-box h3 {
  margin-top: 0;
}

.report-finding-box p {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 750;
}

.report-list {
  color: var(--text);
  font-weight: 700;
  line-height: 1.7;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.signature-grid div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  min-height: 92px;
}

.signature-grid strong,
.signature-grid span {
  display: block;
}

.signature-grid strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

@media (max-width: 1100px) {
  .report-cover {
    flex-direction: column;
  }

  .report-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111827 !important;
    overflow: visible !important;
  }

  .no-print,
  .tg-sidebar,
  .protected-topbar,
  .tg-footer,
  .report-toolbar {
    display: none !important;
  }

  .tg-shell {
    display: block !important;
  }

  .tg-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .report-page {
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
  }

  .report-cover {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    page-break-inside: avoid;
  }

  .report-cover h1,
  .report-section h2,
  .report-section h3,
  .report-table th,
  .report-table td,
  .report-list,
  .report-note,
  .report-finding-box p {
    color: #111827 !important;
  }

  .report-kicker,
  .report-metric-grid strong {
    color: #075985 !important;
  }

  .report-note,
  .report-cover p,
  .report-meta-card strong,
  .report-metric-grid span {
    color: #4b5563 !important;
  }

  .report-table,
  .report-table th,
  .report-table td,
  .report-meta-card,
  .report-metric-grid div,
  .signature-grid div,
  .report-finding-box {
    border-color: #d1d5db !important;
  }

  .report-table th,
  .report-metric-grid div,
  .report-meta-card {
    background: #f9fafb !important;
  }

  .report-section {
    page-break-inside: auto;
  }

  .report-table,
  .report-metric-grid,
  .signature-grid,
  .report-finding-box {
    page-break-inside: avoid;
  }

  a {
    color: #111827 !important;
    text-decoration: none !important;
  }
}

