/* ============================================================
   Fretou — Design System (inspirado na linguagem visual da Uber)
   Preto/branco, tipografia bold, cards em bottom sheet, mapa full-bleed.
   ============================================================ */

:root {
  --black: #000000;
  --near-black: #0a0a0a;
  --white: #ffffff;
  --gray-50: #f6f6f6;
  --gray-100: #eeeeee;
  --gray-200: #e2e2e2;
  --gray-300: #cbcbcb;
  --gray-400: #9b9b9b;
  --gray-600: #545454;
  --gray-900: #1a1a1a;
  --brand-yellow: #ffc043;
  --green: #06c167;
  --red: #e11900;
  --amber: #cc7a00;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sheet: 0 -8px 30px rgba(0, 0, 0, 0.18);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
p { line-height: 1.4; }

/* ---------- Botões ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  height: 52px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover:not(:disabled) { opacity: 0.88; }

.btn-secondary { background: var(--white); color: var(--black); border: 1px solid var(--gray-300); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-50); }

.btn-danger { background: var(--white); color: var(--red); border: 1px solid var(--red); }
.btn-success { background: var(--green); color: var(--white); }

.btn-sm { height: 38px; font-size: 13px; padding: 0 14px; width: auto; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

/* ---------- App shell: mapa full-bleed + sheet inferior ---------- */
.app-shell {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--gray-100);
}

.map-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.top-floating {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.top-floating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.top-floating-row > * { pointer-events: auto; }

.brand-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  box-shadow: var(--shadow-card);
}
.brand-pill img { height: 30px; width: auto; border-radius: 6px; display: block; }
.brand-pill span { font-size: 13px; font-weight: 700; }

.nav-pills { display: flex; gap: 8px; }
.nav-pill {
  background: var(--white);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--black);
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
.nav-pill.active { background: var(--black); color: var(--white); }

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--gray-300);
  margin: 10px auto 4px;
}
.sheet-body {
  overflow-y: auto;
  padding: 4px 20px 20px;
}
.sheet-title { font-size: 20px; margin: 4px 0 14px; }
.sheet-step-label { font-size: 12px; color: var(--gray-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }

/* ---------- Campos de endereço estilo Uber ---------- */
.address-field {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.address-field .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.address-field .dot.pickup { background: var(--black); }
.address-field .dot.dropoff { width: 8px; height: 8px; background: var(--black); position: relative; }
.address-field .dot.dropoff::before { content: ""; position: absolute; inset: -1px; border: 1.5px solid var(--black); border-radius: 2px; background: transparent; }
.address-field input, .address-field select {
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 0;
  width: 100%;
}
.address-field input:focus, .address-field select:focus { outline: none; }
.address-connector {
  width: 1px;
  height: 14px;
  background: var(--gray-300);
  margin-left: 25px;
}

/* ---------- Inputs genéricos (usados em cadastro/carga) ---------- */
label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-600); margin: 12px 0 5px; }
input[type="text"], input[type="number"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--white);
  color: var(--black);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--black); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; }
.checkbox-row input { width: 18px; height: 18px; }

/* ---------- Cards de seleção de categoria (estilo UberX/Comfort) ---------- */
.vehicle-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  margin-bottom: 4px;
}
.vehicle-option:hover { background: var(--gray-50); }
.vehicle-option.selected { border-color: var(--black); background: var(--gray-50); }
.vehicle-option .icon { font-size: 34px; width: 56px; text-align: center; }
.vehicle-option .info { flex: 1; }
.vehicle-option .info .name { font-size: 15px; font-weight: 700; }
.vehicle-option .info .meta { font-size: 12px; color: var(--gray-600); margin-top: 2px; }
.vehicle-option .price { font-size: 15px; font-weight: 700; text-align: right; }
.vehicle-option .badge-suggested { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700; background: var(--black); color: var(--white); border-radius: 4px; padding: 2px 6px; text-transform: uppercase; }

/* ---------- Resumo de preço ---------- */
.price-line { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--gray-600); }
.price-line.total { font-weight: 700; color: var(--black); font-size: 16px; border-top: 1px solid var(--gray-200); margin-top: 8px; padding-top: 10px; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 10px; }
.alert.error { background: #fdeceb; color: var(--red); }
.alert.ok { background: #e6f8ee; color: #036239; }
.alert.warn { background: #fff4e0; color: var(--amber); }
.alert.info { background: var(--gray-50); color: var(--gray-900); }

/* ---------- Stepper de status (acompanhamento) ---------- */
.status-hero { text-align: center; padding: 6px 0 18px; }
.status-hero .big-emoji { font-size: 40px; }
.status-hero .status-text { font-size: 18px; font-weight: 700; margin-top: 6px; }
.status-hero .pin { font-size: 13px; color: var(--gray-600); margin-top: 4px; }
.status-hero .pin strong { color: var(--black); font-size: 15px; letter-spacing: 2px; }

.stepper { display: flex; align-items: flex-start; margin: 10px 0 16px; }
.step { flex: 1; text-align: center; position: relative; }
.step .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gray-200); margin: 0 auto 6px; }
.step.done .dot { background: var(--black); }
.step .line { position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--gray-200); z-index: -1; }
.step:first-child .line { display: none; }
.step.done .line { background: var(--black); }
.step .label { font-size: 10px; color: var(--gray-600); }
.step.done .label { color: var(--black); font-weight: 600; }

