/* ===== HOME JOHN · REDESIGN V3 =====
 * Mantém o nome publicado (home-redesign-v2.css) para não alterar os scripts
 * de deploy. Visual sóbrio: saudação em texto, atalhos numa grade única com
 * divisórias finas, ícones neutros, laranja só como acento (item ativo,
 * "Novo" e aviso). Todas as cores vêm das variáveis do tema (--bg, --sf, --s2,
 * --bd, --tx, --t2, --t3, --ac), então o tema claro funciona sem regra extra.
 */

body.john-home-redesign-v2 .john-home-main{
  width:100%;
  max-width:none;
  box-sizing:border-box;
  padding:40px 40px 64px;
}

/* ---------- Saudação ---------- */
body.john-home-redesign-v2 .john-home-hero{
  position:static;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  column-gap:24px;
  max-width:none;
  min-height:0;
  margin:0 0 32px;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  overflow:visible;
}
body.john-home-redesign-v2 .john-home-hero:before,
body.john-home-redesign-v2 .john-home-hero:after{display:none}
body.john-home-redesign-v2 .john-home-eyebrow{display:none}
body.john-home-redesign-v2 .john-home-title{
  grid-column:1;
  font-size:2rem;
  font-weight:650;
  letter-spacing:-.025em;
  line-height:1.2;
}
body.john-home-redesign-v2 .john-home-title:after{content:none}
body.john-home-redesign-v2 .john-home-subtitle{
  grid-column:1;
  margin:5px 0 0;
  max-width:none;
  color:var(--t2);
  font-size:1rem;
  font-weight:450;
  line-height:1.4;
}
body.john-home-redesign-v2 .john-home-hero-meta{
  grid-column:2;
  grid-row:1 / span 2;
  align-self:end;
  position:static;
  transform:none;
  max-width:none;
  text-align:right;
}
body.john-home-redesign-v2 .john-home-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--t3);
  font-size:.88rem;
  white-space:nowrap;
}
body.john-home-redesign-v2 .john-home-status[hidden]{display:none}
body.john-home-redesign-v2 .john-home-status-dot{
  width:6px;height:6px;border-radius:50%;
  background:#22a06b;
  flex:0 0 6px;
}
body.john-home-redesign-v2 .john-home-status.is-dismissed .john-home-status-dot{background:var(--ac)}
body.john-home-v1 #johnHomeStatusAction{
  height:auto!important;min-height:0!important;
  padding:0!important;margin:0!important;
  border:0!important;background:none!important;box-shadow:none!important;
  color:var(--tx)!important;
  font:600 .76rem 'Inter',sans-serif!important;
  text-decoration:underline;text-underline-offset:3px;
  cursor:pointer!important;
}

/* ---------- Avisos ----------
 * Sem caixa vazia quando não há aviso: o estado aparece na linha de status da
 * saudação. Quando existe aviso, ele vira uma faixa discreta e dispensável. */
body.john-home-redesign-v2 .john-home-avisos-head,
body.john-home-redesign-v2 .john-home-notice-empty{display:none!important}

body.john-home-redesign-v2 .john-home-notice{
  position:relative;
  align-items:flex-start;
  gap:12px;
  min-height:0;
  margin:0 0 32px;
  padding:14px 14px 14px 16px;
  border:1px solid var(--bd);
  border-radius:10px;
  background:var(--sf);
  box-shadow:none;
}
body.john-home-redesign-v2 .john-home-notice.is-dismissed{display:none!important}
body.john-home-redesign-v2 .john-home-notice:before{display:none}
body.john-home-redesign-v2 .john-home-notice-icon{
  width:20px;height:20px;flex:0 0 20px;
  margin-top:1px;
  border:0;border-radius:0;
  background:none;
  color:var(--ac);
}
body.john-home-redesign-v2 .john-home-notice-icon svg{width:18px;height:18px}
body.john-home-redesign-v2 .john-home-notice-label{display:none}
body.john-home-redesign-v2 .john-home-notice-title{
  font-size:1rem;
  font-weight:600;
  line-height:1.4;
}
body.john-home-redesign-v2 .john-home-notice-message{
  margin-top:2px;
  font-size:.9rem;
  line-height:1.5;
  color:var(--t2);
}
body.john-home-redesign-v2 .john-home-notice-meta{
  margin-top:6px;
  font-size:.7rem;
  color:var(--t3);
}
body.john-home-redesign-v2 .john-home-notice-meta:empty{display:none}
body.john-home-v1.john-home-redesign-v2 .john-home-notice-action{
  align-self:center;
  height:32px!important;min-height:32px!important;
  padding:0 12px!important;
  border:1px solid var(--bd)!important;
  border-radius:7px;
  background:transparent!important;
  color:var(--tx);
  font:600 .74rem 'Inter',sans-serif;
  transform:none;
}
body.john-home-v1.john-home-redesign-v2 .john-home-notice-action:hover{
  background:var(--s2)!important;
  border-color:var(--bd)!important;
  transform:none;
}
body.john-home-v1 #johnHomeNoticeDismiss{
  flex:0 0 28px;
  align-self:flex-start;
  display:inline-flex!important;
  align-items:center;justify-content:center;
  width:28px!important;height:28px!important;min-height:28px!important;
  padding:0!important;margin:-4px -4px 0 0!important;
  border:0!important;border-radius:6px!important;
  background:none!important;box-shadow:none!important;
  color:var(--t3)!important;
  cursor:pointer!important;
}
body.john-home-v1 #johnHomeNoticeDismiss:hover{background:var(--s2)!important;color:var(--tx)!important}
body.john-home-v1 #johnHomeNoticeDismiss svg{width:15px;height:15px}

