/* MapaMente — CSS global (landing, auth, dashboard, legal, admin)
   Identidade: roxo #6B4EFF, mobile-first, radius 14px cards / 10px botoes. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

:root{
  --primary:#6B4EFF;
  --primary-hover:#5a3ee6;
  --ink:#191627;
  --bg:#F7F7FB;
  --card:#fff;
  --border:#e6e4f0;
  --success:#1fa971;
  --error:#d94848;
  --muted:#6b6880;
  --radius-card:14px;
  --radius-btn:10px;
  --shadow-sm: 0 1px 2px rgba(25,22,39,.06), 0 1px 1px rgba(25,22,39,.04);
  --shadow-md: 0 8px 24px rgba(25,22,39,.10);
  --shadow-lg: 0 20px 48px rgba(25,22,39,.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

body{
  margin:0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height:1.5;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ margin:0 0 .5em; line-height:1.2; font-weight:800; }
p{ margin:0 0 1em; color: var(--ink); }
a{ color: var(--primary); text-decoration:none; }
a:hover{ text-decoration:underline; }
img,svg{ max-width:100%; display:block; }
button{ font-family:inherit; }
ul{ margin:0; padding:0; list-style:none; }

.container{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding:0 20px;
}

/* ---------- Botoes ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius: var(--radius-btn);
  padding:12px 20px;
  font-size:15px;
  font-weight:700;
  border:2px solid transparent;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
  text-decoration:none;
  line-height:1.2;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{ background: var(--primary); color:#fff; }
.btn-primary:hover{ background: var(--primary-hover); text-decoration:none; }
.btn-outline{ background:transparent; border-color: var(--border); color: var(--ink); }
.btn-outline:hover{ border-color: var(--primary); color: var(--primary); text-decoration:none; }
.btn-ghost{ background:transparent; color: var(--ink); }
.btn-ghost:hover{ background:#efeeff; text-decoration:none; }
.btn-danger{ background:transparent; border-color: var(--error); color: var(--error); }
.btn-danger:hover{ background: var(--error); color:#fff; }
.btn-block{ width:100%; }
.btn-sm{ padding:8px 14px; font-size:13px; }
.btn:disabled{ opacity:.55; cursor:not-allowed; }

/* ---------- Site header / footer (landing, auth, legal) ---------- */
.site-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 0;
}
.logo{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:19px; color:var(--ink); }
.logo:hover{ text-decoration:none; }
.logo span.brand-team{ color:var(--muted); font-weight:600; font-size:12px; margin-left:2px; }
.nav-actions{ display:flex; align-items:center; gap:10px; }

.site-footer{
  border-top:1px solid var(--border);
  margin-top:64px;
  padding:32px 0 40px;
  color:var(--muted);
  font-size:14px;
}
.footer-row{ display:flex; flex-wrap:wrap; gap:16px; align-items:center; justify-content:space-between; }
.footer-links{ display:flex; gap:18px; flex-wrap:wrap; }
.footer-links a{ color:var(--muted); }
.footer-links a:hover{ color:var(--primary); }

/* ---------- Hero ---------- */
.hero{ padding:48px 0 32px; }
.hero-grid{ display:grid; grid-template-columns:1fr; gap:36px; align-items:center; }
.hero h1{ font-size:32px; letter-spacing:-.02em; }
.hero .hero-lead{ font-size:17px; color:var(--muted); max-width:46ch; }
.hero-cta-row{ display:flex; gap:12px; flex-wrap:wrap; margin-top:22px; }
.hero-note{ font-size:13px; color:var(--muted); margin-top:10px; }
.hero-visual{ display:flex; justify-content:center; }
.hero-visual svg{ width:100%; max-width:440px; height:auto; }

/* animacao do mapa mental do hero (SVG/CSS puro) */
.mm-line{
  fill:none; stroke-width:2.5; stroke-linecap:round;
  stroke-dasharray:1; stroke-dashoffset:1;
  animation: mm-draw 900ms ease forwards;
}
.mm-node{ transform-box: fill-box; transform-origin:center; opacity:0; transform:scale(.4);
  animation: mm-pop 480ms cubic-bezier(.2,.9,.3,1.3) forwards; }
