:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d9dee7;
  --blue: #2557d6;
  --blue-dark: #1d43a8;
  --ok-bg: #dcfce7;
  --ok-text: #166534;
  --ko-bg: #fee2e2;
  --ko-text: #991b1b;
  --review-bg: #ffedd5;
  --review-text: #9a3412;
  --na-bg: #e5e7eb;
  --na-text: #374151;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.cover {
  width: 100%;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid #2a2108;
  border-radius: 8px;
  background: #211803;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.cover img {
  display: block;
  width: 100%;
  aspect-ratio: 30 / 7;
  object-fit: cover;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.hero p,
.section-title p {
  color: var(--muted);
}

.docs-link,
button {
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.docs-link {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: #e8eefc;
  color: var(--blue-dark);
  text-decoration: none;
}

.panel {
  margin-bottom: 22px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

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

.upload-box {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 22px;
  border: 1.5px dashed #aeb8c8;
  border-radius: 8px;
  background: #fbfcfe;
  cursor: pointer;
}

.upload-box:hover {
  border-color: var(--blue);
}

.upload-title {
  font-size: 18px;
  font-weight: 800;
}

.upload-hint {
  color: var(--muted);
  font-size: 14px;
}

.upload-box strong {
  align-self: end;
  overflow-wrap: anywhere;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

button {
  min-height: 44px;
  padding: 0 18px;
  background: var(--blue);
  color: white;
  font-size: 15px;
}

button:hover {
  background: var(--blue-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button.secondary {
  background: #eef2f7;
  color: var(--text);
}

.loading {
  color: var(--blue-dark);
  font-weight: 700;
}

.progress-panel {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #f8fbff;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  font-weight: 800;
}

.progress-head span {
  color: var(--blue-dark);
  white-space: nowrap;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe4f0;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2557d6, #16a34a);
  transition: width 320ms ease;
}

.progress-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.error-box {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: var(--ko-text);
  font-weight: 700;
}

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

.summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.number {
  text-align: right;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.status-ko {
  background: var(--ko-bg);
  color: var(--ko-text);
}

.status-revisar {
  background: var(--review-bg);
  color: var(--review-text);
}

.status-no_aplica {
  background: var(--na-bg);
  color: var(--na-text);
}

tr.row-ko {
  background: #fff7f7;
}

tr.row-revisar {
  background: #fffaf0;
}

.note-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.note {
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .cover img {
    aspect-ratio: 16 / 7;
  }

  .hero,
  .note-header {
    display: block;
  }

  .docs-link,
  .note-header button {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
  }

  .upload-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