/* ---------- Cabeçalho das seções ---------- */
body.john-home-redesign-v2 .john-home-access{max-width:none;margin-top:0}
body.john-home-redesign-v2 .john-home-section-head{
  align-items:center;
  margin-bottom:12px;
}
body.john-home-redesign-v2 .john-home-section-title{
  font-size:.9rem;
  font-weight:500;
  color:var(--t2);
  letter-spacing:0;
}
body.john-home-redesign-v2 .john-home-section-sub{display:none}
body.john-home-redesign-v2 .john-home-section-count{
  font-size:.72rem;
  color:var(--t3);
  white-space:nowrap;
}

/* ---------- Atalhos: grade única com divisórias de 1px ---------- */
body.john-home-redesign-v2 .john-home-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1px;
  border:1px solid var(--bd);
  border-radius:10px;
  background:var(--bd);
  overflow:hidden;
}
body.john-home-redesign-v2 .john-home-card-filler{background:var(--bg)}
body.john-home-redesign-v2 .john-home-empty{border:0;border-radius:0;background:var(--bg)}

body.john-home-redesign-v2 #johnHomeCards > button.john-home-card{
  min-height:144px!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:10px!important;
  padding:24px 26px 28px!important;
  border:0!important;
  border-radius:0!important;
  background:var(--bg)!important;
  box-shadow:none!important;
  transition:background .12s ease!important;
}
body.john-home-redesign-v2 #johnHomeCards > button.john-home-card:hover,
body.john-home-redesign-v2 #johnHomeCards > button.john-home-card:active{
  border:0!important;
  background:var(--sf)!important;
  box-shadow:none!important;
}
body.john-home-redesign-v2 #johnHomeCards > button.john-home-card:focus-visible{
  outline:2px solid var(--t3)!important;
  outline-offset:-2px!important;
}

body.john-home-redesign-v2 .john-home-card-icon,
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:hover .john-home-card-icon,
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:active .john-home-card-icon{
  width:18px;height:20px;flex:0 0 18px;
  margin:0;
  border:0;border-radius:0;
  background:none;
  color:var(--t3);
}
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:hover .john-home-card-icon{color:var(--tx)}
body.john-home-redesign-v2 .john-home-card-icon svg{width:18px;height:18px}

body.john-home-redesign-v2 .john-home-card-copy{display:block;flex:1;min-width:0;padding:0}
body.john-home-redesign-v2 .john-home-card-title{
  font-size:1.02rem;
  font-weight:600;
  line-height:1.35;
}
body.john-home-redesign-v2 [data-home-module="ra-v2"] .john-home-card-title:after{
  content:'Novo';
  margin-left:8px;
  color:var(--ac);
  font-size:.7rem;
  font-weight:600;
}
body.john-home-redesign-v2 .john-home-card-desc{
  max-width:320px;
  margin-top:5px;
  font-size:.88rem;
  line-height:1.5;
  color:var(--t3);
}
body.john-home-redesign-v2 .john-home-card-kbd{
  flex:0 0 auto;
  display:inline-flex;align-items:center;justify-content:center;
  min-width:19px;height:19px;
  padding:0 5px;
  border:1px solid var(--bd);
  border-radius:4px;
  background:var(--sf);
  color:var(--t3);
  font:500 .66rem 'Inter',sans-serif;
  line-height:1;
}
body.john-home-redesign-v2 .john-home-card-open{display:none}
body.john-home-redesign-v2 .john-home-card-arrow,
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:hover .john-home-card-arrow,
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:active .john-home-card-arrow{
  position:absolute;
  left:auto;right:18px;top:auto;bottom:16px;
  width:16px;height:16px;
  border:0;
  color:var(--tx);
  opacity:0;
  transform:translateX(-4px);
  transition:opacity .12s ease,transform .12s ease;
}
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:hover .john-home-card-arrow,
body.john-home-v1.john-home-redesign-v2 #johnHomeCards > button.john-home-card:focus-visible .john-home-card-arrow{
  opacity:1;
  transform:none;
}

