﻿:root {
  --bg: #121725;
  --panel: #171c2c;
  --panel-soft: #202038;
  --panel-line: #343755;
  --button: #31365f;
  --button-hover: #414873;
  --text: #f5f7ff;
  --muted: #a9adc0;
  --green: #22c55e;
  --blue: #37a8e6;
  --gold: #d4bd43;
  --light-modal: #dce6ff;
  --light-input: #eff3ff;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 980px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 70% 40%, rgba(43, 54, 93, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(44, 21, 39, 0.2), rgba(14, 20, 35, 0.96)),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 70px;
  padding: 0 34px;
  border-top: 2px solid rgba(227, 197, 51, 0.6);
  border-bottom: 1px solid #252a43;
  background:
    linear-gradient(180deg, rgba(211, 188, 67, 0.26), transparent 55%),
    #252637;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
}

.brand {
  display: grid;
  line-height: 1.05;
  font-size: 15px;
  font-weight: 700;
}

.brand span {
  color: #00df75;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 500;
}

.main-nav {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.main-nav a {
  padding: 26px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text);
  border-bottom-color: #384075;
}

.session-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.session-menu a {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: #eef2ff;
  background: rgba(49, 54, 95, 0.72);
}

.session-menu a:hover {
  background: var(--button-hover);
}

.login-page {
  display: grid;
  place-items: center;
}

.login-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 32px;
}

.login-panel {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-top: 2px solid rgba(227, 197, 51, 0.8);
  border-radius: 8px;
  background: rgba(23, 28, 44, 0.88);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-brand img {
  width: 128px;
  height: auto;
}

.login-brand span {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 900;
}

.login-panel h1 {
  margin: 0 0 28px;
  color: #f8fafc;
  font-size: 22px;
  line-height: 1.25;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  height: 42px;
  border: 1px solid #39405f;
  border-radius: 6px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.86);
  padding: 0 12px;
}

.login-error {
  margin: 0;
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
}

.login-submit {
  width: 100%;
  height: 42px;
  margin-top: 4px;
}

.page-shell {
  padding: 34px 42px 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.9fr) auto;
  align-items: end;
  gap: 48px;
  min-height: 270px;
  padding-bottom: 26px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
}

.hero-grid.simple {
  grid-template-columns: minmax(380px, 1fr) auto;
  min-height: 370px;
}

h1 {
  margin: 0 0 18px;
  font-size: 23px;
  line-height: 1.2;
}

h2,
h3,
h4,
p {
  margin-top: 0;
}

.hero-grid p {
  color: rgba(255, 255, 255, 0.77);
}

.hero-note {
  color: var(--gold) !important;
  font-size: 30px;
  line-height: 1.1;
  max-width: 560px;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.metric-card {
  display: grid;
  align-content: space-between;
  width: 128px;
  height: 105px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px 7px 0 0;
  background: rgba(25, 29, 45, 0.85);
}

.metric-card.selected {
  color: #111827;
  background: #fff;
}

.metric-card span {
  text-transform: uppercase;
  font-size: 12px;
}

.metric-card strong {
  justify-self: center;
  font-size: 27px;
}

.action-row {
  display: flex;
  gap: 10px;
  align-self: center;
  white-space: nowrap;
}

.btn,
.select-btn,
.icon-btn,
.chip {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  background: var(--button);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  font-weight: 700;
}

.btn:hover,
.select-btn:hover,
.icon-btn:hover,
.chip:hover {
  background: var(--button-hover);
}

.btn.compact {
  min-height: 32px;
  padding: 0 14px;
}

.btn.ghost {
  padding: 0 16px;
}

.btn.dark {
  background: #242b49;
}

.btn.danger {
  background: var(--danger);
}

.btn.disabled {
  cursor: default;
  opacity: 0.45;
}

.panel {
  padding: 28px 18px 0;
  background: rgba(23, 28, 44, 0.72);
  border-bottom: 1px solid #252b44;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.icon-btn {
  width: 40px;
}

.search,
.select-btn {
  height: 34px;
  border: 1px solid transparent;
  color: var(--text);
  background: var(--button);
}

.search {
  width: 320px;
  padding: 0 14px;
}

.search::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.select-btn {
  min-width: 150px;
  padding: 0 16px;
  text-align: left;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  min-width: 88px;
  padding: 0 16px;
  border-radius: 18px;
}

.chip-row.long .chip {
  min-width: auto;
}

.muted {
  color: var(--muted);
}

.italic {
  font-style: italic;
}

.table-actions,
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 20px;
}

