:root{--bg:#f3f4f6;--dark:#111;--gold:#f7c600;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--white:#fff;--green:#16a34a;--red:#dc2626;--orange:#f97316;--blue:#2563eb;--radius:18px;--shadow:0 14px 35px rgba(0,0,0,.08)}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font-family:inherit}.hidden{display:none!important}.login-screen{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top right,rgba(247,198,0,.25),transparent 35%),linear-gradient(135deg,#0b0b0b,#222);padding:18px}.login-card{width:min(430px,100%);background: linear-gradient(135deg, #e4e4e4fa, #0c0101);;border-radius:28px;box-shadow:0 30px 90px rgba(0,0,0,.35);padding:32px}.logo-box{width:74px;height:74px;border-radius:22px;background:var(--gold);display:grid;place-items:center;font-weight:900;font-size:28px;color:#111;margin-bottom:16px}.login-card h1{margin:0;font-size:34px}.login-card p{color:var(--muted);margin-bottom:24px}.login-card small{display:block;text-align:center;color:var(--muted);margin-top:12px}.full-btn{width:100%;justify-content:center}.app{min-height:100vh;display:flex}.sidebar{width:280px;background:var(--dark);color:#fff;padding:24px;position:fixed;left:0;top:0;bottom:0;z-index:20}.brand{display:flex;align-items:center;gap:14px;margin-bottom:35px}.brand-icon,.operator-photo{width:54px;height:54px;border-radius:16px;background:var(--gold);color:#111;display:grid;place-items:center;font-weight:900;background-size:cover;background-position:center}.brand h1{margin:0;font-size:24px}.brand span{font-size:12px;color:#d1d5db}.menu{display:grid;gap:8px}.menu-item{border:0;background:transparent;color:#d1d5db;text-align:left;padding:14px 16px;border-radius:14px;cursor:pointer;transition:.2s;font-size:15px}.menu-item:hover,.menu-item.active{background:var(--gold);color:#111;font-weight:700}.main{margin-left:280px;width:calc(100% - 280px);min-height:100vh}.topbar{min-height:88px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 28px;position:sticky;top:0;z-index:10}.topbar h2{margin:0}.topbar p{margin:4px 0 0;color:var(--muted);font-size:14px}.hamburger{display:none;border:0;background:#111;color:var(--gold);width:44px;height:44px;border-radius:12px;font-size:20px}.operator-card{display:flex;align-items:center;gap:12px;background:#f9fafb;border:1px solid var(--line);padding:8px 12px;border-radius:18px}.operator-card span{display:block;color:var(--muted);font-size:13px}.content{padding:28px}.page{display:none}.page.active{display:block}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:22px}.card{background:#fff;border-radius:var(--radius);padding:22px;box-shadow:var(--shadow);border:1px solid var(--line);position:relative;overflow:hidden}.card:before{content:"";width:7px;background:var(--gold);position:absolute;left:0;top:0;bottom:0}.card span{color:var(--muted);font-size:14px}.card strong{display:block;margin-top:8px;font-size:26px}.card small{display:block;margin-top:8px;color:var(--muted)}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:22px}.panel,.report-box{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid var(--line);padding:22px;margin-bottom:22px}.panel-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.panel-header h3{margin:0}.panel-header small{color:var(--muted)}.quick-actions{display:grid;gap:12px}.btn{border:1px solid var(--line);background:#fff;color:var(--text);border-radius:12px;padding:11px 14px;cursor:pointer;font-weight:700;transition:.2s;display:inline-flex;align-items:center;justify-content:center}.btn:hover{transform:translateY(-1px)}.btn.primary{background:var(--gold);border-color:var(--gold);color:#111}.btn.danger{background:#fee2e2;color:var(--red)}.btn.whatsapp{background:#dcfce7;color:#166534}.table-wrap{width:100%;overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:960px}th,td{text-align:left;padding:14px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle}th{color:var(--muted);font-size:13px;background:#f9fafb}.badge{display:inline-flex;align-items:center;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:700}.badge.green{background:#dcfce7;color:#166534}.badge.orange{background:#ffedd5;color:#9a3412}.badge.blue{background:#dbeafe;color:#1d4ed8}.badge.red{background:#fee2e2;color:#991b1b}.badge.gray{background:#f3f4f6;color:#374151}.filters{display:grid;grid-template-columns:260px 1fr;gap:12px;margin-bottom:16px}.filters.one{grid-template-columns:1fr}.tariff-config{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px;background:#f9fafb;border:1px solid var(--line);border-radius:18px;padding:18px}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 13px;outline:none;background:#fff;color:var(--text)}input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 4px rgba(247,198,0,.18)}label{display:grid;gap:7px;color:var(--muted);font-size:13px;font-weight:700;margin-bottom:14px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.tariff-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.tariff-card{background:#f9fafb;border:1px solid var(--line);border-radius:18px;padding:18px}.full{margin-top:14px}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.actions.space-between{justify-content:space-between}.input-button{display:grid;grid-template-columns:1fr auto;gap:8px}.summary-box{background:#f9fafb;border:1px solid var(--line);border-radius:16px;padding:14px}.note{color:var(--muted);font-size:13px}.drivers-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.driver-card{border:1px solid var(--line);border-radius:18px;padding:18px;background:#fff}.driver-photo{width:70px;height:70px;border-radius:18px;background:linear-gradient(135deg,#111,#444);color:var(--gold);display:grid;place-items:center;font-weight:900;margin-bottom:14px;background-size:cover;background-position:center}.driver-photo.big{width:90px;height:90px;margin:0}.driver-card h4{margin:0 0 6px}.driver-card p{margin:4px 0;color:var(--muted);font-size:14px}.driver-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}.preview-row{display:grid;grid-template-columns:auto 1fr;gap:18px;align-items:start;background:#f9fafb;border:1px solid var(--line);padding:16px;border-radius:18px;margin-top:12px}.message-box{border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:18px;background:#f9fafb}.message-box h4{margin-top:0}.modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;padding:22px;z-index:50}.modal.active{display:flex}.modal-content{width:min(560px,100%);max-height:90vh;overflow-y:auto;background:#fff;border-radius:22px;padding:22px;box-shadow:0 30px 90px rgba(0,0,0,.25)}.modal-content.xl{width:min(1050px,100%)}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modal-header h3{margin:0}.modal-header button{border:0;background:#f3f4f6;width:38px;height:38px;border-radius:12px;font-size:26px;cursor:pointer}.toast{position:fixed;right:22px;bottom:22px;background:#111;color:#fff;border-left:6px solid var(--gold);padding:16px 18px;border-radius:14px;box-shadow:var(--shadow);display:none;z-index:80}.toast.active{display:block}@media print{body *{visibility:hidden}#printArea,#printArea *{visibility:visible}#printArea{position:absolute;left:0;top:0;width:100%;padding:20px}.btn,.topbar,.sidebar{display:none!important}}@media(max-width:1200px){.cards,.tariff-grid{grid-template-columns:repeat(2,1fr)}.drivers-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:850px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}.main{margin-left:0;width:100%}.hamburger{display:block}.topbar{align-items:flex-start;padding:16px}.operator-card{display:none}.content{padding:16px}.cards,.drivers-grid,.form-grid,.filters,.grid-2,.tariff-grid,.preview-row,.tariff-config{grid-template-columns:1fr}.panel-header{align-items:flex-start;flex-direction:column}.actions,.actions.space-between{flex-direction:column}}

.boxlogo{
  width: 50%; 
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #f1b018fa, #0c0101);
  border-radius: 18px;
  
}
.imglogo{
  width: 100%;
}

label{
  color: rgb(41, 32, 1);
}

/* ═══════════════════════════════════════
   AUTOCOMPLETE DE ENDEREÇO
═══════════════════════════════════════ */
.autocomplete-wrap {
  position: relative;
  width: 100%;
}
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  z-index: 999;
  overflow: hidden;
  display: none;
}
.autocomplete-list.active {
  display: block;
}
.autocomplete-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(247,198,0,.12);
}
.autocomplete-item-icon {
  font-size: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}
