/* HakuMichi — sistema de design
   Paleta extraída diretamente da logomarca original (nunca hardcoded fora
   destas variáveis — trocar tema no futuro exige editar só os valores
   abaixo). */
:root{
  --navy: #05225F;
  --navy-deep: #031438;
  --navy-soft: #143A7A;
  --gold: #FCB304;
  --gold-soft: #FFD866;
  --cream: #F7F8FA;
  --white: #FFFFFF;
  --ink: #17233F;
  --ink-muted: #55617C;
  --border: #E3E7EF;
  --success: #1D8A4C;
  --danger: #C0392B;
  --radius: 16px;
  --shadow: 0 18px 45px -20px rgba(5,34,95,.28);
  --font-title: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height:1.55;
}
a{ color: var(--navy); text-decoration:none; }
a:hover{ text-decoration:underline; }
h1,h2,h3,h4{ font-family: var(--font-title); color: var(--navy); margin:0 0 .5em; }
img{ max-width:100%; display:block; }

.container{ max-width:1120px; margin:0 auto; padding:0 24px; }

/* ---------- Cabeçalho ---------- */
.site-header{
  background: var(--white);
  border-bottom:1px solid var(--border);
  position: sticky; top:0; z-index:50;
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:14px; padding-bottom:14px;
}
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--font-title); font-weight:700; font-size:1.4rem; }
.brand img{ height:40px; width:auto; }
.brand .haku{ color: var(--navy); }
.brand .michi{ color: var(--gold); }
nav.main-nav{ display:flex; align-items:center; gap:22px; font-weight:500; }
nav.main-nav a{ color: var(--ink); }
.btn{
  display:inline-block; padding:12px 22px; border-radius:999px;
  font-weight:600; border:none; cursor:pointer; font-family:var(--font-body);
  font-size:.95rem; transition:transform .15s ease, box-shadow .15s ease;
}
.btn-primary{ background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover{ text-decoration:none; transform:translateY(-1px); box-shadow: var(--shadow); }
.btn-outline{ background:transparent; border:2px solid var(--navy); color:var(--navy); padding:10px 20px; }
.btn-outline:hover{ text-decoration:none; background:var(--navy); color:var(--white); }
.btn-danger{ background: var(--danger); color:var(--white); }
.btn-block{ width:100%; text-align:center; }

/* ---------- Hero / busca ---------- */
.hero{
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  padding: 64px 0 90px;
  text-align:center;
}
.hero h1{ color:var(--white); font-size:2.4rem; }
.hero p.subtitle{ color:#D9E1F5; font-size:1.1rem; max-width:640px; margin:0 auto 28px; }
.search-box{
  background:var(--white); border-radius:999px; box-shadow: var(--shadow);
  display:flex; gap:8px; padding:8px; max-width:720px; margin:0 auto;
}
.search-box input, .search-box select{
  border:none; outline:none; padding:12px 16px; font-family:var(--font-body); font-size:1rem; flex:1; background:transparent;
}
.search-box button{ border-radius:999px; }

/* ---------- Cartões ---------- */
.card{
  background:var(--white); border-radius: var(--radius); border:1px solid var(--border);
  padding:24px; box-shadow: 0 8px 24px -18px rgba(5,34,95,.25);
}
.grid{ display:grid; gap:20px; }
.grid-2{ grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); }
.grid-3{ grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }

.card-vivo{
  border-radius: var(--radius); padding:22px; color:var(--white); font-weight:600;
}
.card-vivo.gold{ background: var(--gold); color: var(--navy-deep); }
.card-vivo.navy{ background: var(--navy); }

.result-card{
  display:flex; gap:18px; align-items:flex-start;
}
.result-card .avatar{
  width:72px; height:72px; border-radius:50%; background:var(--gold-soft);
  display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--navy); font-size:1.4rem; flex-shrink:0;
  overflow:hidden;
}
.result-card .avatar img{ width:100%; height:100%; object-fit:cover; }
.badge{
  display:inline-flex; align-items:center; gap:6px; font-size:.78rem; font-weight:600;
  background:#EAF7EE; color: var(--success); padding:4px 10px; border-radius:999px;
}