.table-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.table-wrap.wide {
  max-width: 100%;
}

.data-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.data-table th {
  color: rgba(255, 255, 255, 0.74);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.data-table th,
.data-table td {
  padding: 13px 18px;
  vertical-align: middle;
}

.data-table tbody tr {
  background: rgba(31, 34, 55, 0.95);
}

.data-table tbody tr:nth-child(odd) {
  background: rgba(39, 37, 61, 0.96);
}

.name-link,
.cnpj-link {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  font-weight: 700;
}

.name-link small,
td small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.cnpj-link {
  color: #eef2ff;
  text-decoration: underline;
  text-decoration-color: transparent;
}

.cnpj-link:hover {
  text-decoration-color: currentColor;
}

.badge,
.date-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: #3b426b;
  color: #e7ecff;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
}

.badge.success {
  background: rgba(34, 197, 94, 0.45);
  color: #c7f9d8;
}

.badge.info {
  background: rgba(14, 165, 233, 0.36);
  color: #bfeaff;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 13px;
  background: rgba(234, 179, 8, 0.22);
  color: #fde68a;
  font-weight: 900;
}

.ellipsis-cell {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-pill {
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-transform: none;
}

.notification-cnpj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}

.notification-cnpj-tag,
.empty-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 12px;
  background: rgba(59, 66, 107, 0.8);
  color: #dbe4ff;
  font-size: 11px;
  font-weight: 800;
}

.empty-tag {
  color: var(--muted);
}

.breadcrumb,
.rule-box {
  border: 1px solid #303653;
  background: rgba(18, 23, 37, 0.65);
}

.breadcrumb {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 10px 0;
}

.top-actions .ghost {
  margin-right: auto;
}

.detail-header {
  margin-bottom: 18px;
}

.detail-header p {
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-header dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 18px 42px;
  max-width: 1050px;
  margin: 18px 0;
}

.detail-header dt {
  color: #fff;
  font-weight: 800;
}

.detail-header dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.compact-metrics .metric-card {
  width: 110px;
  height: 96px;
}

.rule-box {
  padding: 12px 16px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.rule-box summary {
  cursor: pointer;
  font-weight: 700;
}

.page-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--button);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(5, 9, 18, 0.72);
}

.modal-overlay:target {
  display: flex;
}

.dark-modal {
  position: relative;
  width: min(96vw, 1800px);
  height: min(92vh, 880px);
  padding: 28px 34px;
  background: #171d2d;
  border: 1px solid #29304d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.close-modal {
  position: absolute;
  top: 22px;
  right: 28px;
  z-index: 2;
  font-size: 28px;
  line-height: 1;
}

.modal-title {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  height: calc(100% - 80px);
  padding-top: 20px;
}

.modal-tabs {
  display: grid;
  align-content: start;
  gap: 4px;
  color: #7486be;
}

.modal-tabs a {
  padding: 18px 24px;
  border-right: 4px solid transparent;
}

.modal-tabs a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-right-color: var(--green);
}

.modal-content-panel {
  overflow: auto;
  padding: 24px 0;
}

.modal-content-panel h3 {
  margin-bottom: 20px;
  font-size: 28px;
}

.modal-section-line {
  height: 1px;
  margin-bottom: 56px;
  background: rgba(255, 255, 255, 0.28);
}

.modal-general-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.relationship-tabs {
  display: flex;
  gap: 8px;
  margin: -38px 0 18px;
}

.relationship-tabs a {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(49, 54, 95, 0.38);
  font-size: 13px;
  font-weight: 800;
}

.relationship-tabs a.active,
.relationship-tabs a:hover {
  color: #eef2ff;
  border-color: rgba(255, 255, 255, 0.28);
  background: #34395f;
}

.relationship-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}

.modal-table {
  min-width: 820px;
}

.evidence-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.evidence-toolbar h3 {
  margin: 0 8px 0 0;
  font-size: 20px;
}