.autocomplete-item-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.autocomplete-item-sec {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.autocomplete-loading {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════
   STATUS SELECT NA TABELA DE CORRIDAS
═══════════════════════════════════════════════════ */
.status-select {
  padding: 4px 8px;
  border-radius: 20px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 110px;
}
.status-nova      { background: #e5e7eb; color: #374151; }
.status-aceita    { background: #dbeafe; color: #1d4ed8; }
.status-a-caminho { background: #fef3c7; color: #92400e; }
.status-em-curso  { background: #d1fae5; color: #065f46; }
.status-finalizada{ background: #f3f4f6; color: #6b7280; }
.status-cancelada { background: #fee2e2; color: #991b1b; }

/* Ações na tabela */
.actions-cell { white-space: nowrap; }
.actions-cell .btn { padding: 4px 8px; font-size: 12px; margin: 1px; }

/* ═══════════════════════════════════════════════════
   RANKING MOTORISTAS — Dashboard V7
═══════════════════════════════════════════════════ */
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.rank-medal { font-size: 20px; width: 28px; flex-shrink: 0; }
.rank-info  { flex: 1; min-width: 0; }
.rank-name  { font-size: 13px; font-weight: 600; margin-bottom: 4px;
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-bar-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--line); border-radius: 6px; overflow: hidden; height: 22px;
}
.rank-bar {
  height: 22px; background: var(--yellow); border-radius: 6px;
  transition: width 0.4s ease; min-width: 4px;
}
.rank-val { font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; padding-right: 8px; }

/* ═══════════════════════════════════════════════════
   FICHA MOTORISTA VIEW
═══════════════════════════════════════════════════ */
.note { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* Botão whatsapp */
.btn.whatsapp { background: #25d366; color: #fff; }
.btn.whatsapp:hover { background: #1da851; }

/* Input button - garantir alinhamento */
.input-button { display: flex; gap: 8px; align-items: stretch; }
.input-button input { flex: 1; }

/* ═══════════════════════════════════════════════════
   CAMPO ENDEREÇO COM BOTÃO LIMPAR (×)
═══════════════════════════════════════════════════ */
.input-clear-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-clear-wrap input {
  flex: 1;
  padding-right: 32px !important;
}
.btn-clear-field {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: none;
}
.btn-clear-field:hover { color: var(--text); }
.input-clear-wrap input:not(:placeholder-shown) ~ .btn-clear-field,
.input-clear-wrap input.has-value ~ .btn-clear-field {
  display: block;
}

/* ═══════════════════════════════════════════════════
   RANKING COM SCROLL
═══════════════════════════════════════════════════ */
.ranking-dash {
  max-height: 260px !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 4px 4px 8px 0;
}
.ranking-dash::-webkit-scrollbar { width: 4px; }
.ranking-dash::-webkit-scrollbar-track { background: transparent; }
.ranking-dash::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════
   BOTTOM NAVIGATION BAR — Mobile only
═══════════════════════════════════════════════════════ */
.mobile-nav { display: none }

@media (max-width: 768px) {
  /* Mostrar nav */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 40;
    box-shadow: 0 -2px 16px rgba(0,0,0,.08);
  }

  /* Itens */
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-item.active { color: #111 }
  .mobile-nav-icon { font-size: 22px; line-height: 1 }

  /* Botão Nova — destaque central */
  .mobile-nav-new {
    color: #111;
  }
  .mobile-nav-new .mobile-nav-icon {
    background: #f7c600;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 2px;
    line-height: 1;
  }

  /* Espaço para não esconder conteúdo atrás da nav */
  .content { padding-bottom: 80px }

  /* Toast acima da nav */
  .toast { bottom: 74px }
}