/* ---------- Driver: card de solicitação ---------- */
.request-card { text-align: center; }
.request-card .amount { font-size: 34px; font-weight: 800; margin: 6px 0 2px; }
.request-card .amount-sub { font-size: 12px; color: var(--gray-600); margin-bottom: 14px; }
.request-card .route { font-size: 13px; color: var(--gray-900); background: var(--gray-50); border-radius: var(--radius-sm); padding: 10px 12px; text-align: left; margin-bottom: 10px; }
.request-card .route .r-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 3px 0; }

.offer-list-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
}
.offer-list-card .amount { font-size: 22px; font-weight: 800; }
.offer-list-card .muted { font-size: 12px; color: var(--gray-600); margin: 4px 0; }

.online-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-card);
}
.online-toggle .label { font-size: 13px; font-weight: 700; }
.switch { position: relative; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--gray-300); border-radius: 999px; cursor: pointer; transition: 0.15s; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: 0.15s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- Tabs internas (Motorista: Ofertas / Corrida / Carteira) ---------- */
.tabbar { display: flex; gap: 4px; background: var(--gray-100); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tabbar button { flex: 1; border: none; background: transparent; padding: 9px 0; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--gray-600); }
.tabbar button.active { background: var(--white); color: var(--black); box-shadow: var(--shadow-card); }

/* ---------- Wallet ---------- */
.wallet-balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 6px; }
.wallet-balance-card { background: var(--gray-50); border-radius: var(--radius-md); padding: 14px; }
.wallet-balance-card .label { font-size: 11px; color: var(--gray-600); font-weight: 600; text-transform: uppercase; }
.wallet-balance-card .value { font-size: 20px; font-weight: 800; margin-top: 4px; }

/* ---------- Admin (dashboard escuro) ---------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--gray-50); }
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--black);
  color: var(--white);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-sidebar .brand-pill { background: transparent; box-shadow: none; padding: 0 0 20px; }
.admin-sidebar .brand-pill span { color: var(--white); }
.admin-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-300);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.admin-nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-nav-item.active { background: var(--white); color: var(--black); }
.admin-main { flex: 1; padding: 28px 32px; max-width: 1100px; }
.admin-main h1 { font-size: 22px; margin: 0 0 4px; }
.admin-main .page-sub { color: var(--gray-600); font-size: 13px; margin-bottom: 24px; }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card h2 { margin-top: 0; font-size: 15px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--gray-100); }
th { color: var(--gray-600); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.pending { background: #fff4e0; color: var(--amber); }
.badge.approved { background: #e6f8ee; color: #036239; }
.badge.rejected, .badge.blocked { background: #fdeceb; color: var(--red); }
.badge.info { background: var(--gray-100); color: var(--gray-900); }

.muted { color: var(--gray-600); font-size: 12px; }

@media (max-width: 700px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; }
  .admin-sidebar .brand-pill { padding: 0 14px 0 0; }
  .admin-main { padding: 20px; }
}

/* ---------- Telas de login/cadastro ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  padding: 24px 16px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 26px 24px;
}
.auth-logo { height: 54px; width: auto; border-radius: 10px; display: block; margin: 0 auto 14px; }
.auth-card h1 { font-size: 19px; text-align: center; margin: 0 0 4px; }
.auth-card .auth-sub { text-align: center; color: var(--gray-600); font-size: 12px; margin-bottom: 18px; }

.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--gray-400); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--gray-200); }

.social-buttons { display: flex; flex-direction: column; gap: 8px; }
.social-buttons .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

.auth-demo-hint { background: var(--gray-50); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 11px; color: var(--gray-600); margin-top: 16px; line-height: 1.5; }
.auth-demo-hint code { background: var(--gray-100); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
/* [hidden] must win over the flex rule above -- author-stylesheet declarations
   always beat the UA stylesheet's [hidden]{display:none}, even at equal
   specificity, so without this the modal never actually hides. */
.modal-overlay[hidden] {
  display: none !important;
}
.modal-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  max-width: 360px;
  width: 100%;
}
.modal-card h3 { margin-top: 0; font-size: 15px; }
.social-account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 8px;
}
.social-account-item:hover { background: var(--gray-50); }
.social-account-item .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.social-account-item .info .name { font-size: 13px; font-weight: 600; }
.social-account-item .info .email { font-size: 11px; color: var(--gray-600); }

.profile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.profile-header .who { font-size: 13px; }
.profile-header .who strong { display: block; font-size: 14px; }