.evidence-counter {
  min-width: 60px;
  color: var(--muted);
  font-weight: 800;
}

.evidence-preview {
  display: grid;
  place-items: center;
  width: min(760px, 68vw);
  min-height: 430px;
  margin: 0 auto;
  background: #f8fafc;
  color: #111827;
  overflow: hidden;
}

.evidence-preview img {
  display: block;
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.evidence-empty {
  padding: 28px;
  color: #475569;
  text-align: center;
  font-weight: 800;
}

.browser-strip {
  height: 18px;
  color: #111827;
  text-align: center;
  font-size: 9px;
  line-height: 18px;
}

.phone-shot {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 395px;
  margin: 0 110px;
  padding: 35px 20px;
  color: #f8fafc;
  background: #222;
}

.phone-shot strong {
  color: #3ed3cb;
  font-size: 28px;
}

.phone-shot span {
  font-size: 24px;
  font-weight: 800;
}

.phone-shot button {
  border: 0;
  border-radius: 4px;
  padding: 8px 14px;
  color: #fff;
  background: #e11d48;
}

.qr-box {
  width: 92px;
  height: 92px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 18px 18px,
    linear-gradient(#111 10px, transparent 10px) 0 0 / 18px 18px,
    #fff;
  border: 8px solid #fff;
}

.evidence-preview footer {
  padding: 14px 24px;
  font-size: 12px;
}

.evidence-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.evidence-thumbs > button {
  flex: 0 0 auto;
  color: #cbd5e1;
  border: 0;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
}

.thumb-track {
  display: flex;
  gap: 14px;
  width: min(760px, 68vw);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 2px 10px;
  scroll-snap-type: x proximity;
}

.thumb {
  flex: 0 0 150px;
  display: grid;
  grid-template-rows: 74px 28px;
  align-items: stretch;
  width: 150px;
  height: 112px;
  border: 2px solid transparent;
  background: rgba(31, 34, 55, 0.78);
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  scroll-snap-align: start;
  text-overflow: ellipsis;
}

.thumb img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  background: #0f172a;
}

.thumb span {
  display: block;
  overflow: hidden;
  padding: 6px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb.active {
  border-color: #e2e8f0;
}

.light-modal {
  position: relative;
  width: min(1120px, 84vw);
  max-height: 89vh;
  display: flex;
  flex-direction: column;
  color: #3b4258;
  background: var(--light-modal);
  border: 1px solid #96a5c7;
  border-radius: 5px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.light-modal header,
.light-modal footer {
  display: flex;
  align-items: center;
  padding: 18px 22px;
}

.light-modal header {
  border-bottom: 1px solid #95a3bf;
}

.light-modal header h2 {
  margin: 0;
  font-size: 18px;
}

.close-modal.light {
  color: #3b4258;
}

.form-body {
  overflow: auto;
  padding: 22px;
}

.form-body label,
.form-body fieldset {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 800;
}

.form-body input,
.form-body select {
  width: 100%;
  height: 38px;
  border: 1px solid #ccd5ea;
  color: #3b4258;
  background: var(--light-input);
  padding: 0 12px;
}

.form-body fieldset {
  border: 0;
  border-left: 1px solid #667392;
  padding: 0 0 0 22px;
}

.form-body legend {
  padding: 0;
}

.form-body .tag-select {
  height: 148px;
  padding: 8px;
}

.form-body .tag-select option {
  padding: 7px 8px;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 28px;
  padding: 0 8px 0 10px;
  border-radius: 14px;
  background: #313b6d;
  color: #eef2ff;
  font-size: 12px;
  font-weight: 800;
}

.selected-tag button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.hint {
  color: #6b7280;
  font-size: 13px;
}

.form-body hr {
  border: 0;
  border-top: 1px solid #7f8ba8;
  margin: 26px 0;
}

.date-grid {
  display: grid;
  grid-template-columns: 150px 150px;
  gap: 14px;
  margin-bottom: 24px;
}

.date-grid label {
  font-weight: 500;
}

.light-modal footer {
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #95a3bf;
}

@media (max-width: 1200px) {
  .hero-grid,
  .hero-grid.simple {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .action-row {
    justify-content: flex-start;
  }

  .detail-header dl {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