.mm-label{ font-family:var(--font); font-size:11px; font-weight:700; fill:var(--ink); opacity:0;
  animation: mm-fade 400ms ease forwards; }
@keyframes mm-draw{ to{ stroke-dashoffset:0; } }
@keyframes mm-pop{ to{ opacity:1; transform:scale(1); } }
@keyframes mm-fade{ to{ opacity:1; } }
@media (prefers-reduced-motion: reduce){
  .mm-line,.mm-node,.mm-label{ animation:none !important; opacity:1 !important; stroke-dashoffset:0 !important; transform:none !important; }
}

/* ---------- Secoes genericas ---------- */
.section{ padding:48px 0; }
.section-head{ text-align:center; max-width:640px; margin:0 auto 32px; }
.section-title{ font-size:26px; }
.section-sub{ color:var(--muted); font-size:16px; }

/* features */
.features-grid{ display:grid; grid-template-columns:1fr; gap:16px; }
.feature-card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius-card);
  padding:20px; box-shadow:var(--shadow-sm);
}
.feature-icon{
  width:40px; height:40px; border-radius:10px; background:#efeafe; color:var(--primary);
  display:flex; align-items:center; justify-content:center; margin-bottom:12px;
}
.feature-card h3{ font-size:16px; margin-bottom:6px; }
.feature-card p{ font-size:14px; color:var(--muted); margin:0; }

/* passos */
.steps{ display:grid; grid-template-columns:1fr; gap:20px; counter-reset:step; }
.step{ position:relative; padding-left:52px; }
.step::before{
  counter-increment:step; content:counter(step);
  position:absolute; left:0; top:0; width:38px; height:38px; border-radius:50%;
  background:var(--primary); color:#fff; font-weight:800; display:flex; align-items:center; justify-content:center;
}
.step h3{ font-size:16px; margin-bottom:4px; }
.step p{ color:var(--muted); font-size:14px; margin:0; }

/* precos */
.pricing-grid{ display:grid; grid-template-columns:1fr; gap:18px; }
.price-card{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius-card);
  padding:26px 22px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:14px;
}
.price-card--featured{
  border-color:var(--primary); box-shadow:var(--shadow-md); position:relative;
}
.price-badge{
  position:absolute; top:-13px; left:50%; transform:translateX(-50%);
  background:var(--success); color:#fff; font-size:12px; font-weight:800;
  padding:5px 12px; border-radius:999px; white-space:nowrap;
}
.price-name{ font-size:15px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.price-value{ font-size:34px; font-weight:800; }
.price-value small{ font-size:15px; font-weight:600; color:var(--muted); }
.price-list{ display:flex; flex-direction:column; gap:8px; font-size:14px; }
.price-list li{ display:flex; gap:8px; align-items:flex-start; }
.price-list svg{ flex:0 0 auto; margin-top:2px; color:var(--success); }

/* FAQ (details/summary, sem JS) */
.faq-item{
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius-card);
  padding:6px 18px; margin-bottom:10px;
}
.faq-item summary{
  cursor:pointer; padding:14px 0; font-weight:700; list-style:none; display:flex; justify-content:space-between; gap:12px; align-items:center;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:"+"; font-size:20px; color:var(--primary); font-weight:400; }
.faq-item[open] summary::after{ content:"\2212"; }
.faq-item p{ padding-bottom:14px; color:var(--muted); font-size:14px; margin:0; }