/* Remove badges da versão anterior do card. */
body.john-home-redesign-v2 #johnHomeCards > button.john-home-card:before{content:none!important;display:none!important}

/* ---------- Acessados recentemente ---------- */
body.john-home-redesign-v2 .john-home-recent{margin-top:36px}
body.john-home-redesign-v2 .john-home-recent[hidden]{display:none}
body.john-home-v1 #johnHomeRecentClear{
  height:auto!important;min-height:0!important;
  padding:0!important;
  border:0!important;background:none!important;box-shadow:none!important;
  color:var(--t3)!important;
  font:500 .72rem 'Inter',sans-serif!important;
  cursor:pointer!important;
}
body.john-home-v1 #johnHomeRecentClear:hover{color:var(--tx)!important}
body.john-home-redesign-v2 .john-home-recent-list{list-style:none;margin:0;padding:0}
body.john-home-redesign-v2 .john-home-recent-list > li + li{border-top:1px solid var(--bd)}
body.john-home-v1 #johnHomeRecentList button.john-home-recent-item{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  height:auto!important;min-height:42px!important;
  padding:0 8px!important;
  border:0!important;border-radius:6px!important;
  background:none!important;box-shadow:none!important;
  color:var(--tx)!important;
  font:450 .82rem 'Inter',sans-serif!important;
  text-align:left!important;
  cursor:pointer!important;
}
body.john-home-v1 #johnHomeRecentList button.john-home-recent-item:hover{background:var(--sf)!important}
body.john-home-redesign-v2 .john-home-recent-icon{display:inline-flex;color:var(--t3)}
body.john-home-redesign-v2 .john-home-recent-icon svg{width:15px;height:15px}
body.john-home-redesign-v2 .john-home-recent-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.john-home-redesign-v2 .john-home-recent-time{
  color:var(--t3);
  font-size:.82rem;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

/* ---------- Badge "Novo" no menu contextual do RA e Senha V2 ---------- */
body.john-home-v1 .sb-v230-import-list > .john-ra-v2-new-menu{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
body.john-home-v1 .sb-v230-import-list > .john-ra-v2-new-menu:after{
  content:'Novo';
  order:1;
  margin-left:auto;
  color:var(--ac);
  font-size:.66rem;
  font-weight:600;
  line-height:1;
}
body.john-home-v1 .sb-v230-import-list > .john-ra-v2-new-menu > :last-child{
  order:2;
  margin-left:0!important;
}

/* ---------- Responsivo ---------- */
@media(max-width:1100px){
  body.john-home-redesign-v2 .john-home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px),(pointer:coarse){
  body.john-home-redesign-v2 .john-home-card-kbd,
  body.john-home-redesign-v2 .john-home-section-count{display:none}
}
@media(max-width:760px){
  body.john-home-redesign-v2 .john-home-main{padding:28px 18px 46px}
  body.john-home-redesign-v2 .john-home-hero{grid-template-columns:1fr;margin-bottom:24px}
  body.john-home-redesign-v2 .john-home-hero-meta{grid-column:1;grid-row:auto;margin-top:12px;text-align:left}
  body.john-home-redesign-v2 .john-home-title{font-size:1.4rem}
  body.john-home-redesign-v2 .john-home-notice{flex-wrap:wrap}
  body.john-home-v1.john-home-redesign-v2 .john-home-notice-action{margin-left:32px}
  body.john-home-redesign-v2 .john-home-grid{grid-template-columns:1fr}
  body.john-home-redesign-v2 #johnHomeCards > button.john-home-card{min-height:0!important;padding:16px!important}
  body.john-home-redesign-v2 .john-home-card-arrow{opacity:.6;transform:none}
}

/* Avisos múltiplos: mesma faixa visual, dispensa individual. */
body.john-home-v1 .john-home-notice-dismiss{
  flex:0 0 28px;align-self:flex-start;display:inline-flex!important;
  align-items:center;justify-content:center;width:28px!important;height:28px!important;
  min-height:28px!important;padding:0!important;margin:-4px -4px 0 0!important;
  border:0!important;border-radius:6px!important;background:none!important;
  box-shadow:none!important;color:var(--t3)!important;font-size:21px!important;cursor:pointer;
}
body.john-home-v1 .john-home-notice-dismiss:hover{background:var(--s2)!important;color:var(--tx)!important}
.john-avisos-manager{margin-bottom:20px;padding:20px;border:1px solid var(--bd);border-radius:12px;background:var(--sf)}
.john-avisos-manager-head,.john-aviso-editor-row{display:flex;align-items:center;justify-content:space-between;gap:16px}
.john-avisos-manager-head{margin-bottom:12px}
.john-aviso-editor-row{padding:12px 0;border-top:1px solid var(--bd)}
.john-aviso-editor-row span{min-width:0;overflow-wrap:anywhere}
#johnAvisoEditorTitle{padding:18px 20px 0}
@media(max-width:760px){.john-avisos-manager-head,.john-aviso-editor-row{flex-wrap:wrap}}

/* Comunicados próximos entre si, com destaque azul nos dois temas. */
body.john-home-redesign-v2 #johnHomeNotices{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:28px;
}
body.john-home-redesign-v2 #johnHomeNotices:empty{display:none;margin-bottom:0}
body.john-home-redesign-v2 #johnHomeNotices:not(:has(> section:not([hidden]))){display:none;margin-bottom:0}
body.john-home-redesign-v2 #johnHomeNotices > .john-home-notice{
  margin:0;
  border-color:rgba(96,165,250,.32);
  background:linear-gradient(rgba(59,130,246,.09),rgba(59,130,246,.09)),var(--sf);
}
body.john-home-redesign-v2 #johnHomeNotices .john-home-notice-icon{color:#60a5fa}
body[data-theme=light].john-home-redesign-v2 #johnHomeNotices > .john-home-notice{
  border-color:rgba(37,99,235,.25);
  background:linear-gradient(rgba(59,130,246,.065),rgba(59,130,246,.065)),var(--sf);
}
body[data-theme=light].john-home-redesign-v2 #johnHomeNotices .john-home-notice-icon{color:#2563eb}

