/* ============================================================
   Mango Tree Onboarding — Estilos Frontend
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');

#mto-app { font-family: 'Raleway', sans-serif; max-width: 520px; margin: 0 auto; padding: 16px 10px 40px; }

/* ABAS */
.mto-tabs { display: flex; border-radius: 12px 12px 0 0; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.mto-tab  { flex: 1; padding: 13px 6px; text-align: center; font-family: 'Raleway', sans-serif; font-size: 12.5px; font-weight: 700; color: #60656b; cursor: pointer; border-bottom: 3px solid transparent; transition: all .2s; background: #fff; }
.mto-tab:hover { color: #ea5b1a; }
.mto-tab.on    { color: #ea5b1a; border-bottom-color: #ea5b1a; }

/* CARD */
.mto-card { background: #fff; border-radius: 0 0 16px 16px; box-shadow: 0 4px 20px rgba(0,0,0,.1); overflow: hidden; }

/* BANNER */
.mto-bnr img { width: 100%; display: block; }

/* BODY */
.mto-body { padding: 26px 26px 30px; }

/* TÍTULOS */
.mto-title-main  { font-size: 26px; font-weight: 800; color: #ea5b1a; text-align: center; margin-bottom: 6px; }
.mto-subtitle    { font-size: 14px; color: #60656b; text-align: center; margin-bottom: 22px; }
.mto-title-left  { font-size: 20px; font-weight: 800; color: #ea5b1a; margin-bottom: 20px; }
.mto-title-admin { font-size: 18px; font-weight: 700; color: #ea5b1a; margin-bottom: 18px; }

/* FORMULÁRIO */
.mto-field { margin-bottom: 15px; }
.mto-lbl   { display: block; font-size: 12px; font-weight: 700; color: #ea5b1a; margin-bottom: 5px; font-family: 'Raleway', sans-serif; }
.mto-inp   { width: 100%; height: 46px; border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 0 13px; font-family: 'Raleway', sans-serif; font-size: 14px; color: #333; background: #fff; outline: none; transition: border-color .2s; box-sizing: border-box; }
.mto-inp:focus { border-color: #ea5b1a; box-shadow: 0 0 0 3px rgba(234,91,26,.1); }
.mto-inp[readonly] { background: #f9f9f9; color: #60656b; }
.mto-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* UPLOAD */
.mto-upload-row { display: flex; align-items: center; justify-content: space-between; height: 46px; border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 0 13px; cursor: pointer; transition: border-color .2s; }
.mto-upload-row:hover { border-color: #ea5b1a; }
.mto-upload-txt { font-size: 13px; color: #aaa; font-family: 'Raleway', sans-serif; }
.mto-upload-txt.ok { color: #333; font-weight: 600; }
.mto-upload-arr { color: #aaa; font-size: 12px; }

/* TEXTO MOTIVACIONAL */
.mto-motiv { font-size: 13px; font-weight: 700; color: #ea5b1a; text-align: center; margin: 18px 0; line-height: 1.7; }

/* LGPD */
.mto-lgpd-box { background: #fef9ea; border: 1.5px solid #fef9ea; border-radius: 10px; padding: 20px; margin-bottom: 26px; }
.mto-lgpd-txt { font-size: 15px; color: #60656b; text-align: center; line-height: 1.7; margin: 0; }

/* RODAPÉ */
.mto-foot-txt { font-size: 12px; color: #888; text-align: center; line-height: 1.6; margin: 14px 0; }

/* BOTÕES */
.mto-btn  { width: 100%; height: 50px; background: #ea5b1a; color: #fff; border: none; border-radius: 10px; font-family: 'Raleway', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; margin-top: 6px; display: block; }
.mto-btn:hover { background: #c84a12; }
.mto-btn:disabled { background: #ccc; cursor: not-allowed; }
.mto-btn2 { width: 100%; height: 44px; background: #fff; color: #ea5b1a; border: 2px solid #ea5b1a; border-radius: 10px; font-family: 'Raleway', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 10px; display: block; }
.mto-btn2:hover { background: #fff5f0; }

/* SUCESSO */
.mto-succ { text-align: center; padding: 32px 16px; }
.mto-succ-ico { font-size: 52px; margin-bottom: 14px; }
.mto-succ-t { font-size: 22px; font-weight: 800; color: #ea5b1a; margin-bottom: 10px; }
.mto-succ-m { font-size: 14px; color: #60656b; line-height: 1.7; }

/* ESTATÍSTICAS */
.mto-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 18px; }
.mto-stat  { background: #f9f9f9; border: 1px solid #eee; border-radius: 10px; padding: 10px 6px; text-align: center; }
.mto-snum  { font-size: 22px; font-weight: 800; color: #F47920; display: block; }
.mto-slbl  { font-size: 10px; font-weight: 600; color: #60656b; display: block; margin-top: 2px; }

/* LISTA */
.mto-reg { border: 1px solid #eee; border-radius: 12px; padding: 14px 15px; margin-bottom: 10px; background: #fff; }
.mto-reg-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 5px; }
.mto-reg-nm { font-size: 15px; font-weight: 700; color: #222; }
.mto-reg-mt { font-size: 11px; color: #888; margin-top: 2px; }
.mto-reg-bts { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }

/* BADGES */
.mto-badge { border-radius: 20px; padding: 3px 11px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.b-pend { background: #FAEEDA; color: #854F0B; }
.b-gest { background: #E6F1FB; color: #185FA5; }
.b-conc { background: #EAF3DE; color: #3B6D11; }

/* BOTÕES DE AÇÃO */
.mto-bsm { height: 34px; border-radius: 8px; font-family: 'Raleway', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0 11px; border: 1px solid; white-space: nowrap; }
.mto-bsm-d { background: #fff; color: #60656b; border-color: #ddd; }
.mto-bsm-a { background: #EAF3DE; color: #3B6D11; border-color: #b5d990; }
.mto-bsm-r { background: #FAECE7; color: #993C1D; border-color: #f09a7a; }
.mto-bsm-p { background: #FEF3E2; color: #854F0B; border: 1px solid #F9C97C; height: 34px; border-radius: 8px; font-family: 'Raleway', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0 13px; }

/* ALERTA */
.mto-alert { background: #FEF3E2; border: 1.5px solid #F9C97C; border-radius: 10px; padding: 11px 15px; margin-bottom: 18px; font-size: 13px; font-weight: 600; color: #854F0B; }

/* VAZIO */
.mto-empty { text-align: center; padding: 30px; color: #aaa; font-size: 14px; line-height: 1.7; }

/* MODAL */
.mto-ov    { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.mto-mbox  { background: #fff; border-radius: 16px; overflow: hidden; width: 100%; max-width: 500px; margin: auto; }
.mto-mbody { padding: 20px 24px 26px; }
.mto-mhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mto-mtit  { font-size: 18px; font-weight: 700; color: #ea5b1a; font-family: 'Raleway', sans-serif; }
.mto-mclose { background: none; border: none; cursor: pointer; font-size: 20px; color: #888; padding: 0 4px; }
.mto-mclose:hover { color: #333; }
.mto-instr { font-size: 13px; color: #888; text-align: center; margin-bottom: 16px; line-height: 1.5; }

/* DETALHE */
.mto-det-g { display: grid; grid-template-columns: 1fr 1fr; }
.mto-det-f { padding: 7px 0; border-bottom: 1px solid #f3f3f3; }
.mto-det-fl { font-size: 10px; font-weight: 700; color: #999; text-transform: uppercase; display: block; margin-bottom: 2px; }
.mto-det-fv { font-size: 13px; font-weight: 600; color: #222; }

/* PERMISSÕES */
.mto-pc    { background: #FEF9F0; border: 1.5px solid #F9C97C; border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mto-plbl  { font-size: 12px; font-weight: 700; color: #ea5b1a; flex: 1; line-height: 1.4; }
.mto-popts { display: flex; gap: 16px; flex-shrink: 0; }
.mto-popt  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mto-poptl { font-size: 11px; font-weight: 700; color: #ea5b1a; }
.mto-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ddd; background: #fff; cursor: pointer; appearance: none; -webkit-appearance: none; transition: all .2s; }
.mto-radio:checked { background: #ea5b1a; border-color: #ea5b1a; box-shadow: inset 0 0 0 4px #fff; }

/* RODAPÉ PERMISSÕES */
.mto-pfooter { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; }
.mto-btnperm { height: 50px; background: #ea5b1a; color: #fff; border: none; border-radius: 10px; font-family: 'Raleway', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; padding: 0 20px; white-space: nowrap; }
.mto-btnperm:hover { background: #c84a12; }

/* UTILITÁRIOS */
.mto-hidden { display: none !important; }
.mto-view   { display: none; }
.mto-view.on { display: block; }

/* RESPONSIVO */
@media (max-width: 480px) {
  .mto-g2 { grid-template-columns: 1fr; }
  .mto-stats { grid-template-columns: repeat(5, 1fr); }
  .mto-pfooter { flex-direction: column; }
  .mto-btnperm { width: 100%; }
}



/* ============================================================
   Campo WhatsApp — select nativo com emoji flags
   ============================================================ */
#mto-app .mto-phone-wrap {
  display: flex;
  width: 100%;
}
#mto-app .mto-country-sel {
  height: 46px;
  border: 1.5px solid #e0e0e0;
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 0 24px 0 10px;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  background-color: #f9f9f9;
  color: #333;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  min-width: 120px;
  max-width: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaa'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color .2s;
}
#mto-app .mto-country-sel:focus {
  border-color: #ea5b1a;
  box-shadow: 0 0 0 3px rgba(234,91,26,.1);
}
#mto-app .mto-num-inp {
  flex: 1;
  height: 46px;
  border: 1.5px solid #e0e0e0;
  border-left: none;
  border-radius: 0 10px 10px 0;
  padding: 0 12px;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color .2s;
  background: #fff;
  box-sizing: border-box;
}
#mto-app .mto-num-inp:focus {
  border-color: #ea5b1a;
  box-shadow: 0 0 0 3px rgba(234,91,26,.1);
}

/* ============================================================
   WhatsApp — overlay select (mostra só flag+code, nome no dropdown)
   ============================================================ */
#mto-app .mto-sel-wrap {
  position: relative;
  height: 46px;
  min-width: 90px;
  flex-shrink: 0;
}
#mto-app .mto-sel-display {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 46px;
  padding: 0 8px 0 12px;
  background: #f9f9f9;
  border: 1.5px solid #e0e0e0;
  border-right: none;
  border-radius: 10px 0 0 10px;
  font-size: 14px;
  pointer-events: none;
  white-space: nowrap;
}
#mto-app .mto-sel-arr { font-size: 10px; color: #aaa; }
#mto-app .mto-sel-hidden {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 14px;
}

/* Badge rejeitado */
#mto-app .b-rej { background: #F5E0E0; color: #7A1F1F; }

/* Modais centralizados — override do tema WordPress */
body > [id^="modal-"] .mto-ov {
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 999999 !important;
}

/* Badge aguardando liberação */
#mto-app .b-lib { background: #FFF3CD; color: #856404; }

/* Filtros e paginação do painel admin */
#mto-app .mto-filter-bar { margin: 14px 0 0; }
#mto-app .mto-search-inp { width:100%;height:40px;border:1.5px solid #e0e0e0;border-radius:10px;padding:0 14px;font-family:'Raleway',sans-serif;font-size:13px;outline:none;box-sizing:border-box; }
#mto-app .mto-search-inp:focus { border-color:#FBBA10; }
#mto-app .mto-fbtn { height:30px;padding:0 12px;border:1.5px solid #e0e0e0;border-radius:20px;background:#f9f9f9;color:#888;font-family:'Raleway',sans-serif;font-size:11px;font-weight:700;cursor:pointer;transition:all .15s; }
#mto-app .mto-fbtn.active { background:#FBBA10;border-color:#FBBA10;color:#222; }
#mto-app .mto-fbtn:hover { border-color:#FBBA10; }
#mto-app .mto-pg-btn { height:32px;padding:0 12px;border:1.5px solid #e0e0e0;border-radius:8px;background:#fff;color:#555;font-family:'Raleway',sans-serif;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s; }
#mto-app .mto-pg-btn.active,#mto-app .mto-pg-btn:hover { background:#FBBA10;border-color:#FBBA10;color:#222; }
