@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --navy:      #1B4F72;
  --blue:      #2E86C1;
  --light-blue:#EAF4FB;
  --border:    #BFD9EC;
  --green:     #1E8449;
  --red:       #C0392B;
  --gray:      #666666;
  --bg:        #F0F6FC;
  --white:     #ffffff;
  --mono:      'IBM Plex Mono', monospace;
  --sans:      'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 0;
}

/* ── Top bar ──────────────────────────────────────────────────────────── */
.top-bar {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.badge {
  background: var(--navy);
  color: white;
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.top-title {
  font-size: 13px;
  color: var(--gray);
  font-weight: 400;
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card,
.instructions {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  padding: 36px 40px;
  box-shadow: 0 4px 24px rgba(27,79,114,0.07);
  margin-bottom: 20px;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 6px;
}
.subtitle {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── Portal link ──────────────────────────────────────────────────────── */
.portal-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--light-blue);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 11px 16px;
  text-decoration: none;
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 22px;
  transition: border-color 0.2s, background 0.2s;
}
.portal-link:hover { border-color: var(--blue); background: #daeef8; }
.portal-icon { font-size: 18px; }
.portal-arrow { margin-left: auto; font-size: 15px; color: var(--blue); }

/* ── Drop zone ────────────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: var(--light-blue);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.dropzone:hover,
.dropzone.drag-over { border-color: var(--blue); background: #daeef8; }
.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-icon  { font-size: 36px; margin-bottom: 10px; display: block; }
.drop-label { font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 4px; }
.drop-hint  { font-size: 12px; color: var(--gray); font-family: var(--mono); }

/* ── File loaded ──────────────────────────────────────────────────────── */
.file-loaded {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--light-blue);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}
.file-icon { font-size: 26px; }
.file-info { flex: 1; }
.file-name  { font-weight: 600; font-size: 14px; color: var(--navy); }
.file-size  { font-size: 11px; color: var(--gray); font-family: var(--mono); margin-top: 2px; }
.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: 18px;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}
.remove-btn:hover { color: var(--red); }

/* ── Config ───────────────────────────────────────────────────────────── */
.config {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.config-title {
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  margin-bottom: 16px;
}
.config-row  { display: flex; gap: 12px; flex-wrap: wrap; }
.config-item { flex: 1; min-width: 160px; }
.config-item label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 6px;
}
.config-item input,
.config-item select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--navy);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.config-item input:focus,
.config-item select:focus { border-color: var(--blue); }

/* ── Convert button ───────────────────────────────────────────────────── */
.btn-convert {
  margin-top: 28px;
  width: 100%;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 9px;
  padding: 14px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-convert:hover:not(:disabled) { background: #154360; }
.btn-convert:active:not(:disabled) { transform: scale(0.99); }
.btn-convert:disabled { background: #aac4d8; cursor: not-allowed; }

/* ── Progress ─────────────────────────────────────────────────────────── */
.progress-area { margin-top: 20px; display: none; }
.progress-label {
  font-size: 12px;
  color: var(--gray);
  font-family: var(--mono);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.progress-bar-bg {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--navy));
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ── Log console ──────────────────────────────────────────────────────── */
.log {
  margin-top: 14px;
  background: #0d1b2a;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: #7ecfff;
  max-height: 140px;
  overflow-y: auto;
  display: none;
  line-height: 1.7;
}
.log .ok  { color: #5ce65c; }
.log .err { color: #ff6b6b; }
.log .dim { color: #4a8fa8; }

/* ── Success card ─────────────────────────────────────────────────────── */
.success-card {
  margin-top: 20px;
  background: #eafaf1;
  border: 1.5px solid #a9dfbf;
  border-radius: 10px;
  padding: 20px 24px;
  display: none;
  align-items: center;
  gap: 16px;
}
.success-icon  { font-size: 32px; }
.success-info  { flex: 1; }
.success-title { font-weight: 600; font-size: 14px; color: var(--green); }
.success-meta  { font-size: 12px; color: var(--gray); font-family: var(--mono); margin-top: 3px; }
.btn-download {
  background: var(--green);
  color: white;
  border: none;
  border-radius: 7px;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-download:hover { background: #145a32; }

/* ── Instructions ─────────────────────────────────────────────────────── */
.instructions h2 {
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 16px;
}
.step { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; }
.step-num {
  width: 24px; height: 24px; min-width: 24px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  margin-top: 1px;
}
.step-text { font-size: 13px; color: var(--gray); line-height: 1.6; }
.step-text strong { color: var(--navy); }
.step-text a { color: var(--blue); font-weight: 500; }
.note {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef9e7;
  border-left: 3px solid #f0b429;
  border-radius: 4px;
  font-size: 12px;
  color: #7d6608;
  line-height: 1.6;
}

/* ── OrganizaPDF promo card ───────────────────────────────────────────── */
.promo-card {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 640px;
  background: linear-gradient(135deg, #1B4F72 0%, #154360 100%);
  border-radius: 12px;
  padding: 22px 28px;
  text-decoration: none;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 6px 28px rgba(27,79,114,0.22);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(27,79,114,0.3);
}
.promo-icon { font-size: 34px; flex-shrink: 0; }
.promo-body { flex: 1; }
.promo-eyebrow {
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 3px;
}
.promo-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.promo-desc  { font-size: 12px; opacity: 0.75; line-height: 1.5; }
.promo-cta {
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 7px;
  padding: 9px 16px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.promo-card:hover .promo-cta { background: rgba(255,255,255,0.25); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  width: 100%;
  max-width: 640px;
  border-top: 1.5px solid var(--border);
  padding: 24px 0 32px;
  text-align: center;
  margin-top: 4px;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.footer-brand a {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.footer-brand a:hover { text-decoration: underline; }
.footer-dot {
  width: 4px; height: 4px;
  background: var(--border);
  border-radius: 50%;
  display: inline-block;
}
.footer-tagline {
  font-size: 12px;
  color: var(--gray);
}
.footer-copy {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  line-height: 1.7;
}
.footer-copy a {
  color: var(--blue);
  text-decoration: none;
}
.footer-copy a:hover { text-decoration: underline; }