/* ---------- Formulários ---------- */
label{ display:block; font-weight:600; margin:14px 0 6px; font-size:.92rem; }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=time], input[type=number], select, textarea{
  width:100%; padding:12px 14px; border:1px solid var(--border); border-radius:10px;
  font-family:var(--font-body); font-size:1rem; background:var(--white);
}
textarea{ resize:vertical; min-height:90px; }
.form-hint{ color: var(--ink-muted); font-size:.85rem; margin-top:4px; }
.form-error{ background:#FDECEA; color:var(--danger); padding:12px 16px; border-radius:10px; margin-bottom:16px; font-size:.92rem; }
.form-success{ background:#EAF7EE; color:var(--success); padding:12px 16px; border-radius:10px; margin-bottom:16px; font-size:.92rem; }

.chip-select{ display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.chip{
  padding:8px 14px; border-radius:999px; border:2px solid var(--border);
  cursor:pointer; font-size:.88rem; font-weight:600; user-select:none; background:var(--white);
}
.chip.ativo{ border-color: var(--gold); background: var(--gold); color: var(--navy-deep); }

.editar-local-form{ display:none; }
.editar-local-form.aberto{ display:block; }

/* ---------- Perfil público ---------- */
.perfil-hero{
  background:var(--white); border-bottom:1px solid var(--border); padding:36px 0;
}
.perfil-hero .container{ display:flex; gap:26px; align-items:center; flex-wrap:wrap; }
.perfil-foto{
  width:120px; height:120px; border-radius:50%; border:4px solid var(--gold);
  overflow:hidden; background: var(--navy-soft); display:flex; align-items:center; justify-content:center;
  color:var(--white); font-size:2.2rem; font-weight:700;
}
.perfil-foto img{ width:100%; height:100%; object-fit:cover; }
.identificacao-cfm{ color:var(--ink-muted); font-size:.92rem; }

.footer-compliance{
  font-size:.78rem; color:#A9B4CC; max-width:680px; margin-top:10px; line-height:1.6;
}

/* ---------- Rodapé ---------- */
footer.site-footer{ background: var(--navy-deep); color:#C9D3EA; padding:48px 0 26px; margin-top:60px; }
footer.site-footer a{ color:#C9D3EA; }
.footer-grid{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap:40px;
  align-items:start;
}
.footer-col-brand{ max-width:420px; }
footer .footer-col p{ margin:0 0 10px; }
footer h4{ color:var(--white); font-size:.95rem; margin-bottom:14px; }

@media (max-width: 760px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .footer-col-brand{ grid-column: 1 / -1; max-width:none; margin-bottom:8px; }
}

/* ---------- Chatbot flutuante ---------- */
#chat-launcher{
  position:fixed; bottom:24px; right:24px; width:60px; height:60px; border-radius:50%;
  background:var(--gold); color:var(--navy-deep); display:flex; align-items:center; justify-content:center;
  font-size:1.6rem; border:none; cursor:pointer; box-shadow: var(--shadow); z-index:100;
}
#chat-panel{
  position:fixed; bottom:96px; right:24px; width:340px; max-width:calc(100vw - 32px);
  max-height:70vh; background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow);
  display:none; flex-direction:column; overflow:hidden; z-index:100; border:1px solid var(--border);
}
#chat-panel.aberto{ display:flex; }
#chat-header{ background:var(--navy); color:var(--white); padding:14px 18px; font-weight:700; display:flex; justify-content:space-between; align-items:center; }
#chat-header button{ background:none; border:none; color:var(--white); font-size:1.1rem; cursor:pointer; }
#chat-messages{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.msg{ padding:10px 14px; border-radius:14px; max-width:85%; font-size:.92rem; }
.msg.bot{ background:var(--cream); align-self:flex-start; }
.msg.user{ background:var(--gold); color:var(--navy-deep); align-self:flex-end; }
#chat-options{ display:flex; flex-wrap:wrap; gap:8px; padding:0 16px 16px; }
#chat-options button{
  border:2px solid var(--navy); background:var(--white); color:var(--navy);
  border-radius:999px; padding:8px 14px; font-size:.85rem; cursor:pointer; font-weight:600;
}
#chat-options button:hover{ background:var(--navy); color:var(--white); }
#chat-input-row{ display:flex; border-top:1px solid var(--border); }
#chat-input-row input{ border:none; flex:1; padding:14px; }
#chat-input-row button{ background:var(--navy); color:var(--white); border:none; padding:0 18px; cursor:pointer; }

@media (max-width: 640px){
  .hero{ padding:40px 0 70px; }
  .hero h1{ font-size:1.7rem; }
  .search-box{ flex-direction:column; border-radius:20px; }
}
