:root {
  --ink: #14102f;
  --muted: #66617f;
  --line: #e6e1ee;
  --panel: #ffffff;
  --panel-soft: #fbfaff;
  --purple-950: #080314;
  --purple-900: #14072d;
  --purple-800: #2e1065;
  --purple-700: #4c1d95;
  --purple-500: #7c3aed;
  --purple-300: #a78bfa;
  --green: #16a36d;
  --red: #dc3f50;
  --amber: #c78318;
  --shadow: 0 22px 70px rgba(20, 16, 47, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 3%, rgba(124, 58, 237, .14), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f8f6fc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  color: #f7f3ff;
  background:
    radial-gradient(circle at 60% 10%, rgba(124, 58, 237, .42), transparent 16rem),
    linear-gradient(180deg, #06020e 0%, #17062d 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: inherit;
  text-decoration: none;
  margin: 4px 14px 42px;
}

.brand-word {
  font-size: 32px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: .5px;
}

.brand-word.dark {
  color: var(--ink);
}

.brand-spark {
  color: var(--purple-500);
  font-size: 26px;
  line-height: 1;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: rgba(255, 255, 255, .82);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(124, 58, 237, .72), rgba(76, 29, 149, .72));
  border-color: rgba(167, 139, 250, .24);
}

.icon {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)),
    rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.icon::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}

.icon-home {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M3 10.7 12 3l9 7.7v9.8a.5.5 0 0 1-.5.5h-5.2v-6.1H8.7V21H3.5a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.icon-analysis {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 4.5A1.5 1.5 0 0 1 5.5 3h10.4L20 7.1v12.4a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 19.5zm3.2 5.1v1.8h9.6V9.6zm0 4v1.8h6.3v-1.8zm0 4v1.8h9.6v-1.8zM15 4.9V8h3.1z'/%3E%3C/svg%3E");
}

.icon-bids {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7.3 3h9.4A1.3 1.3 0 0 1 18 4.3v15.4a1.3 1.3 0 0 1-1.3 1.3H7.3A1.3 1.3 0 0 1 6 19.7V4.3A1.3 1.3 0 0 1 7.3 3m1.2 4.2V9h7V7.2zm0 4V13h7v-1.8zm0 4V17h4.8v-1.8zM4 6.4h1.2v11.2H4zm14.8 0H20v11.2h-1.2z'/%3E%3C/svg%3E");
}

.icon-approved {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.7 14.7 5l3.6-.1.8 3.5 2.5 2.6-1.6 3.2.1 3.6-3.5.8-2.6 2.5-3.2-1.6-3.6.1-.8-3.5-2.5-2.6 1.6-3.2-.1-3.6 3.5-.8zm-1.1 12.7 6-6-1.6-1.6-4.4 4.4-2.1-2.1-1.6 1.6z'/%3E%3C/svg%3E");
}

.icon-companies {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 21V6.3L12 3l8 3.3V21h-5v-4.6H9V21zm3.1-11.2h2.3V7.5H7.1zm0 4h2.3v-2.3H7.1zm7.5-4h2.3V7.5h-2.3zm0 4h2.3v-2.3h-2.3zm-3.7-4h2.2V7.5h-2.2zm0 4h2.2v-2.3h-2.2z'/%3E%3C/svg%3E");
}

.icon-report {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 3h10.5L19 6.5V21H5zm3 12.5V18h1.8v-2.5zm3.1-5.2V18h1.8v-7.7zm3.1 2.4V18H16v-5.3zM15 4.8V7h2.2z'/%3E%3C/svg%3E");
}

.nav-item:hover .icon,
.nav-item.active .icon {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, .12)),
    rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .34);
  box-shadow: 0 10px 24px rgba(8, 3, 20, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
  transform: translateX(1px);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 6px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
  font-size: 13px;
}

.sidebar-footer span {
  color: rgba(255, 255, 255, .62);
  margin-top: 2px;
}

