:root {
	--green: #0B7A3B;
	--green-dark: #075226;
	--green-soft: #E1F2E6;
	--brand-ink: #0A5C2D;
	--on-brand: #E3F2E8;
	--brand-border: #075226;
	--gold: #F2B90F;
	--ink: #17201B;
	--muted: #55605A;
	--line: #D9DDD3;
	--bg: #F7F7F7;
	--card: #FFFFFF;
	--danger: #B3261E;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.2; }
h2 { font-size: 18px; line-height: 1.25; }
h3 { font-size: 15px; margin-top: 6px; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.pa-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.pa-muted { color: var(--muted); font-size: 14px; }
.pa-empty { color: var(--muted); padding: 24px 0; text-align: center; }

/* Topo */
.pa-header { background: var(--green); color: #fff; border-bottom: 6px solid var(--gold); }
.pa-header-in { display: flex; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 14px; }
.pa-logo { width: 48px; height: 48px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; flex-shrink: 0; }
.pa-header-txt { flex: 1; min-width: 0; }
.pa-hello { font-size: 20px; font-weight: 700; line-height: 1.2; }
.pa-sub { font-size: 14px; color: var(--on-brand); }
.pa-header .pa-link-btn { color: #fff; }

/* Menu */
.pa-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.pa-nav-in { display: flex; gap: 4px; overflow-x: auto; }
.pa-nav a {
	flex-shrink: 0; min-height: 48px; padding: 0 12px; display: flex; align-items: center;
	color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
	border-bottom: 3px solid transparent;
}
.pa-nav a.on { color: var(--green); border-bottom-color: var(--green); }

.pa-main { padding-top: 16px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 14px; }

/* Cartões */
.pa-card {
	background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
	display: flex; flex-direction: column; gap: 10px;
}
.pa-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pa-card h2 a { color: var(--ink); text-decoration: none; }
.pa-card h2 a:hover { color: var(--green); }
.pa-feed { display: flex; flex-direction: column; gap: 12px; }
.pa-text { color: #3A443E; }
.pa-text p + p { margin-top: 10px; }
.pa-single h1 { font-size: 24px; }

.pa-tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.pa-tag.noticia { background: var(--green-soft); color: var(--brand-ink); }
.pa-tag.aviso { background: #FBF0D9; color: #7A4F00; }
.pa-tag.video { background: #E1ECF7; color: #1D4E89; }

.pa-thumb { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #222; }
.pa-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pa-play {
	position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
	border-radius: 50%; background: rgba(0, 0, 0, .65); border: 2px solid #fff;
}
.pa-play::after {
	content: ""; position: absolute; left: 25px; top: 18px;
	border-style: solid; border-width: 13px 0 13px 20px; border-color: transparent transparent transparent #fff;
}
.pa-video { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #222; }
.pa-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pa-back { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }

/* Filtros */
.pa-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.pa-chips a {
	flex-shrink: 0; min-height: 44px; padding: 0 16px; display: flex; align-items: center;
	border: 1px solid #AEB5AA; border-radius: 22px; background: #fff; color: var(--ink);
	font-size: 14px; font-weight: 600; text-decoration: none;
}
.pa-chips a.on { background: var(--green); border-color: var(--green); color: #fff; }

/* Botões */
.pa-btn {
	min-height: 50px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--green); color: #fff;
	font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
.pa-btn:hover { background: var(--green-dark); color: #fff; }
.pa-btn.sec { background: #fff; color: var(--green); border: 1px solid var(--green); }
.pa-btn.sec:hover { background: var(--green-soft); color: var(--green-dark); }
.pa-btn.gold { background: var(--gold); color: #1A1A1A; }
.pa-btn.gold:hover { background: #DBA608; color: #1A1A1A; }
.pa-btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.pa-whats { width: 100%; }
.pa-link-btn {
	min-height: 44px; padding: 0 8px; background: none; border: 0; color: var(--green);
	font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: underline;
}
.pa-link-btn.danger { color: var(--danger); }

/* Formulários */
.pa-form { display: flex; flex-direction: column; gap: 8px; }
.pa-form label, .pa-inline label, .pa-flash label, .pa-seg legend { font-size: 14px; font-weight: 700; margin-top: 6px; }
.pa-form .pa-btn { margin-top: 10px; }
input[type="text"], input[type="password"], input[type="url"], input[type="tel"], input[type="search"], select, textarea {
	width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid #8F978C; border-radius: 10px;
	background: #fff; color: var(--ink); font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input[type="file"] { font: inherit; min-height: 44px; }
.pa-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.pa-inline label { width: 100%; margin: 0; }
.pa-inline input, .pa-inline select { flex: 1 1 180px; width: auto; min-height: 44px; }
.pa-check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; min-height: 44px; }
.pa-seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pa-seg legend { padding: 0; margin-bottom: 6px; }
.pa-seg label { flex: 1 1 100px; margin: 0; position: relative; }
.pa-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pa-seg span {
	min-height: 46px; padding: 0 4px; display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap;
	border: 1px solid #AEB5AA; border-radius: 10px; background: #fff; font-weight: 700; font-size: 14px;
}
.pa-seg input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.pa-seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Avisos do sistema */
.pa-flash { border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border: 1px solid; }
.pa-flash.ok { background: #E1F2E6; border-color: #9CCFAE; color: #0A4622; }
.pa-flash.erro { background: #FCE8E6; border-color: #E3A39E; color: #7A1A14; }
.pa-flash textarea { min-height: 130px; }

/* Listas */
.pa-row {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
	padding: 10px 0; border-top: 1px solid #E4E7DF;
}
.pa-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.pa-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pa-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.pa-status.on { background: #E1F2E6; color: #0A5C2D; }
.pa-status.wait { background: #FBF0D9; color: #7A4F00; }
.pa-status.off { background: #ECECEC; color: #4A4A4A; }
.pa-list { margin: 0; padding-left: 20px; }
.pa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pa-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.pa-stat strong { font-size: 20px; }
.pa-report { border-top: 1px solid #E4E7DF; padding: 6px 0; }
.pa-report summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; cursor: pointer; list-style: none; }
.pa-report summary::-webkit-details-marker { display: none; }
.pa-report p { font-size: 14px; padding: 4px 0; }
.pa-count { font-weight: 700; color: var(--green); white-space: nowrap; }
.pa-logo-preview { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; }

/* Login */
.pa-login { background: var(--green); color: #fff; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.pa-login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.pa-login-logo { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 18px; padding: 10px; }
.pa-login h1 { font-size: 34px; line-height: 1.1; }
.pa-login-lead, .pa-login-foot { color: var(--on-brand); }
.pa-login-foot { font-size: 14px; text-align: center; margin-top: 8px; }
.pa-login-erro { background: #fff; color: #7A1A14; border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.pa-login .pa-form label { color: #fff; }
.pa-login input { border-color: var(--brand-border); }

/* Versão 1.1 */
.pa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pa-noscroll { overflow: hidden; }
.pa-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-tag.pessoal { background: #F3E5F7; color: #5E2472; }
.pa-tag.novo { background: var(--gold); color: #1A1A1A; }
.pa-tag.cat { background: var(--green-soft); color: var(--brand-ink); }
.pa-card.novo { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.pa-more, .pa-link { font-weight: 700; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }

/* Busca */
.pa-search { display: flex; gap: 8px; }
.pa-search input { flex: 1; min-width: 0; width: auto; min-height: 44px; -webkit-appearance: none; appearance: none; }

/* Imagens: aparecem inteiras e ampliam ao tocar */
.pa-img {
	display: block; width: 100%; height: 260px; padding: 0; border: 1px solid var(--line); border-radius: 10px;
	overflow: hidden; background: #fff; cursor: zoom-in;
}
@supports (aspect-ratio: 1) {
	.pa-img { height: auto; aspect-ratio: 4 / 3; }
}
/* Moldura padrão: toda imagem ocupa o mesmo espaço e aparece inteira dentro dele. */
.pa-img img { width: 100%; height: 100%; object-fit: contain; margin: 0 auto; }
/* Na página da publicação a imagem aparece maior, no formato original. */
.pa-single .pa-img { height: auto; aspect-ratio: auto; }
.pa-single .pa-img img { height: auto; max-height: 70vh; }

.pa-zoom { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .96); display: flex; flex-direction: column; }
.pa-zoom[hidden] { display: none; }
.pa-zoom-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; }
.pa-zoom-bar button {
	min-width: 48px; min-height: 48px; padding: 0 14px; border: 1px solid #fff; border-radius: 10px;
	background: transparent; color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer;
}
.pa-zoom-area { flex: 1; min-height: 0; overflow: auto; display: flex; -webkit-overflow-scrolling: touch; }
.pa-zoom-area img { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.pa-zoom-area img.big { max-width: none; max-height: none; height: auto; flex-shrink: 0; cursor: zoom-out; }

/* Sininho */
.pa-bell {
	position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
	color: #fff; border-radius: 50%; flex-shrink: 0;
}
.pa-bell:hover { color: #fff; background: rgba(255, 255, 255, .15); }
.pa-bell-n {
	position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
	background: var(--gold); color: #1A1A1A; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}

/* Portfólio */
.pa-fold > summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; }
.pa-fold > summary::-webkit-details-marker { display: none; }
.pa-fold > summary::after { content: "+"; font-size: 24px; font-weight: 700; color: var(--green); }
.pa-fold[open] > summary::after { content: "\2212"; }
.pa-spec { border-top: 1px solid #E4E7DF; }
.pa-spec summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; color: var(--green); cursor: pointer; }
.pa-spec .pa-text { padding-bottom: 8px; }
.pa-consultor { padding: 12px 0; border-top: 1px solid #E4E7DF; display: flex; flex-direction: column; gap: 4px; }

/* Permissões por consultor */
.pa-perms { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pa-perms fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0; }
.pa-perms legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.pa-perms .pa-check { align-items: flex-start; font-size: 15px; padding: 6px 0; min-height: 0; }
.pa-perms input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; margin: 2px 0 0; }
.pa-perms .pa-btn { align-self: flex-start; }

/* Nomes por segmento */
.pa-termo { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.pa-termo legend { font-size: 14px; font-weight: 700; padding: 0 6px; }
.pa-termo label { margin-top: 2px; font-weight: 600; }

/* Tema vermelho e amarelo (escolhido em Ajustes) */
body.pa-tema-vermelho {
	--green: #DD1D21;
	--green-dark: #A31418;
	--green-soft: #FCE9E9;
	--gold: #FBCE07;
	--brand-ink: #8E1216;
	--on-brand: #FFF3C4;
	--brand-border: #8E1216;
}
