/* =========================================================
   LACAG — identidade visual institucional
   Azul-marinho nobre · dourado metálico · verde do brasão · branco perolado
   ========================================================= */
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/cormorant-garamond-latin-600-italic.woff2') format('woff2'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --navy-950: #050E1C;
  --navy-900: #081730;
  --navy: #0B1F3A;
  --navy-700: #14305A;
  --navy-500: #2A4A7A;
  --navy-100: #E6EBF3;
  --gold: #C9A227;
  --gold-light: #E9CF7A;
  --gold-pale: #F6EBC6;
  --gold-dark: #8F6E17;
  --gold-metal: linear-gradient(135deg, #8C6A16 0%, #E9CF7A 30%, #C9A227 52%, #F7E7A8 72%, #9C7A1C 100%);
  --green: #1E5B3A;
  --green-light: #E3F0E8;
  --pearl: #FBF8F1;
  --pearl-2: #F4EFE2;
  --ink: #17233A;
  --muted: #5E6878;
  --line: #E4DCC6;
  --danger: #A12C2C;
  --danger-bg: #FBEAEA;
  --warn: #8A5A00;
  --warn-bg: #FFF3D6;
  --ok: #1E6B40;
  --ok-bg: #E2F3E8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 8px 24px rgba(11, 31, 58, .07);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-variant-numeric: lining-nums; font-family: var(--sans); color: var(--ink); background: var(--pearl); font-size: 15px; line-height: 1.55; }
img { max-width: 100%; }
a { color: var(--navy-700); text-decoration-color: rgba(201, 162, 39, .6); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: var(--display); font-weight: 700; letter-spacing: .04em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
hr { border: 0; height: 1px; background: var(--line); margin: 1.5rem 0; }
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gold-text { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--display); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .6rem; }

/* Divisor "sutura" — detalhe cirúrgico */
.suture { height: 14px; margin: 2.2rem auto; max-width: 340px; position: relative;
  background:
    linear-gradient(var(--gold), var(--gold)) center / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 14px, var(--gold) 14px 16px, transparent 16px 28px) center / 100% 12px no-repeat; opacity: .8; }
