:root {
  --primary: #000000;
  --primary-hover: #333333;
  --bg: #ffffff;
  --card-bg: #ffffff;
  --text-main: #000000;
  --text-muted: #6f6f6f;
  --border-color: #eeeeee;
  --field-bg: #f6f6f6;
  --success: #00a680;
  --warning: #f5a623;
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Uber Move', 'Uber Move Text', -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  padding: 40px 32px;
  border-radius: var(--radius);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
}

.dashboard-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Marca */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.brand.small {
  margin-bottom: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow:hidden;
}

.brand.small .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand-logo img{width:100%;height:100%;object-fit:cover;display:block}

.brand-bolt {
  width: 14px;
  height: 20px;
  background: #fff;
  clip-path: polygon(58% 0, 0 56%, 42% 56%, 30% 100%, 100% 40%, 55% 40%);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand.small .brand-name {
  font-size: 1.15rem;
}

.brand.small h2 {
  font-size: 1.15rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

h1,
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.page-title {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

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

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 15px 16px;
  background: var(--field-bg);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

input::placeholder,
textarea::placeholder {
  color: #b0b0b0;
}

input:focus,
select:focus,
textarea:focus {
  background: #fff;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  position: relative;
}

.role-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.role-card {
  padding: 14px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  background: var(--field-bg);
  font-weight: 500;
  transition: all 0.2s;
}

.role-option input:checked + .role-card {
  background: #000;
  border-color: #000;
  color: #fff;
}

.btn {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  background: var(--primary-hover);
}

.btn:active {
  transform: scale(0.99);
}

.btn-route {
  background: #fff;
  border: 1px solid #000;
  color: #000;
}

.btn-route:hover {
  background: var(--field-bg);
  color: #000;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: #000;
  width: auto;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--field-bg);
  color: #000;
}

.toggle-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.toggle-link a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
}

.toggle-link a:hover {
  text-decoration: underline;
}

.online-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  background:var(--card-bg);
  border:1px solid var(--border-color);
  border-bottom:none;
  padding:16px 20px;
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
  border-radius:20px 20px 0 0;
  box-shadow:0 -4px 24px rgba(0,0,0,0.10);
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:100%;
  max-width:760px;
  z-index:100;
  margin-bottom:0;
}
.online-card.online{ border-color:var(--border-color); background:#fff; }
.online-card.offline{ background:#fff; }
.online-info{ display:flex; align-items:center; gap:12px; }
.status-dot{
  width:12px;height:12px;border-radius:50%;background:#ccc;flex-shrink:0;
  box-shadow:0 0 0 4px rgba(0,0,0,0.04);
}
.online-card.online .status-dot{ background:var(--success); box-shadow:0 0 0 4px rgba(0,166,128,0.18); }
#online-status-text{ font-size:1rem; }
.online-card .btn{ width:auto; padding:14px 28px; min-width:148px; border-radius:999px; font-weight:600; font-size:1rem; }
.online-card .btn.online{ background:var(--success); }
.online-card .btn.online:hover{ background:#008a6b; }
.dashboard-container{ padding-bottom:92px; }
@media(max-width:480px){
  .online-card{ padding:14px 16px; padding-bottom:calc(14px + env(safe-area-inset-bottom)); }
  .online-card .btn{ min-width:132px; padding:14px 20px; }
}

/* Pedidos / Cards */
.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.settings-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.settings-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.settings-toggle strong {
  font-weight: 600;
  color: var(--text-main);
}

.settings-caret {
  transition: transform 0.2s;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.settings-card.open .settings-caret {
  transform: rotate(180deg);
}

.settings-card .settings-body {
  height: 0;
  overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-card .settings-body .role-selector {
  margin-top: 14px;
}

.settings-card .muted {
  margin-bottom: 16px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.order-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-width: 0;
  overflow: hidden;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.order-header strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-pendente { background: #fdf3e2; color: #a86b00; }
.badge-aguardando_suporte { background: #fdf3e2; color: #a86b00; }
.badge-aguardando_atribuicao { background: #fdf3e2; color: #a86b00; }
.badge-em_transporte { background: #f1f1f1; color: #000; }
.badge-concluido { background: #e3f4ee; color: #007a5e; }
.badge-aprovado { background: #e3f4ee; color: #007a5e; }
.badge-rejeitado { background: #fdeaea; color: #c0392b; }

.order-route {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 2px solid var(--border-color);
  padding-left: 14px;
  min-width: 0;
}

.order-route p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-route span {
  color: var(--text-main);
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-reject {
  background: #fff;
  border: 1px solid #c0392b;
  color: #c0392b;
}

.btn-reject:hover {
  background: #fdeaea;
  color: #c0392b;
}

/* Página de aprovação */
.approval-box {
  text-align: center;
  padding: 16px 0;
}

.approval-icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.approval-box h2 {
  margin-bottom: 12px;
}

.approval-box .muted {
  margin-bottom: 24px;
}

/* Painel administrativo */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.admin-tabs::-webkit-scrollbar{display:none}

.admin-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  margin-bottom: -1px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab.active {
  color: #000;
  border-bottom-color: #000;
}

.tab-count {
  display: inline-block;
  background: var(--field-bg);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.75rem;
  margin-left: 4px;
}

.admin-tab.active .tab-count {
  background: #000;
  color: #fff;
}

.users-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.user-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.role-tag {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-card { min-width: 0; overflow: hidden; }
.user-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 2px solid var(--border-color);
  padding-left: 14px;
  font-size: 0.875rem;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.user-details p { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }

.user-details span {
  display: inline-block;
  min-width: 80px;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.app-body{background:#f2f2f2;align-items:flex-start;padding:0;min-height:100vh;min-height:100dvh}
.app-shell{width:100%;max-width:480px;min-height:100vh;min-height:100dvh;background:#fff;display:flex;flex-direction:column;position:relative;box-shadow:0 0 0 1px rgba(0,0,0,.04)}
header.app-topbar{margin-bottom:0;padding-bottom:0;border-bottom:1px solid #ececec}
.app-topbar{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.92);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border-bottom:1px solid #ececec;padding-top:env(safe-area-inset-top)}
.app-topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;min-height:60px;width:100%}
.app-topbar-inner .brand{flex:1;min-width:0;justify-content:flex-start}
.app-topbar-text h2{font-size:.95rem;font-weight:700;letter-spacing:-.02em;line-height:1.1}
.app-topbar-text .muted{font-size:.78rem;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.btn-icon{padding:8px 14px;font-size:.85rem;border-radius:999px;min-height:36px;flex-shrink:0;margin-left:auto}
.app-main{flex:1;padding:16px 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:18px;background:#f8f8f8}
.app-card{background:#fff;border:1px solid #ececec;border-radius:20px;padding:18px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.form-card .section-label{margin-bottom:14px}
.section-label{font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#9a9a9a}
.section-label.row-between{display:flex;justify-content:space-between;align-items:center}
.btn-primary-lg{margin-top:6px;padding:16px;border-radius:14px;font-weight:700;font-size:1rem;letter-spacing:-.01em}
.orders-section{padding:2px 0 0}
.app-body .orders-list{margin-top:12px;gap:12px}
.app-body .order-card{border-radius:18px;padding:16px;gap:12px;border-color:#ececec}
.app-body .dashboard-container{max-width:480px;margin:0 auto}
.driver-main{padding-bottom:100px}
.app-body .online-card{left:50%;transform:translateX(-50%);max-width:480px;width:100%;border-radius:20px 20px 0 0}
.app-body .settings-card{border-radius:18px;padding:16px;margin-bottom:0}
.app-body input{padding:14px 14px;font-size:.95rem;border-radius:14px}
.app-body .order-card:active{transform:scale(.99)}
@media(min-width:481px){
  .app-body{padding:0;justify-content:center;background:#e8e8e8}
  .app-shell{border-radius:0;min-height:100dvh}
  .app-main{padding:20px 20px calc(20px + env(safe-area-inset-bottom))}
}
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.45);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px;opacity:0;pointer-events:none;transition:opacity .22s}
.modal-overlay.open{opacity:1;pointer-events:auto}
.modal-box{background:#fff;border-radius:20px;padding:28px 24px;width:100%;max-width:380px;transform:scale(.96) translateY(8px);transition:transform .28s cubic-bezier(.32,1,.5,1);box-shadow:0 20px 60px rgba(0,0,0,.18);text-align:center;min-width:0}
.modal-overlay.open .modal-box{transform:scale(1) translateY(0)}
.modal-icon{width:52px;height:52px;border-radius:50%;margin:0 auto 14px;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700}
.modal-icon.success{background:#e3f4ee;color:#00a680}
.modal-icon.error{background:#fdeaea;color:#c0392b}
.modal-icon.warning{background:#fdf3e2;color:#a86b00}
.modal-icon.info{background:#f1f1f1;color:#000}
.modal-title{font-size:1.2rem;font-weight:700;margin-bottom:8px;overflow-wrap:anywhere}
.modal-message{color:var(--text-muted);font-size:.95rem;line-height:1.5;margin-bottom:22px;overflow-wrap:anywhere;word-break:break-word}
.modal-actions{display:flex;gap:10px}
.modal-actions .btn{flex:1;padding:14px}
