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

:root {
  --orange: #F5A800;
  --orange-dark: #D98F00;
  --white: #FFFFFF;
  --light: #FAFAFA;
  --border: #E5E5E5;
  --text: #333333;
  --text-light: #777777;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navbar ── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: -0.3px;
}

.navbar-company {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
}

/* ── Hero banner ── */
.hero {
  background: var(--orange);
  padding: 28px 32px;
}

.hero h1 {
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Main card ── */
.container {
  max-width: 680px;
  margin: 32px auto;
  padding: 0 16px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ── Form elements ── */
.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.form-row label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  min-width: 90px;
}

select {
  flex: 1;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

select:focus { border-color: var(--orange); }

/* ── File input ── */
.file-area {
  border: 2px dashed var(--border);
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 14px;
}

.file-area:hover, .file-area.drag-over { border-color: var(--orange); background: #FFF8E8; }

.file-area input[type="file"] {
  display: none;
}

.file-area-label {
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
}

.file-area-label span {
  color: var(--orange);
  font-weight: 600;
}

#fileName {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ── Validation ── */
#validation {
  font-size: 13px;
  font-weight: 500;
  min-height: 20px;
  margin-bottom: 14px;
}

/* ── Info box ── */
#headerInfo {
  background: var(--light);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 12px;
  margin-bottom: 14px;
  line-height: 1.6;
}

/* ── Buttons ── */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

button {
  padding: 9px 22px;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

#uploadBtn {
  background: var(--orange);
  color: var(--white);
}

#uploadBtn:hover:not(:disabled) { background: var(--orange-dark); }
#uploadBtn:disabled { opacity: 0.4; cursor: not-allowed; }

#pdfBtn {
  background: var(--white);
  color: var(--orange);
  border: 2px solid var(--orange);
}

#pdfBtn:hover:not(:disabled) { background: #FFF8E8; }
#pdfBtn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Result ── */
#result {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 12px;
  font-size: 12px;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 16px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

#result.visible { display: block; }
