:root {
  --bg: #f5f6f3;
  --panel: #ffffff;
  --accent: #2f5d50;
  --accent-dark: #1f3c33;
  --charcoal: #2b2d2f;
  --muted: #6f7672;
  --danger: #b42318;
  --border: #e2e4dd;
  --shadow: 0 12px 30px rgba(26, 32, 30, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #f8f7f2, #edf0ea 55%, #e5e8e1);
  color: var(--charcoal);
}

a {
  color: var(--accent);
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(47, 93, 80, 0.12);
  color: var(--accent-dark);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  margin: 8px 0 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.notice {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff4e8;
  color: #884c1c;
  margin-bottom: 16px;
}

.notice.error {
  background: #fdecea;
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn.danger {
  background: var(--danger);
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

small {
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  font-size: 14px;
}

.list {
  display: grid;
  gap: 12px;
}

.signature-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  background: #f6f7f2;
  margin-bottom: 8px;
}

.signature-canvas {
  width: 100%;
  display: block;
}

.face-guide {
  width: 220px;
  height: 260px;
  border: 2px dashed rgba(47, 93, 80, 0.5);
  border-radius: 50% / 60%;
  margin: 12px auto;
}
/* ==================== CÂMERA E ASSINATURA ==================== */

/* ==================== CÂMERA E ASSINATURA ==================== */

#camera-video {
  display: block;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  background: #000;
  border: 3px solid var(--accent);
}

#camera-container {
  text-align: center;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(47, 93, 80, 0.05);
  border-radius: 8px;
}

#photo-preview {
  text-align: center;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(47, 93, 80, 0.05);
  border-radius: 8px;
}

#photo-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  border: 2px solid var(--accent);
}

.signature-wrap {
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
  touch-action: none;
  user-select: none;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 280px;
  cursor: crosshair;
  background: #fafafa;
  border-radius: 6px;
}

#access-camera {
  margin-bottom: 8px;
}

/* ==================== ETAPAS/STEPS ==================== */

.steps-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 24px 0;
  position: relative;
}

.steps-indicator::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border);
  color: var(--charcoal);
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 8px rgba(47, 93, 80, 0.1);
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step.active .step-label {
  color: var(--accent);
}

.step.completed .step-number {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

.step.completed .step-label {
  color: #4caf50;
}

.step.completed .step-number::after {
  content: '✓';
  font-weight: bold;
}

/* Conectar pontos com linha */
.steps-indicator::after {
  content: '';
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 50%, var(--border) 50%, var(--border) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Containers de etapas */
.step-container {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-container.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-container h3 {
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 18px;
}