:root {
  --bg:        #F1F5F9;
  --card:      #FFFFFF;
  --border:    #E2E8F0;
  --accent:    #3B82F6;
  --accent-bg: #EFF6FF;
  --accent2:   #2563EB;
  --success:   #059669;
  --danger:    #DC2626;
  --danger-bg: #FEE2E2;
  --danger-bg2:#FECACA;
  --text:      #1C1C1C;
  --text2:     #334155;
  --muted:     #94A3B8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hind", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1, h2 {
  font-family: "Fjalla One", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 400;
}

a { text-decoration: none; color: inherit; }

.avisos { max-width: 480px; margin: 16px auto 0; }
.aviso { padding: 10px 14px; border-radius: 6px; font-size: 15px; margin-bottom: 8px; }
.aviso.success { background: #ECFDF5; color: var(--success); }
.aviso.error   { background: var(--danger-bg); color: var(--danger); }

.errorlist {
  color: var(--danger); font-size: 13px; font-weight: 600;
  list-style: none; padding: 8px 12px; margin: 4px 0 16px;
  background: var(--danger-bg); border: 1px solid var(--danger-bg2);
  border-radius: 6px;
}
.errorlist li::before { content: "⚠ "; }

.form-row { margin-bottom: 14px; }
label.rotulo { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 3px; }

.input, input[type=text], input[type=password] {
  width: 100%;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primario { background: var(--accent); color: #fff; }
.btn-primario:hover { background: var(--accent2); }
.btn-secundario { background: var(--border); color: var(--text2); font-weight: 400; }
.btn-secundario:hover { background: #dfe6ee; }
.btn-full { width: 100%; text-align: center; }

/* ── Login ───────────────────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}
.login-card h1 { font-size: 26px; margin: 0; }
.login-card .sub { color: var(--muted); font-size: 14px; margin: 4px 0 24px; }
.login-card form { text-align: left; }

/* ── Home / grade de ícones ──────────────────────────────────────────── */

.home-wrap { max-width: 640px; margin: 0 auto; padding: 40px 20px; }
.home-topo {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.home-topo h1 { font-size: 24px; margin: 0; }
.home-topo .sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 20px;
}
.icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 16px;
  transition: background .15s ease, transform .1s ease;
}
.icon-tile:hover { background: var(--accent-bg); transform: translateY(-2px); }
.icon-emoji {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.icon-label { font-size: 13px; color: var(--text2); text-align: center; font-weight: 600; }

.vazio { padding: 40px; text-align: center; color: var(--muted); font-size: 15px; }

@media (max-width: 480px) {
  .icon-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}
