* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
}
.screen { min-height: 100vh; }
.screen[hidden] { display: none !important; }

/* Login */
#screen-login { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { font-size: 1.8rem; margin-bottom: 4px; text-align: center; }
.subtitle { color: #64748b; text-align: center; margin-bottom: 24px; }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-top: 14px; margin-bottom: 4px; }
input {
  width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 1rem; -webkit-appearance: none;
}
button {
  cursor: pointer; border: none; border-radius: 8px; font-weight: 600; font-size: 1rem;
}
#btn-login {
  width: 100%; margin-top: 20px; padding: 14px; background: #d97706; color: #fff;
}
#btn-login:active { background: #b45309; }
#btn-login:disabled { opacity: 0.6; }
.error {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 10px; border-radius: 8px; margin-top: 14px; font-size: 0.85rem;
}

/* Banner */
.banner { padding: 10px 16px; text-align: center; font-size: 0.85rem; font-weight: 600; }
.banner-warn { background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; }

/* Header comum */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid #e2e8f0;
  position: sticky; top: 0; z-index: 10;
}
.app-header strong { display: block; font-size: 1rem; }
.link-btn { background: none; color: #d97706; padding: 6px; font-size: 0.9rem; }
.status-pill {
  margin-top: 4px; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem;
  background: #f1f5f9; color: #475569;
}
.status-pill.disponivel { background: #dcfce7; color: #15803d; }
.status-pill.indisponivel { background: #f1f5f9; color: #64748b; }
.status-pill.em_entrega { background: #ede9fe; color: #6d28d9; }

.empty-state { text-align: center; color: #94a3b8; padding: 48px 16px; }

/* Lista de entregas */
#deliveries-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.delivery-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px;
  text-align: left; width: 100%;
}
.delivery-card .order-num { font-weight: 700; font-size: 1rem; }
.delivery-card .customer { color: #475569; font-size: 0.9rem; margin-top: 2px; }
.delivery-card .address { color: #64748b; font-size: 0.85rem; margin-top: 6px; }
.delivery-card .badge {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; background: #fef3c7; color: #92400e;
}
.delivery-card .fee { color: #15803d; font-weight: 700; font-size: 0.9rem; margin-top: 6px; }

.header-actions { display: flex; align-items: center; gap: 4px; }

/* Ganhos */
.period-tabs { display: flex; gap: 8px; padding: 14px 16px 0; }
.period-tab {
  flex: 1; padding: 10px; background: #f1f5f9; color: #64748b; border-radius: 8px; font-size: 0.9rem;
}
.period-tab.active { background: #d97706; color: #fff; }
.earnings-total {
  margin: 16px; padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; text-align: center;
}
.earnings-total .label { font-size: 0.8rem; color: #94a3b8; font-weight: 600; }
.earnings-total .value { font-size: 2rem; font-weight: 800; color: #15803d; margin-top: 4px; }
.earnings-total .count { font-size: 0.85rem; color: #64748b; margin-top: 4px; }
#earnings-list { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.earnings-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px;
}
.earnings-item .order-num { font-weight: 600; font-size: 0.9rem; }
.earnings-item .date { color: #94a3b8; font-size: 0.78rem; }
.earnings-item .fee { color: #15803d; font-weight: 700; }

/* Detalhe */
.detail-card { padding: 16px; }
.detail-card h2 { margin-top: 0; }
.detail-row { margin-bottom: 14px; }
.detail-row .label { font-size: 0.8rem; color: #94a3b8; font-weight: 600; }
.detail-row .value { font-size: 1rem; margin-top: 2px; }
.maps-link {
  display: inline-block; margin-top: 6px; color: #d97706; font-weight: 600; text-decoration: none;
}
.action-btn {
  width: 100%; padding: 16px; margin-top: 20px; background: #d97706; color: #fff; font-size: 1.05rem;
}
.action-btn:active { background: #b45309; }
.action-btn:disabled { opacity: 0.6; }
.confirm-box { margin-top: 16px; }
