:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d7dde5;
  --primary: #1f4f82;
  --primary-2: #173b61;
  --success: #0f766e;
  --danger: #b91c1c;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 10px;
  font-size: 42px;
  line-height: 1.1;
  color: #0f172a;
}

h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 22px;
  color: #111827;
}

.muted {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.company-card,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.company-card {
  min-width: 320px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

.company-card strong {
  color: #0f172a;
  font-size: 16px;
}

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

.card {
  padding: 24px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.full {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: var(--text);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #7aa2d6;
  box-shadow: 0 0 0 4px rgba(31, 79, 130, 0.10);
  background: #fff;
}

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

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

.checks label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
}

.checks input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.actions-bar {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
}

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

.btn.primary:hover {
  background: var(--primary-2);
}

.btn.secondary {
  background: #ffffff;
  color: #1f2937;
  border-color: #cfd8e3;
}

.btn.secondary:hover {
  background: #f9fafb;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.flash {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.flash.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

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

.link-card {
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}

.link-card a {
  color: var(--primary);
  word-break: break-all;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
  }

  .company-card {
    min-width: auto;
    width: 100%;
  }

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

  .actions-bar {
    flex-direction: column;
  }

  h1 {
    font-size: 32px;
  }
}
.status-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

.status-hero.success {
  border-color: #bfdbfe;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

.status-hero h2 {
  margin-bottom: 10px;
}

.status-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

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

.summary-item {
  border: 1px solid #e4eaf1;
  border-radius: 14px;
  background: #fbfdff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-item.full-row {
  grid-column: 1 / -1;
}

.summary-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.summary-value {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.signature-steps {
  display: grid;
  gap: 14px;
}

.signature-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #e4eaf1;
  background: #ffffff;
}

.step-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-content strong {
  color: #0f172a;
  font-size: 15px;
}

.step-content span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.signature-step.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.signature-step.done .step-icon {
  background: #16a34a;
  color: #ffffff;
}

.signature-step.pending {
  border-color: #fde68a;
  background: #fffbeb;
}

.signature-step.pending .step-icon {
  background: #f59e0b;
  color: #ffffff;
}

.status-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

.link-list.improved {
  gap: 14px;
}

.link-card.improved {
  padding: 16px;
  border-radius: 14px;
}

.link-card-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.link-card-top strong {
  color: #0f172a;
  font-size: 15px;
}

.link-card-top span {
  color: var(--muted);
  font-size: 14px;
}

.inline-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.result-actions {
  margin-top: 4px;
}

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

  .summary-item.full-row {
    grid-column: auto;
  }

  .status-hero {
    padding: 22px;
  }
}