.workspace {
  min-width: 0;
  padding: 26px 46px 54px;
}

.topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.topbar h1,
.topbar p,
h2,
h3,
p {
  margin: 0;
}

.topbar h1 {
  margin-top: 4px;
  font-size: 28px;
}

.eyebrow {
  color: var(--purple-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-flow-action {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: "Segoe UI Variable Text", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  background: #ffffff;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.top-flow-action:hover {
  transform: translateY(-1px);
}

.discard-flow-action {
  color: #9f2635;
  border-color: #f0d4d9;
  background: #fffafa;
}

.discard-flow-action:hover {
  border-color: #e8aeb7;
  background: #fff1f3;
}

.send-flow-action {
  color: #ffffff;
  border-color: #18122c;
  background: #18122c;
  box-shadow: 0 10px 24px rgba(20, 16, 47, .14);
}

.send-flow-action:hover {
  background: #261d43;
}

.icon-button,
.ghost-action,
.primary-action {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.icon-button {
  width: 42px;
  font-weight: 800;
}

.ghost-action {
  padding: 0 16px;
  font-weight: 700;
}

.primary-action {
  padding: 0 18px;
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(124, 58, 237, .24);
}

.nav-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-action.full {
  width: 100%;
  margin-top: 18px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-band {
  position: relative;
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
  gap: 28px;
  align-items: stretch;
  padding: 44px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background:
    radial-gradient(circle at 76% 22%, rgba(124, 58, 237, .48), transparent 18rem),
    linear-gradient(135deg, #05020d 0%, #10051e 48%, #220845 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  align-self: center;
  max-width: 650px;
}

.hero-copy h2 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: .98;
  max-width: 760px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 560px;
  color: rgba(255, 255, 255, .72);
  font-size: 18px;
  line-height: 1.6;
}

.hero-visual {
  position: relative;
  min-height: 260px;
}

.orbit {
  position: absolute;
  inset: 10% 5% 0 8%;
  border: 1px solid rgba(167, 139, 250, .38);
  border-left-color: transparent;
  border-bottom-color: rgba(124, 58, 237, .8);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.star-field {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .9) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(124, 58, 237, .95) 0 1px, transparent 1px);
  background-position: 0 0, 18px 28px;
  background-size: 42px 42px, 64px 64px;
  mask-image: radial-gradient(circle at center, black 0, transparent 70%);
}

.floating-report {
  position: absolute;
  right: 10%;
  bottom: 14%;
  width: min(280px, 80%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px);
}

.floating-report span,
.floating-report small {
  display: block;
  color: rgba(255, 255, 255, .68);
}

.floating-report strong {
  display: block;
  margin: 10px 0;
  font-size: 34px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

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

.metric-card,
.panel,
.report-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 16px 50px rgba(20, 16, 47, .06);
}

.metric-card {
  padding: 22px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
}

.positive {
  color: var(--green) !important;
}

.panel {
  padding: 24px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr .9fr;
  gap: 18px;
}

.upload-panel {
  display: grid;
  gap: 22px;
}

.upload-panel h3,
.panel h3,
.page-heading h2,
.approved-layout h2,
.company-layout h2 {
  margin-top: 6px;
}

.upload-panel p:not(.eyebrow),
.drop-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.upload-zone,
.drop-panel {
  width: 100%;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 170px;
  padding: 28px;
  border: 1px dashed var(--purple-300);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #fbf9ff);
  text-align: center;
}

.drop-panel.dragging {
  border-color: var(--purple-500);
  background: #f4efff;
}

button:disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
}

.upload-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--purple-500);
  background: rgba(124, 58, 237, .1);
  font-size: 30px;
  font-weight: 800;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.date-chip {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 8px;
  color: var(--purple-700);
  background: #f1ebff;
  font-size: 12px;
  font-weight: 800;
}

.timeline-item strong,
.timeline-item span,
.timeline-item small {
  display: block;
}

.timeline-item span,
.timeline-item small {
  color: var(--muted);
  font-size: 13px;
}

.value-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.value-pill {
  color: var(--purple-700);
  background: #f1ebff;
}

.status-pill.aprovada {
  color: #067346;
  background: #e8f8f0;
}

.status-pill.analise {
  color: #4c2bc8;
  background: #eee8ff;
}

.status-pill.rejeitada {
  color: #b12738;
  background: #fdecef;
}

.status-pill.inicial {
  color: #4c2bc8;
  background: #eee8ff;
}

.status-pill.em_aprovacao {
  color: #9a5b00;
  background: #fff3d8;
}

.status-pill.descartada,
.status-pill.nao_participar {
  color: #b12738;
  background: #fdecef;
}

.status-pill.participar {
  color: #067346;
  background: #e8f8f0;
}

.map-panel {
  overflow: hidden;
}

.brazil-map {
  position: relative;
  min-height: 286px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 60% 40%, rgba(124, 58, 237, .12), transparent 15rem),
    linear-gradient(135deg, #f6f3fb, #ffffff);
  clip-path: polygon(44% 2%, 66% 9%, 74% 20%, 91% 26%, 82% 43%, 86% 58%, 73% 63%, 69% 82%, 55% 73%, 45% 93%, 36% 75%, 25% 69%, 28% 53%, 14% 41%, 28% 28%, 31% 12%);
}

.pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--purple-500);
  box-shadow: 0 8px 20px rgba(76, 29, 149, .34);
}

