/* ===============================
   APP - CSS GLOBAL (Reutilizável)
   =============================== */

/* ---------- Variáveis ----------
   Serão sobrescritas via <style> inline (cores) vindo do config.json
*/
:root {
  --app-primary: #0d6efd;
  --app-primary-2: #2f86ff;

  --app-bg: #f7f9fc;
  --app-bg-soft: #eef2f7;

  --app-card-radius: 18px;
  --app-btn-radius: 12px;

  --app-shadow-soft: 0 18px 60px rgba(16,24,40,.10);
}

/* ---------- Base ---------- */
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(13,110,253,.10) 0%, rgba(232,240,255,0) 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(25,135,84,.08) 0%, rgba(230,255,243,0) 55%),
    linear-gradient(180deg, var(--app-bg) 0%, var(--app-bg-soft) 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Navbar ---------- */
.app-navbar {
  background: linear-gradient(
    90deg,
    var(--app-primary) 0%,
    var(--app-primary-2) 100%
  );
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* ---------- Brand / Logo ---------- */
.app-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.app-logo{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  flex: 0 0 40px; /* impede deformar */
}

/* quando for ÍCONE */
.app-logo i{
  font-size: 22px;
  color: #fff;
  opacity: .95;
}

/* quando for IMAGEM */
.app-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;   /* ✅ evita brasão gigante/cortado */
  display: block;
  padding: 4px;          /* ✅ dá respiro p/ brasão */
}

/* Texto do brand (nome + subtítulo) */
.app-brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.app-brand-text .app-name{
  font-weight: 800;
  letter-spacing: .02em;
}

.app-brand-text .app-sub{
  font-size: .82rem;
  opacity: .85;
  font-weight: 500;
  margin-top: 2px;
}

/* ---------- Responsividade ---------- */
@media (max-width: 768px) {
  .app-brand-text {
    display: none; /* esconde textos no mobile, mantém só o logo */
  }
}


/* ---------- Botões ---------- */
.btn {
  border-radius: var(--app-btn-radius);
  font-weight: 600;
}

.btn-primary {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

.btn-primary:hover {
  filter: brightness(.95);
}

.btn-soft {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
}

.btn-soft:hover {
  background: rgba(255,255,255,.28);
}

/* ---------- Cards ---------- */
.app-card {
  border: 0;
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-shadow-soft);
  transition: transform .12s ease, box-shadow .12s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 70px rgba(16,24,40,.14);
}

/* ---------- Ícones de módulo ---------- */
.app-module-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--app-primary) 10%, transparent);
  color: var(--app-primary);
  font-size: 28px;
  margin: 0 auto 10px auto;
}

/* ---------- Texto ---------- */
.app-title {
  font-weight: 800;
  letter-spacing: .05em;
}

.app-subtitle {
  color: #6c757d;
  font-size: .9rem;
}

/* ---------- Inputs ---------- */
.form-control,
.input-group-text {
  border-radius: 14px !important;
}

/* ---------- Utilidades ---------- */
.app-shadow {
  box-shadow: var(--app-shadow-soft);
}

.app-muted {
  color: #6c757d;
  font-size: .85rem;
}
/* garante que a logo do header nunca estoura */
.app-logo img{
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}
