:root {
  --navy: #143c5a;
  --primary: #0047BB;
  --light-blue: #eaf6fc;
  --sky: #d8effa;
  --orange: #f58220;
  --orange-light: #fff2e6;
  --green: #00AB52;
  --green-dark: #08763d;
  --red: #b73434;
  --ink: #1f2f3d;
  --muted: #6b7c8f;
  --line: #dbe7ef;
  --bg: #f7fbfd;
  --white: #ffffff;
  --shadow: 0 14px 36px rgba(20, 60, 90, 0.09);
  --radius: 18px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.45rem, 2.7vw, 2.25rem);max-width: 820px; margin-bottom: 0; color: var(--navy); font-weight: 700; line-height: 1.4em; }
h2 { font-size: clamp(1.45rem, 2.7vw, 1.8rem);max-width: 820px; line-height: 1.4em; letter-spacing: -0.045em;  color: var(--navy); margin-bottom: .85rem; }
h3 { font-size: 1.15rem; margin-bottom: 0; color: var(--navy); }
.eyebrow { text-transform: uppercase; letter-spacing: .11em; font-weight: 800; color: var(--primary); font-size: .72rem; margin-bottom: .3rem; }

.card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem !important;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr);
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
}
.compact-hero { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.hero-copy p { color: var(--muted); font-size: 1rem; max-width: 790px; margin-bottom: 1rem; }
.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--navy); background: var(--orange-light);
  border: 1px solid #ffd7b3; border-radius: 999px;
  padding: .38rem .75rem; font-weight: 800; margin-bottom: .75rem; font-size: .88rem;
}
.cta-row, .action-group { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
button, a { font: inherit; }
.primary-btn, .secondary-btn, .download-btn, .ghost-btn {
  border: 0; border-radius: 12px; padding: .78rem .95rem;
  font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.primary-btn, .secondary-btn { background: var(--primary); color: var(--white); box-shadow: 0 10px 24px rgba(0,71,187,.18); }
.download-btn { background: var(--green); color: var(--white); box-shadow: 0 10px 24px rgba(0,171,82,.18); }
.ghost-btn { background: var(--light-blue); color: var(--navy); border: 1px solid var(--line); }
.primary-btn:hover, .secondary-btn:hover, .download-btn:hover, .ghost-btn:hover { transform: translateY(-1px); }
.full { width: 100%; margin-top: 1rem; }
.security-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: .95rem;
  align-items: start;
  background: linear-gradient(180deg, #f7fffb, #eefbf4);
  border: 1px solid #bfe9d0;
  border-radius: 18px;
  padding: 1rem;
}
.shield-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: #e9fbf1;
  border-radius: 16px;
}
.shield-icon svg { width: 34px; height: 34px; }
.security-card h3 { margin-bottom: .15rem; color: var(--green-dark); }
.security-card strong { display: block; color: var(--navy); margin-bottom: .4rem; }
.security-card p { color: var(--muted); margin-bottom: .7rem; font-size: .95rem; }
.verified { display: inline-flex; color: var(--green-dark); background: #dcf8e8; border: 1px solid #b5ebca; border-radius: 999px; padding: .35rem .65rem; font-size: .82rem; font-weight: 900; }
.grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.two-col { grid-template-columns: 1.2fr .8fr; }
.section-head { margin-bottom: .85rem; }
.with-actions { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.dropzone {
  min-height: 142px; border: 2px dashed #b8d6e8; border-radius: 18px;
  display: grid; place-items: center; text-align: center; padding: 1rem; cursor: pointer;
  background: linear-gradient(180deg, #f9fdff, var(--light-blue));
}
.dropzone.dragover { border-color: var(--green); background: #f0fff6; }
.dropzone input { display: none; }
.upload-icon { font-size: 1.8rem; color: var(--primary); font-weight: 900; }
.dropzone small { color: var(--muted); display: block; max-width: 520px; }
textarea {
  width: 100%; min-height: 165px; margin-top: .85rem; resize: vertical;
  border: 1px solid var(--line); border-radius: 16px; padding: .9rem;
  background: #fbfdff; color: var(--ink);
  line-height: 1.45;
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: .85rem; }
label { font-weight: 800; color: var(--navy); font-size: .9rem; }
input, select {
  display: block; width: 100%; margin-top: .35rem; border: 1px solid var(--line);
  border-radius: 12px; padding: .72rem; background: var(--white); color: var(--ink);
}
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.check-list li { position: relative; padding-left: 1.8rem; color: var(--muted); }
.check-list li:before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: .85rem; }
.summary-grid div { background: var(--light-blue); border: 1px solid var(--line); border-radius: 16px; padding: .9rem; }
.summary-grid b { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.summary-grid span { display: block; color: var(--navy); font-size: 1.55rem; font-weight: 900; }
.messages { border-radius: 16px; border: 1px solid var(--line); padding: .9rem; background: #fbfdff; max-height: 260px; overflow: auto; }
.messages.empty { color: var(--muted); }
.msg { display: grid; grid-template-columns: 84px 1fr; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.msg:last-child { border-bottom: 0; }
.badge { align-self: start; text-align: center; border-radius: 999px; font-size: .72rem; font-weight: 900; padding: .28rem .45rem; }
.badge.error { color: #8d2323; background: #ffecec; }
.badge.warning { color: #8a4b00; background: #fff2d9; }
.badge.ok { color: #0d6b45; background: #e7f7ef; }
.output-card textarea { height: 100%; }

.upload-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.upload-actions .primary-btn,
.upload-actions .ghost-btn {
  min-width: 180px;
}
@media (max-width: 560px) {
  .upload-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .upload-actions .primary-btn,
  .upload-actions .ghost-btn {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .hero, .two-col, .form-row, .summary-grid { grid-template-columns: 1fr; }
  .topbar, .with-actions { flex-direction: column; align-items: stretch; }
}
.helper-note {
  background: var(--light-blue);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
  margin-top: .85rem;
  padding: .85rem;
}
label small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
  margin-top: .35rem;
}
.result-banner {
  border-radius: 16px;
  font-weight: 900;
  margin-bottom: .85rem;
  padding: .95rem 1rem;
}
.result-banner.empty { background: #fbfdff; border: 1px solid var(--line); color: var(--muted); }
.result-banner.success { background: #e8f8ef; border: 1px solid #b9edcf; color: var(--green-dark); }
.result-banner.failure { background: #fff5e8; border: 1px solid #ffd8a8; color: #8a4b00; }
.summary-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.summary-grid .wide-summary { grid-column: span 2; }
.summary-grid .wide-summary span { font-size: 1rem; line-height: 1.35; margin-top: .35rem; }
@media (max-width: 640px) { .summary-grid .wide-summary { grid-column: span 1; } }

.output-help { color: var(--muted); font-size: .9rem; margin: .25rem 0 0; max-width: 520px; }
.csv-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  margin-bottom: .85rem;
  padding: .75rem;
}
.csv-file-list.empty { font-size: .92rem; }
.csv-file-pill {
  align-items: center;
  background: var(--light-blue);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  display: inline-flex;
  font-size: .85rem;
  font-weight: 800;
  gap: .45rem;
  padding: .45rem .7rem;
}
.csv-file-pill button {
  background: var(--green);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 900;
  padding: .25rem .5rem;
}

.note-section {
  margin-top: 1rem;
}
.note-section h3 {
  margin: 0 0 .6rem;
  color: var(--navy);
  font-size: 1.1rem;
}
.note-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