.p1 { left: 46%; top: 28%; }
.p2 { left: 62%; top: 36%; }
.p3 { left: 52%; top: 52%; }
.p4 { left: 68%; top: 62%; }
.p5 { left: 42%; top: 70%; }
.p6 { left: 32%; top: 46%; }

.content-grid {
  display: grid;
  gap: 20px;
}

.analysis-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
}

.drop-panel {
  margin-top: 22px;
}

.extractor-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.pipeline-step span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f0edf6;
}

.pipeline-step.done span,
.pipeline-step.current span {
  color: #ffffff;
  background: var(--purple-500);
}

.extractor-list,
.result-grid,
.report-grid {
  display: grid;
  gap: 12px;
}

.extractor-item,
.result-item,
.report-cell {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.extractor-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
}

.extractor-item strong,
.result-item strong,
.report-cell strong {
  display: block;
  margin-bottom: 4px;
}

.extractor-item small,
.result-item span,
.report-cell span {
  color: var(--muted);
  line-height: 1.45;
}

.confidence {
  min-width: 74px;
  text-align: right;
  color: var(--purple-700);
  font-weight: 800;
}

.table-tools {
  display: flex;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.table-panel {
  padding-top: 18px;
}

.status-tabs,
.form-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-weight: 800;
}

.tab.active {
  color: var(--purple-700);
  border-color: var(--purple-300);
  background: #f4efff;
}

.tab span {
  margin-left: 5px;
}

.responsive-table {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  vertical-align: middle;
}

.clickable-row {
  cursor: pointer;
  transition: background 0.12s;
}

.clickable-row:hover {
  background: #f4efff;
}

.index-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.index-history-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.index-history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.delete-analysis-btn {
  width: 28px;
  height: 28px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.delete-analysis-btn:hover {
  color: #c0392b;
  border-color: #c0392b;
  background: #fff5f5;
}

.empty-state,
.empty-table {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.empty-state {
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.empty-table {
  padding: 28px 16px;
}

.confidence-bar {
  height: 7px;
  width: 96px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe7f4;
}

.confidence-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple-300), var(--purple-500));
}

.approved-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .65fr);
  gap: 20px;
}

/* ─── Approved cards ───────────────────────────────────────── */

.aprov-card {
  display: flex;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20,16,47,.04);
  margin-bottom: 14px;
  align-items: flex-start;
}