/* ---------- Auth (entrar.php / reset.php) ---------- */
.auth-page{ min-height:100vh; display:flex; flex-direction:column; }
.auth-wrap{ flex:1; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth-card{
  width:100%; max-width:400px; background:var(--card); border:1px solid var(--border);
  border-radius:var(--radius-card); box-shadow:var(--shadow-md); padding:28px 26px;
}
.auth-card .logo{ justify-content:center; margin-bottom:18px; }
.auth-tabs{ display:flex; border:1px solid var(--border); border-radius:var(--radius-btn); overflow:hidden; margin-bottom:20px; }
.auth-tab{
  flex:1; text-align:center; padding:10px; font-weight:700; font-size:14px; background:transparent;
  border:none; cursor:pointer; color:var(--muted);
}
.auth-tab.is-active{ background:var(--primary); color:#fff; }
.auth-panel{ display:none; }
.auth-panel.is-active{ display:block; }
.form-group{ margin-bottom:14px; }
.form-label{ display:block; font-size:13px; font-weight:700; margin-bottom:6px; }
.form-input{
  width:100%; padding:11px 13px; border:1px solid var(--border); border-radius:var(--radius-btn);
  font-size:15px; background:#fff; color:var(--ink);
}
.form-input:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(107,78,255,.15); }
.form-hint{ font-size:12px; color:var(--muted); margin-top:6px; }
.form-msg{ font-size:13px; border-radius:8px; padding:10px 12px; margin-bottom:14px; display:none; }
.form-msg.is-error{ display:block; background:#fdecec; color:var(--error); }
.form-msg.is-success{ display:block; background:#e8f7f1; color:var(--success); }
.link-muted{ font-size:13px; color:var(--muted); }
.auth-foot{ text-align:center; margin-top:16px; font-size:13px; color:var(--muted); }

/* ---------- Dashboard (app.php) ---------- */
.app-shell{ min-height:100vh; display:flex; flex-direction:column; }
.app-topbar{
  background:#fff; border-bottom:1px solid var(--border); position:sticky; top:0; z-index:20;
}
.app-topbar-inner{
  display:flex; align-items:center; gap:14px; padding:12px 20px; max-width:1200px; margin:0 auto; flex-wrap:wrap;
}
.app-search{
  flex:1; min-width:140px; display:flex; align-items:center; gap:8px; background:var(--bg);
  border:1px solid var(--border); border-radius:var(--radius-btn); padding:9px 12px;
}
.app-search input{ border:none; background:transparent; outline:none; font-size:14px; width:100%; color:var(--ink); }
.badge{
  display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:800;
  padding:5px 10px; border-radius:999px; white-space:nowrap;
}
.badge-free{ background:#efeeff; color:var(--primary); }
.badge-pro{ background:#fff2df; color:#b6690b; }
.counter{ font-size:12px; color:var(--muted); font-weight:600; white-space:nowrap; }
.user-menu{ position:relative; }
.user-menu-btn{
  display:flex; align-items:center; gap:8px; background:transparent; border:1px solid var(--border);
  border-radius:999px; padding:6px 12px 6px 6px; cursor:pointer; font-size:13px; font-weight:700; color:var(--ink);
}
.user-avatar{
  width:26px; height:26px; border-radius:50%; background:var(--primary); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:800;
}
.user-menu-list{
  position:absolute; right:0; top:calc(100% + 8px); background:#fff; border:1px solid var(--border);
  border-radius:12px; box-shadow:var(--shadow-md); min-width:170px; padding:6px; display:none; z-index:30;
}
.user-menu-list.is-open{ display:block; }
.user-menu-list a, .user-menu-list button{
  display:block; width:100%; text-align:left; padding:9px 10px; border-radius:8px; border:none;
  background:transparent; font-size:14px; color:var(--ink); cursor:pointer;
}
.user-menu-list a:hover, .user-menu-list button:hover{ background:var(--bg); text-decoration:none; }

.app-main{ flex:1; max-width:1200px; margin:0 auto; padding:22px 20px 60px; width:100%; }
.app-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.tabs{ display:flex; gap:6px; }
.tab-btn{
  padding:8px 14px; border-radius:999px; border:1px solid var(--border); background:#fff;
  font-size:13px; font-weight:700; color:var(--muted); cursor:pointer;
}
.tab-btn.is-active{ background:var(--ink); color:#fff; border-color:var(--ink); }

.maps-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr)); gap:16px; }
.map-card{
  background:#fff; border:1px solid var(--border); border-radius:var(--radius-card);
  overflow:hidden; box-shadow:var(--shadow-sm); display:flex; flex-direction:column;
  transition: box-shadow .15s ease, transform .1s ease;
}
.map-card:hover{ box-shadow:var(--shadow-md); }
.map-thumb{
  background:var(--bg); aspect-ratio:16/10; display:flex; align-items:center; justify-content:center;
  cursor:pointer; border-bottom:1px solid var(--border);
}
.map-thumb svg{ width:70%; height:70%; }
.map-card-body{ padding:12px 14px; display:flex; flex-direction:column; gap:4px; flex:1; }
.map-card-title{
  font-size:14px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer;
}
.map-card-meta{ font-size:12px; color:var(--muted); }
.map-card-actions{ display:flex; align-items:center; gap:4px; padding:8px 10px; border-top:1px solid var(--border); }
.icon-btn{
  width:30px; height:30px; border-radius:8px; border:none; background:transparent; color:var(--muted);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.icon-btn:hover{ background:var(--bg); color:var(--ink); }
.icon-btn.is-fav{ color:#e8a838; }
.map-card-actions .spacer{ flex:1; }

.empty-state{
  text-align:center; padding:60px 20px; color:var(--muted); border:1px dashed var(--border);
  border-radius:var(--radius-card); background:#fff;
}
.empty-state svg{ margin:0 auto 14px; opacity:.6; }

/* ---------- Modais ---------- */
.modal-overlay{
  position:fixed; inset:0; background:rgba(25,22,39,.5); display:none; align-items:center;
  justify-content:center; padding:16px; z-index:100;
}
.modal-overlay.is-open{ display:flex; }
.modal{
  background:#fff; border-radius:var(--radius-card); box-shadow:var(--shadow-lg); width:100%;
  max-width:560px; max-height:90vh; overflow:auto; padding:22px;
}
.modal-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal-header h3{ font-size:18px; margin:0; }
.modal-close{ background:transparent; border:none; cursor:pointer; color:var(--muted); padding:4px; }
.modal-close:hover{ color:var(--ink); }

.template-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin-top:8px; }
.template-card{
  border:1px solid var(--border); border-radius:12px; padding:14px 12px; cursor:pointer; text-align:left;
  background:#fff; display:flex; flex-direction:column; gap:6px;
}
.template-card:hover{ border-color:var(--primary); box-shadow:var(--shadow-sm); }
.template-card strong{ font-size:13px; }
.template-card span{ font-size:12px; color:var(--muted); }

.plan-grid{ display:grid; grid-template-columns:1fr; gap:12px; margin-top:10px; }
.plan-card{
  border:1px solid var(--border); border-radius:12px; padding:16px; display:flex; align-items:center;
  justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.plan-card--featured{ border-color:var(--primary); background:#faf9ff; }
.plan-card h4{ margin:0 0 4px; font-size:15px; }
.plan-card p{ margin:0; font-size:13px; color:var(--muted); }

/* ---------- Toasts ---------- */
.toast-wrap{ position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; }
.toast{
  padding:11px 18px; border-radius:999px; font-size:13px; font-weight:700; color:#fff; box-shadow:var(--shadow-md);
  animation: toast-in .18s ease;
}
.toast-error{ background:var(--error); }
.toast-success{ background:var(--success); }
@keyframes toast-in{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none; } }

/* ---------- Paginas legais ---------- */
.legal-page .container{ max-width:760px; }
.legal-content h2{ font-size:20px; margin-top:32px; }
.legal-content p, .legal-content li{ color:var(--muted); font-size:15px; }
.legal-content ul{ padding-left:20px; list-style:disc; margin-bottom:1em; }
.legal-updated{ font-size:13px; color:var(--muted); margin-bottom:24px; }

/* ---------- Utilitarios ---------- */
.text-center{ text-align:center; }
.mt-0{ margin-top:0; }
.visually-hidden{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ---------- Responsivo ---------- */
@media (min-width:680px){
  .hero h1{ font-size:40px; }
  .features-grid{ grid-template-columns:repeat(2,1fr); }
  .pricing-grid{ grid-template-columns:repeat(3,1fr); }
  .steps{ grid-template-columns:repeat(3,1fr); }
  .plan-grid{ grid-template-columns:1fr; }
}
@media (min-width:860px){
  .hero-grid{ grid-template-columns:1.05fr .95fr; }
  .features-grid{ grid-template-columns:repeat(3,1fr); }
}