.suture::after { content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%) rotate(45deg); background: var(--gold); box-shadow: 0 0 0 3px var(--pearl); }
.suture.left { margin-left: 0; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.1rem; border-radius: 8px; border: 1px solid transparent; font: 600 .9rem var(--sans); cursor: pointer; text-decoration: none; transition: .15s; white-space: nowrap; line-height: 1.2; }
.btn-primary { background: var(--navy); color: var(--gold-light); border-color: var(--gold); }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-gold { background: var(--gold-metal); color: var(--navy-950); border-color: var(--gold-dark); text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.btn-gold:hover { filter: brightness(1.06); color: var(--navy-950); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy-500); }
.btn-outline:hover { background: var(--navy-100); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy-700); }
.btn-ghost:hover { background: var(--pearl-2); }
.btn-danger { background: #fff; color: var(--danger); border-color: #E3B4B4; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #17482d; color: #fff; }
.btn-sm { padding: .38rem .7rem; font-size: .8rem; border-radius: 6px; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
form.inline { display: inline; }

/* ---------- Formulários ---------- */
label { display: block; font-weight: 600; font-size: .85rem; color: var(--navy); margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.hint { font-size: .78rem; color: var(--muted); margin-top: .25rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=url], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid #CFC6AE; border-radius: 8px; font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .22); }
input[type=file] { font: inherit; font-size: .85rem; padding: .5rem; border: 1px dashed #CFC6AE; border-radius: 8px; width: 100%; background: #fff; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--navy); }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 820px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.grid > * { min-width: 0; }

/* ---------- Alertas e selos ---------- */
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert-ok { background: var(--ok-bg); border-color: #b6dcc3; color: var(--ok); }
.alert-erro { background: var(--danger-bg); border-color: #ebc0c0; color: var(--danger); }
.alert-info { background: var(--navy-100); border-color: #c8d3e6; color: var(--navy-700); }
.alert-warn { background: var(--warn-bg); border-color: #f0d79a; color: var(--warn); }
.badge { display: inline-block; padding: .16rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 600; letter-spacing: .01em; background: var(--pearl-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe1cb; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #f1dca8; }
.badge-erro { background: var(--danger-bg); color: var(--danger); border-color: #efc5c5; }
.badge-navy { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }
.badge-gold { background: var(--gold-pale); color: var(--gold-dark); border-color: #ead48f; }
.badge-green { background: var(--green-light); color: var(--green); border-color: #bcd9c7; }

/* ---------- Cartões e tabelas ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; margin-bottom: 1.25rem; }
.card > h3:first-child, .card > h2:first-child, .card-head h3 { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head h3 { margin: 0; }
.card.gold-top { border-top: 3px solid var(--gold); }
.table-wrap { overflow-x: auto; margin: 0 -1.4rem; padding: 0 1.4rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: .6rem .6rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: .65rem .6rem; border-bottom: 1px solid #EFE9D9; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FDFBF5; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.acoes { text-align: right; white-space: nowrap; }
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty img { width: 54px; opacity: .5; margin-bottom: .5rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.05rem 1.2rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold-metal); }
.kpi .rot { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.kpi .val { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--navy); line-height: 1.1; margin-top: .2rem; font-variant-numeric: lining-nums tabular-nums; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi.alerta::before { background: var(--danger); }
.kpi.alerta .val { color: var(--danger); }

.progress { height: 10px; background: var(--pearl-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #3C8A5E); border-radius: 99px; }
.progress.baixo > span { background: linear-gradient(90deg, #B44, #D77); }

.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.toolbar .field { margin: 0; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; flex-wrap: wrap; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.ativo { color: var(--navy); border-color: var(--gold); }

/* =========================================================
   SITE PÚBLICO
   ========================================================= */
.topbar { background: var(--navy-950); color: #c8d3e6; font-size: .78rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.topbar a { color: var(--gold-light); text-decoration: none; }
@media (max-width: 600px) { .topbar .container > span:first-child { display: none; } .topbar .container { justify-content: flex-end; } }
.site-header { background: var(--navy); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; box-shadow: 0 4px 18px rgba(5, 14, 28, .25); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(233, 207, 122, .35); }
.brand .nome { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: .14em; line-height: 1; }
.brand .desc { display: block; font-size: .66rem; color: #b8c4da; letter-spacing: .04em; margin-top: .25rem; max-width: 280px; line-height: 1.3; }
.main-nav { display: flex; align-items: center; gap: .2rem; }
.main-nav a { color: #dfe6f2; text-decoration: none; font-size: .86rem; font-weight: 500; padding: .5rem .75rem; border-radius: 6px; }
.main-nav a:hover, .main-nav a.ativo { color: var(--gold-light); background: rgba(255, 255, 255, .06); }
.main-nav .btn { margin-left: .5rem; }
.nav-toggle svg, .sb-toggle svg { width: 22px; height: 22px; display: block; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(233, 207, 122, .5); color: var(--gold-light); border-radius: 6px; padding: .45rem .6rem; font-size: 1.1rem; cursor: pointer; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: .75rem 1.25rem 1.25rem; border-bottom: 3px solid var(--gold); }
  .main-nav.aberto { display: flex; }
  .main-nav .btn { margin: .5rem 0 0; }
  .brand .desc { display: none; }
}

.hero { position: relative; background: radial-gradient(ellipse at 70% 40%, #173a6b 0%, var(--navy) 45%, var(--navy-950) 100%); color: #e3e9f3; overflow: hidden; }
.hero::before { /* anéis concêntricos, eco do brasão */
  content: ''; position: absolute; right: -180px; top: 50%; width: 820px; height: 820px; transform: translateY(-50%); border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 58px, rgba(201, 162, 39, .14) 58px 59px); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; padding: 4.5rem 0 4.8rem; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); margin: 0 0 .2rem; letter-spacing: .12em; }
.hero .sub { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: #f1e6c3; line-height: 1.3; margin-bottom: 1.1rem; font-weight: 500; }
.hero p.lead { color: #c4cfe1; max-width: 560px; font-size: 1.02rem; }
.hero .crest { justify-self: center; width: min(380px, 80vw); filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .45)); animation: flutua 7s ease-in-out infinite; }
@keyframes flutua { 50% { transform: translateY(-8px); } }
.hero .btn-row { margin-top: 1.6rem; }
.hero .btn-outline { color: var(--gold-light); border-color: rgba(233, 207, 122, .6); }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .06); color: #fff; }
@media (max-width: 860px) { .hero .container { grid-template-columns: 1fr; text-align: center; padding: 3rem 0; } .hero .crest { grid-row: 1; width: 220px; } .hero p.lead { margin-inline: auto; } .hero .btn-row { justify-content: center; } }

.stats-band { background: var(--navy-900); border-top: 1px solid rgba(201, 162, 39, .35); border-bottom: 1px solid rgba(201, 162, 39, .35); }
.stats-band .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-band .st { padding: 1.3rem 1rem; text-align: center; border-right: 1px solid rgba(255, 255, 255, .07); }
.stats-band .st:last-child { border-right: 0; }
.stats-band .n { font-family: var(--display); font-size: 2rem; font-weight: 700; }
.stats-band .l { color: #aebbd2; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
@media (max-width: 700px) { .stats-band .container { grid-template-columns: repeat(2, 1fr); } }

.section { padding: 4rem 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.2rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.page-hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%); color: #dfe6f2; padding: 2.6rem 0 2.4rem; border-bottom: 3px solid var(--gold); position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 40px, rgba(201, 162, 39, .13) 40px 41px); }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; position: relative; z-index: 1; }
.page-hero p { color: #b8c4da; margin: .4rem 0 0; position: relative; z-index: 1; }

.cards-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.ev-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.ev-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11, 31, 58, .12); color: inherit; }
.ev-card .img { aspect-ratio: 16 / 9; background: var(--navy) center / cover no-repeat; position: relative; }
.ev-card .img.vazio { background: radial-gradient(circle at 50% 50%, var(--navy-700), var(--navy-950)); display: grid; place-items: center; }
.ev-card .img.vazio img { width: 74px; opacity: .85; }
.ev-card .data-tag { position: absolute; left: 12px; bottom: 12px; background: var(--gold-metal); color: var(--navy-950); font-weight: 700; font-size: .75rem; padding: .25rem .6rem; border-radius: 4px; }
.ev-card .body { padding: 1.05rem 1.15rem 1.25rem; flex: 1; }
.ev-card h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.ev-card .meta { font-size: .82rem; color: var(--muted); }

.pub-list { display: grid; gap: .9rem; }
.pub { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 1rem 1.2rem; }
.pub h3 { font-size: 1.18rem; margin: .25rem 0 .3rem; }
.pub h3 a { text-decoration: none; color: var(--navy); }
.pub .autores { font-size: .88rem; color: #3b4659; }
.pub .meta { font-size: .8rem; color: var(--muted); margin-top: .3rem; display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }

.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.dir { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1rem; text-align: center; }
.dir .ini { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .7rem; display: grid; place-items: center; background: var(--navy); color: var(--gold-light); font-family: var(--display); font-weight: 700; font-size: 1.2rem; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold); }
.dir .nm { font-weight: 600; color: var(--navy); }
.dir .cg { font-size: .82rem; color: var(--gold-dark); font-family: var(--display); letter-spacing: .06em; }

.pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.pilar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.pilar .ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: var(--gold-light); margin-bottom: .8rem; }
.pilar .ic svg { width: 22px; height: 22px; }
.pilar h3 { font-size: 1.25rem; }
.pilar p { font-size: .92rem; color: #46505f; margin: 0; }

.site-footer { background: var(--navy-950); color: #9fadc6; padding: 2.8rem 0 1.4rem; border-top: 3px solid var(--gold); font-size: .88rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: var(--gold-light); font-family: var(--display); letter-spacing: .1em; font-size: .82rem; text-transform: uppercase; }
.site-footer a { color: #d6deeb; text-decoration: none; display: block; padding: .15rem 0; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .copy { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2rem; padding-top: 1rem; font-size: .78rem; text-align: center; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: radial-gradient(ellipse at 30% 40%, #173a6b, var(--navy) 50%, var(--navy-950)); color: #c8d3e6; display: grid; place-items: center; padding: 3rem; position: relative; overflow: hidden; text-align: center; }
.auth-side::before { content: ''; position: absolute; inset: 50% auto auto 50%; width: 760px; height: 760px; transform: translate(-50%, -50%); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 52px, rgba(201, 162, 39, .14) 52px 53px); }
.auth-side > div { position: relative; }
.auth-side img { width: 230px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.auth-side h1 { font-size: 2.6rem; margin: 1rem 0 .2rem; letter-spacing: .16em; }
.auth-form { display: grid; place-items: center; padding: 2rem; background: var(--pearl); }
.auth-form .box { width: min(400px, 100%); }
.auth-form h2 { font-family: var(--display); font-size: 1.5rem; letter-spacing: .06em; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { padding: 2rem; } .auth-side img { width: 130px; } .auth-side h1 { font-size: 1.8rem; } }

/* Validação */
.valid-box { max-width: 680px; margin: 0 auto; }
.valid-ok { border: 2px solid var(--green); background: #fff; border-radius: var(--radius); padding: 1.6rem; }
.valid-ok .selo { display: flex; align-items: center; gap: .7rem; color: var(--green); font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.valid-erro { border: 2px solid var(--danger); background: #fff; border-radius: var(--radius); padding: 1.6rem; color: var(--danger); }
dl.dados { display: grid; grid-template-columns: 170px 1fr; gap: .5rem 1rem; margin: 0; }
dl.dados dt { color: var(--muted); font-size: .85rem; }
dl.dados dd { margin: 0; font-weight: 500; }
@media (max-width: 560px) { dl.dados { grid-template-columns: 1fr; } dl.dados dd { margin-bottom: .5rem; } }

/* =========================================================
   PAINEL (área do membro e administração)
   ========================================================= */
.painel { display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-950) 100%); color: #c8d3e6; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; border-right: 1px solid rgba(201, 162, 39, .3); }
.sidebar .sb-brand { display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.1rem 1rem; text-decoration: none; border-bottom: 1px solid rgba(201, 162, 39, .25); }
.sidebar .sb-brand img { width: 46px; height: 46px; border-radius: 50%; }
.sidebar .sb-brand .nome { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: .14em; }
.sidebar .sb-brand small { display: block; color: #95a5c2; font-size: .7rem; letter-spacing: .05em; }
.sb-nav { padding: .8rem .6rem 1.5rem; flex: 1; }
.sb-nav .grupo { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); opacity: .85; padding: 1rem .7rem .35rem; font-weight: 600; }
.sb-nav a { display: flex; align-items: center; gap: .7rem; color: #d3dbea; text-decoration: none; padding: .55rem .7rem; border-radius: 7px; font-size: .88rem; font-weight: 500; position: relative; }
.sb-nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.sb-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-nav a.ativo { background: rgba(201, 162, 39, .14); color: var(--gold-light); }
.sb-nav a.ativo::before { content: ''; position: absolute; left: -.6rem; top: 6px; bottom: 6px; width: 3px; background: var(--gold); border-radius: 0 3px 3px 0; }
.sb-nav .cnt { margin-left: auto; background: var(--gold); color: var(--navy-950); font-size: .68rem; font-weight: 700; padding: .05rem .42rem; border-radius: 99px; }
.sb-user { padding: .9rem 1.1rem; border-top: 1px solid rgba(201, 162, 39, .25); font-size: .8rem; }
.sb-user strong { color: #fff; display: block; font-size: .86rem; }
.sb-user form button { background: none; border: 0; color: var(--gold-light); cursor: pointer; padding: 0; font: inherit; font-size: .8rem; margin-top: .35rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.main-top { background: #fff; border-bottom: 1px solid var(--line); padding: .85rem 1.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.main-top h1 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; font-size: 1.65rem; margin: 0; }
.main-top .acoes { display: flex; gap: .5rem; align-items: center; }
.sino { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--navy); text-decoration: none; }
.sino svg { width: 19px; height: 19px; }
.sino .dot { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.content { padding: 1.6rem 1.8rem 3rem; max-width: 1280px; width: 100%; }
.sb-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .55rem; cursor: pointer; color: var(--navy); }
@media (max-width: 980px) {
  .painel { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 100; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.aberto { transform: none; box-shadow: 0 0 0 100vmax rgba(5, 14, 28, .5); }
  .sb-toggle { display: inline-flex; }
  .content { padding: 1.1rem 1rem 3rem; }
  .main-top { padding: .7rem 1rem; }
  .main-top h1 { font-size: 1.3rem; }
}

.notif { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid #EFE9D9; }
.notif:last-child { border-bottom: 0; }
.notif .ic { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy-100); color: var(--navy); }
.notif .ic svg { width: 17px; height: 17px; }
.notif.nova .ic { background: var(--gold-pale); color: var(--gold-dark); }
.notif .t { font-weight: 600; color: var(--navy); }
.notif .m { font-size: .88rem; color: #46505f; white-space: pre-line; }
.notif .d { font-size: .74rem; color: var(--muted); }

.freq-ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--pearl-2) 0); position: relative; }
.freq-ring.baixo { background: conic-gradient(var(--danger) calc(var(--p) * 1%), var(--pearl-2) 0); }
.freq-ring::before { content: ''; position: absolute; inset: 14px; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.freq-ring span { position: relative; font-family: var(--serif); font-size: 2.3rem; font-weight: 600; color: var(--navy); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.cert { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 1rem; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .3rem; }
.cert::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--gold-metal); }
.cert .tp { font-family: var(--display); font-size: .7rem; letter-spacing: .14em; color: var(--gold-dark); text-transform: uppercase; }
.cert .tt { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--navy); line-height: 1.25; }
.cert .cd { font-size: .74rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.cert .btn-row { margin-top: auto; padding-top: .6rem; }

/* Chamada */
.chamada td { padding: .5rem .6rem; }
.seg { display: inline-flex; border: 1px solid #CFC6AE; border-radius: 8px; overflow: hidden; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .4rem .75rem; font-size: .8rem; font-weight: 600; color: var(--muted); border-right: 1px solid #E4DCC6; background: #fff; user-select: none; }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span.p { background: var(--ok); color: #fff; }
.seg input:checked + span.a { background: var(--danger); color: #fff; }
.seg input:checked + span.j { background: #B07A00; color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }

.upload-zone { border: 2px dashed var(--gold); background: #FFFDF6; border-radius: var(--radius); padding: 2rem; text-align: center; }
.upload-zone.drag { background: var(--gold-pale); }
.review-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; background: #fff; }
.review-item .arq { font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 99px; background: var(--navy-100); border: 1px solid #c8d3e6; font-size: .82rem; font-weight: 500; color: var(--navy); cursor: pointer; }
.chip input { width: 15px; height: 15px; accent-color: var(--navy); }
.chip .sc { font-size: .7rem; color: var(--muted); }

.chart-box { position: relative; height: 280px; }
.pill-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.pill-nav a { padding: .35rem .8rem; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; font-size: .82rem; color: var(--navy); background: #fff; }
.pill-nav a.ativo { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }

@media print {
  .sidebar, .main-top .acoes, .no-print, .site-header, .site-footer, .topbar { display: none !important; }
  .painel { display: block; } .content { padding: 0; } .card { box-shadow: none; break-inside: avoid; }
}
