:root {
  --green: #14532d;
  --green-2: #166534;
  --bg: #f6faf6;
  --card: #ffffff;
  --line: #d9e3d9;
  --muted: #5b6b5b;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: #14201a;
  -webkit-font-smoothing: antialiased;
}
.r-header {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 18px; background: var(--green); color: #fff;
}
.r-brand { font-weight: 700; }
.r-city { opacity: .85; font-size: .9rem; }
.r-main { max-width: 480px; margin: 0 auto; padding: 18px; }
.r-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; margin-bottom: 16px;
}
h1, h2 { margin: 0 0 12px; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 12px 0 4px; }
input {
  width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; background: #fff;
}
input:focus { outline: 2px solid var(--green-2); border-color: var(--green-2); }
button {
  width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: var(--green); color: #fff; font-size: 1rem; font-weight: 600;
  cursor: pointer; margin-top: 16px;
}
button:disabled { opacity: .5; cursor: default; }
button.secondary { background: #fff; color: var(--green); border: 1px solid var(--green); }
.r-estimate {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px; background: #eef6ee; border-radius: 10px; margin-top: 16px;
}
.r-fare { font-size: 1.5rem; font-weight: 700; color: var(--green); }
.r-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.r-error { color: var(--danger); font-size: .9rem; margin-top: 10px; }
.r-status-badge {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: #eef6ee; color: var(--green); font-weight: 600; font-size: .9rem;
}
.r-searching { text-align: center; padding: 20px 0; }
.r-spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 4px solid var(--line); border-top-color: var(--green);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#driver-box:empty { display: none; }
.r-driver { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.r-driver-code {
  font-family: ui-monospace, monospace; font-weight: 700; font-size: 1.1rem;
  background: #eef6ee; padding: 6px 10px; border-radius: 8px;
}
.r-row { display: flex; justify-content: space-between; margin: 6px 0; font-size: .95rem; }
.r-row span:first-child { color: var(--muted); }
.r-point-toggle { display: flex; gap: 10px; margin-top: 4px; }
.r-point-toggle button { margin-top: 0; }
.r-point-toggle button.active { background: var(--green); color: #fff; border-color: var(--green); }
#track-link { font-size: .8rem; margin-top: 4px; }
.r-support {
  display: block; text-align: center; margin-top: 14px; padding: 12px;
  border: 1px solid var(--green); border-radius: 12px; color: var(--green);
  text-decoration: none; font-weight: 600;
}
.r-stars { font-size: 2rem; letter-spacing: 6px; text-align: center; margin: 8px 0; }
.r-star { cursor: pointer; color: #eab308; }
textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 1rem; font-family: inherit; resize: vertical;
}

/* Cancelamento pelo passageiro (006C). Secundário de propósito: desistir é
   saída, não a ação principal da tela. */
.r-btn-secondary {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  min-height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  color: #b91c1c;
  font: inherit;
  cursor: pointer;
}

.r-btn-secondary:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Identidade do passageiro autenticado (006B). Discreto de propósito: é
   confirmação, não formulário. */
.r-identidade {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.95rem;
}

.r-identidade[hidden] { display: none; }

.r-link-inline {
  border: 0;
  background: none;
  padding: 0;
  color: #166534;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

#campos-identidade[hidden] { display: none; }
