/* Paleta e tipografia conforme Guia Simplificado da Logomarca Arc Mobilidade (V.01) */
:root {
  --arc-dark: #1a1a1a;
  --arc-dark-soft: #2c2c2c;
  --arc-red: #b61000;
  --arc-yellow: #f3b500;
  --arc-green: #038940;
  --arc-bg: #f5f5f4;
  --arc-border: #e1dfdd;
  --arc-text-muted: #6b6b6b;
}

* { box-sizing: border-box; }
body {
  font-family: Corbel, "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  margin: 0;
  background: var(--arc-bg);
  color: var(--arc-dark);
}

.topbar {
  background: var(--arc-dark);
  color: #fff;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(to right, var(--arc-red) 0 33%, var(--arc-yellow) 33% 66%, var(--arc-green) 66% 100%) 1;
}
.brand { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.brand-logo { height: 34px; }
.brand-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.25); }
.brand-title { font-size: 15px; font-weight: 600; letter-spacing: 0.2px; }

.topbar nav {
  display: flex;
  gap: 6px;
}
.topbar nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 5px 5px 0 0;
}
.topbar nav a:hover { background: rgba(255,255,255,0.08); }
.topbar nav a.active {
  color: var(--arc-dark);
  font-weight: 700;
  background: #fff;
}

.container {
  max-width: 900px;
  margin: 28px auto;
  padding: 0 16px 60px;
}
.card {
  background: #fff;
  border: 1px solid var(--arc-border);
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 16px; color: var(--arc-dark); }
.hint { color: var(--arc-text-muted); font-size: 13.5px; }
.hidden { display: none !important; }

/* --- Stepper (wizard) --- */
.stepper {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  counter-reset: none;
}
.stepper li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding-bottom: 10px;
  color: var(--arc-text-muted);
  cursor: default;
  font-size: 13.5px;
}
.stepper li:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--arc-border);
  margin: 0 8px;
}
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--arc-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.stepper li.active { color: var(--arc-dark); font-weight: 700; }
.stepper li.active .step-num { background: var(--arc-yellow); color: var(--arc-dark); }
.stepper li.done .step-num { background: var(--arc-green); }
.stepper li.done { color: var(--arc-dark); }

/* --- Wizard card --- */
.wizard-card {
  background: #fff;
  border: 1px solid var(--arc-border);
  border-radius: 6px;
  padding: 24px 28px;
}
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-step h2 { margin-top: 0; font-size: 17px; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--arc-border);
}
.btn-secondary {
  background: transparent;
  color: var(--arc-dark);
  border: 1px solid var(--arc-border);
}
.btn-secondary:hover:not(:disabled) { background: var(--arc-bg); }

/* --- Dropzone --- */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--arc-border);
  border-radius: 6px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--arc-text-muted);
  font-size: 14px;
  background: var(--arc-bg);
}
.dropzone.dragover { border-color: var(--arc-yellow); background: #fdf7e6; }
.dropzone input[type="file"] { display: none; }

.summary-box {
  margin-bottom: 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--arc-border);
  font-size: 13.5px;
}
.summary-row span { color: var(--arc-text-muted); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--arc-dark);
  cursor: pointer;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--arc-green); cursor: pointer; }

button {
  background: var(--arc-dark);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
button:disabled { background: #b7b5b3; cursor: not-allowed; }
button:hover:not(:disabled) { background: var(--arc-dark-soft); }

.error { color: var(--arc-red); font-size: 13.5px; margin-top: 8px; }
.success {
  color: #06552a;
  background: #e6f4ea;
  border-left: 4px solid var(--arc-green);
  padding: 10px 14px;
  border-radius: 4px;
  margin-top: 10px;
}

.cert-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: #faf7ee;
  border-left: 4px solid var(--arc-yellow);
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.6;
}

.pager {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 13.5px;
}
.pager button { padding: 6px 12px; font-size: 13px; }

.pdf-viewport {
  position: relative;
  display: inline-block;
  border: 1px solid var(--arc-border);
  max-width: 100%;
  overflow: auto;
}
#pdfCanvas { display: block; cursor: crosshair; max-width: 100%; }

.stamp-preview {
  position: absolute;
  min-width: 90px;
  min-height: 34px;
  border: 2px dashed var(--arc-red);
  background: rgba(243, 181, 0, 0.22);
  resize: both;
  overflow: hidden;
  box-sizing: border-box;
}
.stamp-preview-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--arc-green);
  padding: 4px 6px;
  white-space: nowrap;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 12px;
}
.history-table th, .history-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--arc-border);
}
.history-table th { color: var(--arc-text-muted); font-weight: 600; }
.history-table a { color: var(--arc-green); font-weight: 600; text-decoration: none; }
.history-table a:hover { text-decoration: underline; }

.app-footer {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  font-size: 12px;
  color: var(--arc-text-muted);
  border-top: 1px solid var(--arc-border);
}