.aprov-date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 10px 14px;
  background: var(--purple-700, #3a1d8a);
  border-radius: 10px;
  color: #fff;
  flex-shrink: 0;
  gap: 1px;
}

.aprov-day {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
}

.aprov-month {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: .85;
}

.aprov-year {
  font-size: 10px;
  font-weight: 600;
  opacity: .65;
  margin-top: 2px;
}

.aprov-hour {
  font-size: 10px;
  font-weight: 700;
  opacity: .8;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,.25);
  padding-top: 4px;
  width: 100%;
  text-align: center;
}

.aprov-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aprov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.aprov-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.aprov-org {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.aprov-obs {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--purple-300, #c4b0f5);
  background: #f9f7ff;
  border-radius: 0 6px 6px 0;
}

/* Checklist */

.aprov-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.aprov-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 5px 11px 5px 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .13s ease, color .13s ease, background .13s ease;
  user-select: none;
}

.aprov-check-item input {
  width: 14px;
  height: 14px;
  accent-color: var(--green, #22c07a);
  cursor: pointer;
  flex-shrink: 0;
}

.aprov-check-item.checked {
  border-color: var(--green, #22c07a);
  color: #056040;
  background: #e6f8f0;
}

/* Result buttons */

.aprov-result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.aprov-result-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 4px;
}

.aprov-result-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #f6f5fb;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .13s ease, border-color .13s ease, color .13s ease, box-shadow .13s ease;
  color: var(--muted);
}

