:root {
  --bg: #f2f6ff;
  --panel: #ffffff;
  --ink: #122033;
  --muted: #4d5d75;
  --line: #d2dced;
  --primary: #1a4fa3;
  --primary-soft: #e8f0ff;
  --ok: #0d7c45;
  --warn: #9a5b00;
  --danger: #a42a2a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #e7efff 0%, transparent 34%),
    radial-gradient(circle at 100% 0%, #f3ecff 0%, transparent 32%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.shell {
  max-width: 1020px;
  margin: 0 auto;
  padding: 20px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 9px 20px rgba(15, 30, 60, 0.06);
}

.brand {
  color: var(--primary);
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.92rem;
  background: #fafcff;
}

.nav a.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 20px;
  box-shadow: 0 10px 24px rgba(15, 30, 60, 0.06);
}

.panel {
  margin-top: 16px;
  border: 1px solid #d9e3f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 20px;
  box-shadow: 0 10px 22px rgba(15, 30, 60, 0.04);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 600;
}

h1 {
  margin: 10px 0;
  font-size: 1.65rem;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.6;
}

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

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: #2c3e59;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

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

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

.btn {
  border: 1px solid var(--primary);
  background: linear-gradient(135deg, #265eb8, #1f4289);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.notice {
  margin-top: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #b7c8e8;
  background: #edf3ff;
  color: #1f4a8f;
  font-size: 0.93rem;
}

.result {
  margin-top: 12px;
  border: 1px solid #b7d9c8;
  background: #edfbf2;
  color: #155f39;
  border-radius: 10px;
  padding: 12px;
}

.error {
  margin-top: 12px;
  border: 1px solid #f3b9b9;
  background: #fff3f3;
  color: #8f2b2b;
  border-radius: 10px;
  padding: 12px;
}

.status-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-recebido { background: #eef5ff; color: #2f4d81; border-color: #c6d8fa; }
.status-sem_correspondencia { background: #fff8eb; color: #7f5612; border-color: #f1d6a0; }
.status-triagem { background: #eaf4ff; color: #16508a; border-color: #b9d6f8; }
.status-complementar { background: #fff6e8; color: #9a5b00; border-color: #f4d8a8; }
.status-aprovado { background: #eafaf0; color: #0d7c45; border-color: #b9e4cb; }
.status-negado { background: #fff0f0; color: #a42a2a; border-color: #f3c3c3; }

.timeline {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.timeline li {
  border-left: 3px solid #d7e1ef;
  padding: 0 0 10px 10px;
  margin-left: 8px;
  color: #41556f;
}

small.meta {
  color: #6a7f9c;
}

.footer {
  margin-top: 10px;
  font-size: 0.86rem;
  color: #70839e;
}

.activation-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activation-card__message {
  margin: 10px 0 0;
  color: #233a5a;
}

.activation-card__reassurance {
  margin: 14px 0 0;
  color: #365074;
}

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

.activation-grid--highlights {
  margin-top: 18px;
}

.activation-row {
  border: 1px solid #d6e2f4;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fbff;
}

.activation-row span {
  display: block;
  font-size: 0.82rem;
  color: #577194;
  margin-bottom: 6px;
}

.activation-row strong {
  color: #172b47;
  font-size: 0.98rem;
}

.activation-highlight {
  border-radius: 16px;
  border: 1px solid #dce6f7;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 14px;
}

.activation-highlight span {
  display: block;
  font-size: 0.8rem;
  color: #5f7999;
  margin-bottom: 8px;
}

.activation-highlight strong {
  color: #183150;
  font-size: 1rem;
}

.activation-note {
  margin-top: 14px;
}

.activation-next-step {
  margin-top: 14px;
  border-radius: 12px;
  border: 1px solid #d9e2f2;
  background: #f7f9fd;
  padding: 12px 14px;
  color: #203754;
}

.activation-rule {
  margin-top: 14px;
}

.section-title {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a7293;
  font-weight: 700;
}

.activation-shell {
  display: grid;
  gap: 12px;
}

.integrity-checks,
.delivery-items,
.integrity-notices {
  margin-top: 16px;
}

.integrity-checks {
  display: grid;
  gap: 10px;
}

.integrity-check {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #dce5f4;
  background: #f9fbff;
}

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

.integrity-check__badge {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.integrity-check p,
.integrity-notice p,
.delivery-item p {
  margin-bottom: 0;
}

.integrity-check--ok {
  border-color: #cce8d8;
  background: #f2fbf5;
}

.integrity-check--attention {
  border-color: #f3ddb1;
  background: #fff9ee;
}

.integrity-check--critical {
  border-color: #f1caca;
  background: #fff5f5;
}

.integrity-check--info {
  border-color: #d6e2f4;
  background: #f8fbff;
}

.integrity-notice {
  display: grid;
  gap: 6px;
}

.integrity-notice--attention {
  border-color: #f1d6a0;
  background: #fff8eb;
  color: #7f5612;
}

.integrity-notice--critical {
  border-color: #f3c3c3;
  background: #fff0f0;
  color: #8a2a2a;
}

.integrity-notice--info {
  border-color: #b7c8e8;
  background: #edf3ff;
  color: #1f4a8f;
}

.delivery-item {
  margin-top: 10px;
  border: 1px solid #d9e3f2;
  border-radius: 14px;
  padding: 14px;
  background: #fbfdff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delivery-item__action {
  display: flex;
  justify-content: flex-end;
}

.activation-output {
  margin-top: 12px;
}

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

  .activation-card__header {
    flex-direction: column;
  }

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

  .delivery-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

