/* Lar dos Idosos Selma Maria Reis · base comum (página inicial e sistema)
   Cores tiradas da logomarca: rosa do telhado, grafite do nome, verde-água da roupa da vovó. */
:root {
  --rosa: #f28daf;
  --rosa-forte: #b83a66;
  --rosa-claro: #fde8ef;
  --grafite: #383745;
  --texto: #26252e;
  --texto-2: #5f5e6b;
  --texto-3: #8a8995;
  --linha: #e8e3db;
  --linha-forte: #d6d0c5;
  --fundo: #fbf8f3;
  --cartao: #ffffff;
  --verde: #1b7f71;
  --verde-claro: #e0f3ef;
  --ambar: #9a5b00;
  --ambar-claro: #fff1d6;
  --vermelho: #b3261e;
  --vermelho-claro: #fdeceb;
  --foco: #2f6fdb;
  --raio: 12px;
  --raio-p: 8px;
  --sombra: 0 1px 2px rgba(38, 37, 46, .06), 0 4px 14px rgba(38, 37, 46, .06);
  --sombra-alta: 0 10px 40px rgba(38, 37, 46, .18);
  --fonte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fonte-titulo: "Poppins", var(--fonte);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--fonte-titulo); line-height: 1.25; margin: 0; color: var(--grafite); }
h1 { font-size: 1.6rem; font-weight: 600; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--rosa-forte); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .55rem 1.05rem;
  font: inherit; font-weight: 600; font-size: .97rem; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--raio-p);
  background: var(--grafite); color: #fff;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.botao:hover { background: #26252f; }
.botao:disabled { opacity: .55; cursor: default; }
.botao svg { width: 18px; height: 18px; flex: none; }
.botao.secundario { background: var(--cartao); color: var(--grafite); border-color: var(--linha-forte); }
.botao.secundario:hover { background: #f4f1ec; }
.botao.saida { background: var(--rosa-forte); }
.botao.saida:hover { background: #9e2f56; }
.botao.entrada { background: var(--verde); }
.botao.entrada:hover { background: #146a5e; }
.botao.perigo { background: var(--vermelho); }
.botao.leve { background: transparent; color: var(--grafite); border-color: transparent; padding-inline: .6rem; }
.botao.leve:hover { background: rgba(56, 55, 69, .07); }
.botao.pequeno { min-height: 36px; padding: .35rem .75rem; font-size: .9rem; }
.botao.cheio { width: 100%; }
.botao.carregando { position: relative; color: transparent !important; }
.botao.carregando::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: girar .7s linear infinite;
}
.botao.secundario.carregando::after, .botao.leve.carregando::after { border-color: rgba(56, 55, 69, .25); border-top-color: var(--grafite); }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- formulários ---------- */
.campo { display: grid; gap: .35rem; }
.campo > span, .rotulo { font-weight: 600; font-size: .92rem; color: var(--grafite); }
.campo small, .dica { color: var(--texto-2); font-size: .85rem; }
input[type=text], input[type=password], input[type=search], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .8rem;
  font: inherit; color: var(--texto);
  background: #fff; border: 1px solid var(--linha-forte); border-radius: var(--raio-p);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--grafite); box-shadow: 0 0 0 3px rgba(56, 55, 69, .14); }
input::placeholder, textarea::placeholder { color: var(--texto-3); }
.marcar { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; padding: .35rem 0; }
.marcar input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--grafite); flex: none; }
.senha-caixa { position: relative; }
.senha-caixa input { padding-right: 3.2rem; }
.senha-caixa button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 38px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--texto-2);
  display: grid; place-items: center;
}
.senha-caixa button svg { width: 20px; height: 20px; }
.erro-form { color: var(--vermelho); background: var(--vermelho-claro); border-radius: var(--raio-p); padding: .6rem .8rem; font-size: .93rem; }

/* ---------- avisos (toast) ---------- */
.avisos { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: grid; gap: .5rem; width: min(460px, calc(100% - 32px)); }
.aviso {
  display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem;
  background: var(--grafite); color: #fff; border-radius: var(--raio); box-shadow: var(--sombra-alta);
  animation: subir .2s ease-out;
}
.aviso.erro { background: var(--vermelho); }
.aviso p { flex: 1; font-size: .95rem; }
.aviso button { font: inherit; font-weight: 700; color: #ffd3e1; background: none; border: 0; cursor: pointer; padding: .3rem .4rem; border-radius: 6px; }
.aviso.erro button { color: #fff; }
@keyframes subir { from { transform: translateY(10px); opacity: 0; } }