/* Azul da referência: título e mensagem com separação mais confortável. */
body.john-home-redesign-v2 #johnHomeNotices > .john-home-notice{
  background:#121b36;
  border-color:rgba(59,130,246,.22);
}
body.john-home-redesign-v2 #johnHomeNotices .john-home-notice-title{color:#93c5fd}
body.john-home-redesign-v2 #johnHomeNotices .john-home-notice-message{
  margin-top:10px;
  color:#60a5fa;
}
body.john-home-redesign-v2 #johnHomeNotices .john-home-notice-meta{color:#8da7cd}
body[data-theme=light].john-home-redesign-v2 #johnHomeNotices > .john-home-notice{
  background:#eff6ff;
  border-color:#bfdbfe;
}
body[data-theme=light].john-home-redesign-v2 #johnHomeNotices .john-home-notice-title{color:#1e40af}
body[data-theme=light].john-home-redesign-v2 #johnHomeNotices .john-home-notice-message{color:#1d4ed8}
body[data-theme=light].john-home-redesign-v2 #johnHomeNotices .john-home-notice-meta{color:#526d96}

/* Issue #471 — cor configurável por aviso e prévia no editor. */
body [data-notice-color="azul"]{--notice-bg:#121b36;--notice-border:#1e3a5f;--notice-title:#93c5fd;--notice-text:#60a5fa;--notice-meta:#8da7cd}
body[data-theme=light] [data-notice-color="azul"]{--notice-bg:#eff6ff;--notice-border:#bfdbfe;--notice-title:#1e40af;--notice-text:#1d4ed8;--notice-meta:#526d96}
body [data-notice-color="roxo"]{--notice-bg:#211735;--notice-border:#5b357d;--notice-title:#d8b4fe;--notice-text:#c084fc;--notice-meta:#b59cca}
body[data-theme=light] [data-notice-color="roxo"]{--notice-bg:#faf5ff;--notice-border:#d8b4fe;--notice-title:#6b21a8;--notice-text:#7e22ce;--notice-meta:#77618c}
body [data-notice-color="verde"]{--notice-bg:#102b23;--notice-border:#245744;--notice-title:#a7f3d0;--notice-text:#6ee7b7;--notice-meta:#8fb9aa}
body[data-theme=light] [data-notice-color="verde"]{--notice-bg:#ecfdf5;--notice-border:#a7f3d0;--notice-title:#065f46;--notice-text:#047857;--notice-meta:#527a6c}
body [data-notice-color="amarelo"]{--notice-bg:#2b2413;--notice-border:#6b5524;--notice-title:#fde68a;--notice-text:#fcd34d;--notice-meta:#c2b287}
body[data-theme=light] [data-notice-color="amarelo"]{--notice-bg:#fffbeb;--notice-border:#fde68a;--notice-title:#78350f;--notice-text:#92400e;--notice-meta:#846e44}
body [data-notice-color="vermelho"]{--notice-bg:#321a23;--notice-border:#713343;--notice-title:#fecdd3;--notice-text:#fda4af;--notice-meta:#c69ba5}
body[data-theme=light] [data-notice-color="vermelho"]{--notice-bg:#fff1f2;--notice-border:#fecdd3;--notice-title:#9f1239;--notice-text:#be123c;--notice-meta:#8e6370}
body [data-notice-color="cinza"]{--notice-bg:#1e293b;--notice-border:#475569;--notice-title:#e2e8f0;--notice-text:#cbd5e1;--notice-meta:#94a3b8}
body[data-theme=light] [data-notice-color="cinza"]{--notice-bg:#f8fafc;--notice-border:#cbd5e1;--notice-title:#334155;--notice-text:#475569;--notice-meta:#64748b}
body.john-home-redesign-v2 #johnHomeNotices > .john-home-notice[data-notice-color],body .john-aviso-color-preview[data-notice-color]{background:var(--notice-bg)!important;border:1px solid var(--notice-border)!important}
body.john-home-redesign-v2 #johnHomeNotices [data-notice-color] .john-home-notice-title,body .john-aviso-color-preview .john-home-notice-title{color:var(--notice-title)!important}
body.john-home-redesign-v2 #johnHomeNotices [data-notice-color] .john-home-notice-message,body.john-home-redesign-v2 #johnHomeNotices [data-notice-color] .john-home-notice-icon,body .john-aviso-color-preview .john-home-notice-message{color:var(--notice-text)!important}
body.john-home-redesign-v2 #johnHomeNotices [data-notice-color] .john-home-notice-meta{color:var(--notice-meta)!important}
body .john-aviso-color-preview{padding:12px 14px;border-radius:8px;margin-top:8px;font-size:12px}
body .john-aviso-color-preview .john-home-notice-message{margin-top:8px}

/* Issue #473 — ação ao final do aviso, no canto inferior direito. */
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices > .john-home-notice{flex-wrap:wrap!important;align-items:flex-start!important}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-copy{box-sizing:border-box;flex:1 0 calc(100% - 32px)!important;min-width:0!important;padding-right:0}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-action{order:3!important;align-self:flex-end!important;flex:0 0 auto!important;margin:0 0 0 auto!important;max-width:100%!important;white-space:normal!important;text-align:center}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-dismiss{position:absolute!important;top:12px!important;right:12px!important;margin:0!important}

/* Issue #475 — avisos inicialmente recolhidos; expansão nativa por teclado e clique. */
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-summary{display:flex!important;align-items:center;justify-content:space-between;gap:16px;list-style:none;cursor:pointer;min-height:24px}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-summary::-webkit-details-marker{display:none}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-summary:focus-visible{outline:2px solid var(--notice-text,var(--ac));outline-offset:4px;border-radius:4px}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-summary .john-home-notice-title{min-width:0;overflow-wrap:anywhere}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-notice-expand,body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-notice-collapse{flex:0 0 auto;color:var(--notice-text,var(--t2));font-size:11px;text-decoration:underline;text-underline-offset:3px}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-content{display:none!important}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices details[open]>.john-home-notice-content{display:flex!important;flex-direction:column;align-items:stretch}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-notice-collapse,body.john-home-v1.john-home-redesign-v2 #johnHomeNotices details[open] .john-notice-expand{display:none}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices details[open] .john-notice-collapse{display:inline}
body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-content .john-home-notice-action{margin-top:12px!important}
@media(max-width:480px){body.john-home-v1.john-home-redesign-v2 #johnHomeNotices .john-home-notice-summary{gap:8px;flex-wrap:wrap}}
