/* Portal de Chamados — identidade visual Prefeitura de Bueno Brandão (complementa o Tailwind) */

/* Reset de box-sizing: o portal foi feito assumindo border-box (herança do Tailwind),
   mas o Tailwind nao e mais carregado -> sem isto, input{width:100%;padding} estoura a
   largura e os campos "vazam" pra direita. border-box so afeta quem tem largura+padding. */
*, *::before, *::after { box-sizing: border-box; }

:root {
  /* >>> CORES DA MARCA — paleta do brasão de Bueno Brandão <<< */
  --brand:       #54643D;   /* verde oliva institucional (cor principal) */
  --accent:      #FFB95F;   /* dourado (detalhes/realce) */

  /* derivadas */
  --brand-dark:  #3d4a2c;
  --brand-soft:  #edf1e4;
  --accent-dark: #f0a032;
  --ink:         #2b3122;
  --paper:       #f4f2ec;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

/* fundo com leve profundidade */
.bg-portal {
  background:
    radial-gradient(1200px 480px at 100% -10%, rgba(84,100,61,.10), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(84,100,61,.06), transparent 60%),
    var(--paper);
}

/* ---- Barra de cabeçalho ---- */
.brand-bar {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-bottom: 3px solid var(--accent);
}
.brand-logo { height: 40px; width: auto; display: block; }
.brand-link { color: rgba(255,255,255,.92); }
.brand-link:hover { color: #fff; }

/* ---- Botões ---- */
.btn-brand { background: var(--brand); transition: background .15s ease, transform .05s ease; }
.btn-brand:hover  { background: var(--brand-dark); }
.btn-brand:active { transform: translateY(1px); }

/* acentos dourados */
.accent-bar { background: var(--accent); }
.text-accent { color: var(--accent); }

/* foco acessível */
.focus-ring:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(84,100,61,.20);
}

/* cards */
.card-tile { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.card-tile:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 12px 28px -12px rgba(84,100,61,.40);
}

/* rodapé */
.brand-footer { background: var(--brand-dark); color: rgba(255,255,255,.85); }
.brand-footer a { color: #fff; }

/* logo sobre fundo verde: disco branco para o brasão ficar nítido */
.logo-chip { background:#fff; border-radius:9999px; padding:4px; box-shadow:0 2px 8px rgba(0,0,0,.2); }

/* ============================================================
   TELA DE LOGIN — CSS próprio (duas colunas, sem depender do Tailwind)
   ============================================================ */
.login { display:flex; flex-direction:column; min-height:100vh; }
.login__aside {
  position:relative; overflow:hidden; color:#fff;
  display:flex; align-items:center; padding:56px 36px;
  background:linear-gradient(150deg,var(--brand) 0%,var(--brand-dark) 100%);
}
.login__accent { position:absolute; top:0; left:0; right:0; height:4px; background:var(--accent); }
.login__deco { position:absolute; border-radius:9999px; background:rgba(255,255,255,.06); pointer-events:none; }
.login__aside-in { position:relative; z-index:1; width:100%; max-width:520px; margin:0 auto; }
.login__brand { display:flex; align-items:center; gap:12px; margin-bottom:40px; }
.login__brand img { height:60px; width:60px; object-fit:contain; }
.login__brand strong { display:block; font-size:1.15rem; font-weight:800; line-height:1.2; }
.login__brand small { font-size:.85rem; color:rgba(255,255,255,.72); }
.login__tips-h { display:flex; align-items:center; gap:8px; }
.login__tips-h svg { width:26px; height:26px; color:var(--accent); }
.login__tips-h h2 { font-size:1.5rem; font-weight:800; }
.login__tips-sub { color:rgba(255,255,255,.72); margin:6px 0 28px; }
.tipcard { background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16); border-radius:16px; padding:24px; min-height:150px; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.tipcard__row { display:flex; align-items:flex-start; gap:16px; }
#tipIcon { flex:none; width:44px; height:44px; border-radius:12px; background:rgba(255,255,255,.15); display:flex; align-items:center; justify-content:center; }
#tipIcon svg { width:24px; height:24px; }
#tipTitle { font-weight:700; font-size:1.15rem; }
#tipText { color:rgba(255,255,255,.85); margin-top:4px; line-height:1.55; font-size:15px; }
#dots { display:flex; gap:8px; margin-top:20px; }
#dots button { height:8px; border:none; border-radius:9999px; padding:0; cursor:pointer; transition:width .3s; }

.login__main { flex:1; display:flex; align-items:center; justify-content:center; padding:24px;
  background:
    radial-gradient(1200px 480px at 100% -10%, rgba(84,100,61,.10), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(84,100,61,.06), transparent 60%),
    var(--paper);
}
.login__box { width:100%; max-width:400px; }
.login__mhead { text-align:center; margin-bottom:28px; }
.login__mhead img { height:70px; margin:0 auto 10px; display:block; }
.login__mhead h1 { font-size:1.4rem; font-weight:800; color:#1e2617; }
.login__mhead p { color:#6b7280; margin-top:2px; }
.login__card { background:#fff; border-radius:16px; padding:32px; border:1px solid #eceae3; box-shadow:0 22px 45px -22px rgba(45,55,30,.45); }
.login__card h2 { font-size:1.25rem; font-weight:800; color:#1e2617; }
.login__card .hint { font-size:.88rem; color:#6b7280; margin:4px 0 22px; }
.login__field { margin-bottom:16px; }
.login__field label { display:block; font-size:.85rem; font-weight:600; color:#374151; margin-bottom:6px; }
.login__field input { width:100%; padding:12px 15px; border:1px solid #cbd5e1; border-radius:12px; font-size:15px; font-family:inherit; color:var(--ink); outline:none; transition:border-color .15s, box-shadow .15s; }
.login__field input:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(84,100,61,.2); }
.login__err { display:none; background:#fef2f2; border:1px solid #fecaca; color:#991b1b; font-size:.88rem; border-radius:12px; padding:12px; margin-bottom:16px; }
.login__err.show { display:block; }
.login__btn { width:100%; border:none; color:#fff; font-weight:700; font-size:1rem; font-family:inherit; padding:13px; border-radius:12px; cursor:pointer; background:var(--brand); transition:background .15s; }
.login__btn:hover { background:var(--brand-dark); }
.login__btn:disabled { opacity:.5; cursor:not-allowed; }
.login__foot { text-align:center; font-size:.78rem; color:#6b7280; margin-top:22px; }

/* duas colunas IGUAIS (50/50) a partir de 900px */
@media (min-width:900px){
  .login { display:grid; grid-template-columns:1fr 1fr; align-items:stretch; }
  .login__aside { min-height:100vh; }
  .login__main  { min-height:100vh; }
  .login__mhead { display:none; }
}

/* balões do chat (detalhe do chamado) */
.msg-voce  { background: linear-gradient(135deg,#6d8050,var(--brand)); color:#fff; }
.msg-sup   { background:#fff; border:1px solid #e6e3dd; }

@media (prefers-reduced-motion: reduce) {
  .card-tile, .btn-brand { transition: none; }
  .card-tile:hover { transform: none; }
}

/* conteúdo HTML vindo do GLPI */
.rich-content img { max-width: 100%; height: auto; border-radius: 6px; }
.rich-content table { max-width: 100%; }
.rich-content a { color: var(--brand); text-decoration: underline; }
.rich-content p { margin: 0 0 8px; }
.rich-content p:last-child { margin-bottom: 0; }