.aprov-btn-ganha:hover { background: #e6f8f0; border-color: #a8e0c4; color: #056040; }
.aprov-btn-ganha.active { background: var(--green, #22c07a); border-color: var(--green, #22c07a); color: #fff; box-shadow: 0 4px 12px rgba(34,192,122,.3); }

.aprov-btn-perdida:hover { background: #fdecef; border-color: #f5b8c2; color: #9f2635; }
.aprov-btn-perdida.active { background: var(--red, #d0384a); border-color: var(--red, #d0384a); color: #fff; box-shadow: 0 4px 12px rgba(208,56,74,.3); }

.aprov-btn-nodispute:hover { background: #f2f0f6; border-color: #ccc; color: var(--ink); }
.aprov-btn-nodispute.active { background: var(--muted, #7a7098); border-color: var(--muted, #7a7098); color: #fff; box-shadow: 0 4px 12px rgba(122,112,152,.25); }

.large-map .brazil-map {
  min-height: 590px;
}

.company-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

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

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.brand-panel {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
}

.company-logo {
  width: 100%;
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 1px dashed var(--purple-300);
  border-radius: 8px;
  text-align: center;
  background: #fbfaff;
}

.building-mark {
  color: var(--purple-500);
  font-size: 58px;
  line-height: 1;
}

.summary-list {
  width: 100%;
  display: grid;
  gap: 12px;
}

.summary-list span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.summary-list b {
  color: var(--ink);
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(480px, .9fr) minmax(360px, .75fr);
  gap: 22px;
  align-items: start;
}

.synthetic-report {
  max-width: 1120px;
  margin: 0 auto;
  padding: 38px;
  border-top: 10px solid var(--purple-700);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.report-brand-row,
.report-title-row,
.signature-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.report-brand-row {
  margin-bottom: 32px;
}

.report-company-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}

.report-co-logo-img {
  max-height: 64px;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.report-co-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-co-nome {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}

.report-co-cnpj {
  font-size: 0.75rem;
  color: var(--muted);
}

.report-brand-row p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.company-mark {
  display: grid;
  justify-items: end;
  color: var(--ink);
  text-align: right;
}

.company-mark span {
  color: var(--purple-500);
  font-size: 48px;
  line-height: 1;
}

.company-mark strong {
  font-size: 26px;
  line-height: 1;
  letter-spacing: .08em;
}

.company-mark small {
  margin-top: 12px;
  color: var(--ink);
  font-weight: 700;
}

.company-mark img {
  max-height: 60px;
  max-width: 180px;
  object-fit: contain;
  justify-self: end;
  margin-bottom: 8px;
}

.report-title-row {
  margin-bottom: 22px;
}

.report-title-row h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.editable-title,
.editable-subtitle,
.editable-object-title {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.editable-title {
  color: var(--purple-700);
  font-size: 22px;
  font-weight: 850;
}

.editable-object-title {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.45;
}

.title-source {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.editable-subtitle {
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
}

.report-meta-box {
  min-width: 250px;
  display: grid;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaff;
}

.report-meta-box > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.report-meta-box em {
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.report-section {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaff;
}

.workflow-actions h3 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.workflow-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.danger-action {
  color: #b12738;
  border-color: #f4bac2;
  background: #fff7f8;
}

.positive-action {
  color: #067346;
  border-color: #b8ead2;
  background: #f2fbf6;
}

.report-section h3 {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--purple-700);
  font-size: 15px;
  text-transform: uppercase;
}

.editable-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editable-card {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 92px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  white-space: pre-line;
}

.editable-card:hover {
  background: #fbf8ff;
}

.editable-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.editable-card strong {
  font-size: 14px;
  line-height: 1.45;
}

.editable-card em {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.wide-edit {
  min-height: auto;
  border-right: 0;
}

.report-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.recommendation-card strong {
  color: var(--green);
}

.report-director {
  border: 1px solid var(--purple-300);
  border-left: 5px solid var(--purple-500);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-soft) 100%);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.03);
}

.director-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-top: 14px;
}

.director-decision-side {
  flex: 1.1;
  min-width: 0;
}

.director-signature-side {
  flex: 0.9;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.signature-line,
.signature-date {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.signature-row {
  margin-top: 18px;
  color: var(--muted);
}

.edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 3, 20, .44);
  backdrop-filter: blur(8px);
}

.edit-overlay[hidden] {
  display: none;
}

.edit-modal {
  width: min(680px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.edit-modal textarea {
  min-height: 220px;
}

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

.report-page {
  padding: 34px;
  background: #ffffff;
}

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

.report-header small {
  color: var(--muted);
  text-align: right;
}

.report-page h2 {
  margin-bottom: 6px;
}

.report-page > p {
  color: var(--muted);
  margin-bottom: 24px;
}

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

.director-box {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.director-box p {
  color: var(--muted);
  margin: 8px 0 18px;
}

.decision-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.decision-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.decision-row button {
  min-width: 150px;
}

.decision-row input {
  width: auto;
  min-height: 0;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .sidebar {
    padding: 24px 12px;
  }

  .brand {
    margin-inline: auto;
  }

  .brand-word,
  .nav-item span:last-child,
  .sidebar-footer div {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding-inline: 10px;
  }

  .sidebar-footer {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dashboard-layout,
  .analysis-grid,
  .approved-layout,
  .company-layout,
  .report-two-col,
  .report-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .brand-word,
  .nav-item span:last-child,
  .sidebar-footer div {
    display: block;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-item {
    min-height: 58px;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    flex-direction: column;
    font-size: 12px;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 22px 16px 36px;
  }

  .topbar,
  .section-heading,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .table-tools,
  .workflow-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .primary-action,
  .top-flow-action {
    flex: 1;
  }

  .hero-band {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .synthetic-report {
    padding: 20px;
  }

  .report-brand-row,
  .report-title-row,
  .workflow-actions,
  .signature-row {
    flex-direction: column;
  }

  .report-meta-box {
    min-width: 0;
    width: 100%;
  }

  .metric-grid,
  .metric-grid.compact,
  .extractor-pipeline,
  .form-grid,
  .editable-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 48px 1fr;
  }

  .timeline-item .value-pill {
    grid-column: 2;
    justify-self: start;
  }

  .director-content {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .director-signature-side {
    padding: 14px;
  }
}

/* ─── Kanban ──────────────────────────────────────────────── */

.icon-kanban {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 3h4v14H4zm6 0h4v9h-4zm6 0h4v19h-4zM4 19h4v2H4zm6-9h4v2h-4z'/%3E%3C/svg%3E");
}

.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 28px;
  align-items: flex-start;
  min-height: calc(100vh - 190px);
}

.kanban-col {
  flex: 0 0 252px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.kanban-col-count {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 80px;
}

.kanban-col--inicial .kanban-col-header { color: var(--purple-700); background: #f1ebff; }
.kanban-col--inicial .kanban-col-count  { background: var(--purple-500); color: #fff; }

.kanban-col--em_aprovacao .kanban-col-header { color: #8a4e00; background: #fff3d6; }
.kanban-col--em_aprovacao .kanban-col-count  { background: #c78318; color: #fff; }

.kanban-col--participar .kanban-col-header { color: #056040; background: #e6f8f0; }
.kanban-col--participar .kanban-col-count  { background: var(--green); color: #fff; }

.kanban-col--nao_participar .kanban-col-header { color: #9f2635; background: #fdecef; }
.kanban-col--nao_participar .kanban-col-count  { background: var(--red); color: #fff; }

.kanban-col--descartada .kanban-col-header { color: var(--muted); background: #f2f0f6; }
.kanban-col--descartada .kanban-col-count  { background: var(--muted); color: #fff; }

.kanban-card {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 16, 47, .05);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 16, 47, .11);
  border-color: var(--purple-300);
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kanban-card-id {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.kanban-card-score {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: #f4f2f9;
  padding: 2px 7px;
  border-radius: 999px;
}

.kanban-card-org {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kanban-card-value {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--purple-700);
}

.kanban-card-date {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.kanban-empty {
  padding: 18px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ─── Kanban detail overlay ────────────────────────────────── */

.kanban-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 3, 20, .52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.kanban-detail-overlay[hidden] {
  display: none;
}

.kanban-detail-modal {
  width: min(880px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 32px 80px rgba(20, 16, 47, .22);
  overflow: hidden;
}

.kanban-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.kanban-detail-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

.kanban-detail-close:hover {
  background: #f8f6fc;
  border-color: var(--purple-300);
  color: var(--ink);
}

.kanban-detail-body {
  overflow-y: auto;
  padding: 28px 32px;
  flex: 1;
}

.kanban-detail-body .synthetic-report {
  max-width: none;
  border-top: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

.kanban-detail-body .editable-card {
  pointer-events: none;
  cursor: default;
}

/* ─── Kanban column divider ────────────────────────────────── */

.kanban-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
  flex-shrink: 0;
  margin: 0 4px;
  border-radius: 1px;
}

/* ─── Kanban drag-and-drop ─────────────────────────────────── */

.kanban-card.dragging {
  opacity: .4;
  transform: rotate(2deg) scale(.97);
  box-shadow: 0 16px 40px rgba(20, 16, 47, .2);
}

.kanban-col-body.drag-over {
  background: #f4f0ff;
  outline: 2px dashed var(--purple-400, #9b7ae0);
  outline-offset: -3px;
  border-radius: 8px;
  min-height: 72px;
}

/* ─── Kanban hide button (nao_participar red ×) ────────────── */

.kanban-card-hide {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red, #d0384a);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .12s ease, background .12s ease;
}

.kanban-card-hide:hover {
  background: #a8233a;
  transform: scale(1.18);
}

/* ─── Kanban detail header action buttons ──────────────────── */

.kanban-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 12px;
  flex-shrink: 0;
}

.kanban-action-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
  white-space: nowrap;
}

.kanban-action-participar {
  background: #e6f8f0;
  border-color: #a8e0c4;
  color: #056040;
}

.kanban-action-participar:hover,
.kanban-action-participar.active {
  background: var(--green, #22c07a);
  border-color: var(--green, #22c07a);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(34, 192, 122, .28);
}

.kanban-action-nao-participar {
  background: #fdecef;
  border-color: #f5b8c2;
  color: #9f2635;
}

.kanban-action-nao-participar:hover,
.kanban-action-nao-participar.active {
  background: var(--red, #d0384a);
  border-color: var(--red, #d0384a);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(208, 56, 74, .28);
}

/* ─── Kanban inline field editing ─────────────────────────── */

.kanban-edit-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 32px;
  background: #f4f0ff;
  border-bottom: 1px solid var(--purple-300, #c4b0f5);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--purple-700, #3a1d8a);
  flex-shrink: 0;
}

.kanban-edit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple-500, #7c4de8);
  flex-shrink: 0;
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.editable-card--input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-field-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  padding: 2px 0 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color .13s ease;
  box-sizing: border-box;
}

.kanban-field-input:focus {
  border-bottom-color: var(--purple-500, #7c4de8);
}

textarea.kanban-field-input {
  resize: vertical;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  min-height: 64px;
  line-height: 1.5;
}

textarea.kanban-field-input:focus {
  border-color: var(--purple-500, #7c4de8);
  box-shadow: 0 0 0 3px rgba(124, 77, 232, .1);
}

.kanban-field-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--purple-700, #3a1d8a);
}

/* ─── Kanban observations field ────────────────────────────── */

.kanban-obs-section {
  padding: 24px 32px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-obs-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin: 2px 0 0;
}

.kanban-obs-textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fafafa;
  resize: vertical;
  transition: border-color .14s ease, box-shadow .14s ease;
  box-sizing: border-box;
}

.kanban-obs-textarea:focus {
  outline: none;
  border-color: var(--purple-400, #9b7ae0);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(155, 122, 224, .14);
}

.kanban-obs-status {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  min-height: 16px;
}

/* ─── Upload hero (index) ──────────────────────────────────── */

.upload-hero {
  margin-bottom: 24px;
}

.upload-hero-zone {
  min-height: 220px;
  padding: 48px 40px;
  border: 2px dashed var(--purple-300, #c4b0f5);
  border-radius: 16px;
  background: linear-gradient(150deg, #faf8ff 0%, #f2edff 100%);
  gap: 14px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.upload-hero-zone:hover,
.upload-hero-zone.dragging {
  border-color: var(--purple-500, #7c4de8);
  background: linear-gradient(150deg, #f0e9ff 0%, #e8dfff 100%);
  box-shadow: 0 12px 40px rgba(124, 77, 232, .13);
}

.upload-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--purple-700, #3a1d8a);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.upload-hero-zone h2 {
  font-size: 21px;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}

.upload-hero-zone > p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.upload-hero-zone small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  opacity: .7;
}

/* ─── Analysis processing overlay ─────────────────────────── */

.analysis-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 3, 20, .75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.analysis-overlay[hidden] {
  display: none;
}

.analysis-overlay-card {
  width: min(460px, 100%);
  padding: 40px 44px;
  background: rgba(255, 255, 255, .97);
  border-radius: 20px;
  box-shadow: 0 48px 120px rgba(20, 16, 47, .35);
  border: 1px solid rgba(200, 185, 255, .5);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.analysis-overlay-logo {
  font-size: 18px;
  font-weight: 900;
}

.analysis-overlay-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--purple-500, #7c4de8);
  margin: 0;
}

.analysis-steps {
  display: flex;
  flex-direction: column;
  gap: 11px;
  max-height: 260px;
  overflow-y: auto;
}

.analysis-step {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .25s ease;
}

.analysis-step--active {
  color: var(--ink);
}

.step-icon {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.analysis-step--active .step-icon {
  border-color: var(--purple-500, #7c4de8);
  background: #f0eaff;
  color: var(--purple-500, #7c4de8);
  animation: step-pulse .9s ease-in-out infinite;
}

.analysis-step--done .step-icon {
  border-color: var(--green, #22c07a);
  background: #e6f8f0;
  color: var(--green, #22c07a);
  animation: none;
}

@keyframes step-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .7; }
}

.analysis-timer-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.analysis-timer {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  transition: color .3s ease;
}

.analysis-timer.timer--done {
  color: var(--green, #22c07a);
}

.analysis-timer-hint {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  html,
  body {
    width: 210mm;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
  }

  body.printing-report .sidebar,
  body.printing-report .topbar,
  body.printing-report .edit-overlay,
  body.printing-report .workflow-actions {
    display: none !important;
  }

  body.printing-report .app-shell,
  body.printing-report .workspace {
    display: block !important;
    min-height: 0;
    padding: 0 !important;
    background: #ffffff !important;
  }

  body.printing-report .synthetic-report {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 6px solid var(--purple-700) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
  }

  body.printing-report .report-brand-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 5mm !important;
  }

  body.printing-report .report-brand-row p {
    margin-top: 4px !important;
    font-size: 11px !important;
  }

  body.printing-report .company-mark span {
    font-size: 36px !important;
  }

  body.printing-report .company-mark strong {
    font-size: 20px !important;
  }

  body.printing-report .company-mark small {
    margin-top: 6px !important;
    font-size: 10px !important;
  }

  body.printing-report .report-title-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 4mm !important;
  }

  body.printing-report .editable-title {
    font-size: 23px !important;
    font-weight: 900 !important;
  }

  body.printing-report .editable-object-title {
    font-size: 14.5px !important;
    max-width: 124mm !important;
    margin-top: 4.5px !important;
    line-height: 1.4 !important;
  }

  body.printing-report .title-source {
    font-size: 9px !important;
    margin-top: 2px !important;
  }

  body.printing-report .editable-subtitle {
    font-size: 13px !important;
    margin-top: 4px !important;
    font-weight: 700 !important;
  }

  body.printing-report .report-meta-box {
    min-width: 0 !important;
    max-width: 42mm !important;
    width: auto !important;
    padding: 1.5mm 2.5mm !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }

  body.printing-report .report-meta-box span {
    font-size: 8.5px !important;
    gap: 6px !important;
  }

  body.printing-report .report-section {
    margin-top: 3.5mm !important;
    break-inside: avoid !important;
  }

  body.printing-report .report-section h3 {
    padding: 2mm 3.5mm !important;
    font-size: 12px !important;
  }

  body.printing-report .editable-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.printing-report .editable-card {
    min-height: 16mm !important;
    padding: 2.5mm 3.5mm !important;
    gap: 4px !important;
  }

  body.printing-report .editable-card small {
    font-size: 9px !important;
  }

  body.printing-report .editable-card strong {
    font-size: 11px !important;
  }

  body.printing-report .editable-card em {
    font-size: 9px !important;
  }

  body.printing-report .director-box {
    margin-top: 4mm !important;
    padding: 3.5mm 4.5mm !important;
    border-color: var(--purple-300) !important;
    background: #fbfaff !important;
    break-inside: avoid !important;
  }

  body.printing-report .director-box h3 {
    font-size: 12px !important;
  }

  body.printing-report .director-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px !important;
    margin-top: 2mm !important;
  }

  body.printing-report .director-decision-side p {
    font-size: 11px !important;
    margin: 4px 0 10px !important;
  }

  body.printing-report .decision-row {
    gap: 8px !important;
  }

  body.printing-report .decision-row label {
    padding: 6px 10px !important;
    font-size: 10px !important;
    gap: 6px !important;
  }

  body.printing-report .director-signature-side {
    padding: 3mm 4mm !important;
    gap: 8px !important;
    border-color: var(--line) !important;
    background: #ffffff !important;
  }

  body.printing-report .signature-line,
  body.printing-report .signature-date {
    font-size: 10.5px !important;
  }

  body.printing-report button {
    appearance: none;
  }
}
