:root { font-family: Inter, Segoe UI, Arial, sans-serif; color: #17202b; background: #f5f6f8; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input { font: inherit; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1200px)/2)); background: #fff; border-bottom: 1px solid #e4e7eb; }
.brand { display: flex; align-items: center; gap: 12px; color: #20252c; text-decoration: none; font-size: 18px; font-weight: 750; }
.brand small { display: block; color: #66717e; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; object-fit: contain; }
.topbar nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.topbar nav a, .text-button { border: 0; background: none; color: #425063; text-decoration: none; cursor: pointer; padding: 0; }
.user-name { font-weight: 650; }
.page { max-width: 1200px; margin: 0 auto; padding: 42px 24px 80px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.14; letter-spacing: -.035em; }
h2 { font-size: 19px; }
p { color: #617080; line-height: 1.5; }
.eyebrow { font-size: 12px; letter-spacing: .16em; font-weight: 800; color: #e56a21; }
.hero { margin-bottom: 34px; }
.hero.compact { margin-bottom: 24px; }
.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.module-card, .panel { background: #fff; border: 1px solid #e2e6eb; border-radius: 15px; box-shadow: 0 8px 24px rgba(24, 35, 48, .035); }
.module-card { display: flex; flex-direction: column; gap: 18px; min-height: 220px; padding: 23px; }
.module-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #fff2ea; color: #c65418; font-weight: 800; }
.module-body { flex: 1; }
.module-body h2 { margin-bottom: 5px; }
.module-body p { margin-bottom: 14px; font-size: 14px; }
.status { font-size: 12px; color: #6f7782; }
.status.integrated { color: #21724b; }
.module-card button { width: 100%; padding: 10px 14px; border: 1px solid #e66d28; border-radius: 8px; color: #b44e12; background: #fff; font-weight: 700; cursor: pointer; }
.module-card button:hover { background: #fff4ed; }
.module-card button span { margin-left: 4px; }
.login-layout { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 70px; min-height: 65vh; }
.login-layout .intro h1 { max-width: 550px; font-size: clamp(38px, 4vw, 55px); }
.login-form, .editor { display: flex; flex-direction: column; }
.login-form { padding: 36px; max-width: 430px; width: 100%; }
label { display: block; color: #344150; font-size: 13px; font-weight: 650; margin: 13px 0 7px; }
input:not([type=checkbox]) { width: 100%; padding: 11px 12px; border: 1px solid #ccd3db; border-radius: 8px; background: #fff; color: #1b2631; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #ffba8a; outline-offset: 2px; }
.primary { border: 0; border-radius: 8px; padding: 12px 15px; background: #e56b21; color: white; font-weight: 750; cursor: pointer; margin-top: 20px; }
.primary:hover { background: #ca5816; }
.notice { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.notice.error { color: #a52d21; background: #fff0ee; }
.notice.success { color: #18613d; background: #e8f7ee; }
.empty-state { max-width: 600px; padding: 26px; }
.admin-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: start; }
.admin-grid .panel { padding: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section-heading a { color: #b44e12; font-size: 13px; font-weight: 700; }
.user-list { list-style: none; padding: 0; margin: 0; }
.user-list a { display: block; padding: 11px 0; border-top: 1px solid #ecedf0; text-decoration: none; font-weight: 650; }
.user-list small, .check-row small { display: block; color: #788391; font-size: 12px; font-weight: 400; margin-top: 3px; }
fieldset { border: 1px solid #e2e6eb; border-radius: 8px; margin: 20px 0 8px; padding: 15px; }
legend { font-size: 14px; font-weight: 750; padding: 0 4px; }
.permission-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.permission-group + .permission-group { border-top: 1px solid #e2e6eb; margin-top: 16px; padding-top: 16px; }
.permission-group h3 { margin: 0 0 8px; font-size: 15px; color: #18613d; }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; font-weight: 500; margin: 8px 0; }
.check-row input { margin-top: 2px; }
@media(max-width: 850px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .login-layout { gap: 30px; } .permission-list { grid-template-columns: 1fr; } }
@media(max-width: 600px) { .topbar { height: auto; min-height: 70px; padding: 12px 18px; } .user-name { display: none; } .topbar nav { gap: 12px; } .page { padding: 28px 18px 55px; } .module-grid, .login-layout, .admin-grid { grid-template-columns: 1fr; } .login-layout { gap: 24px; } .login-form { padding: 25px; } }
/* Identidade compartilhada entre consulta pública e área privada. */
:root { color: #20392a; background: #f3f5f1; }
body { background: #f3f5f1; }
.environment-bar { padding: 7px max(24px, calc((100vw - 1200px)/2)); background: #173c25; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .1em; display: flex; justify-content: space-between; gap: 20px; }
.environment-bar span { font-weight: 400; letter-spacing: .03em; }
.topbar { min-height: 82px; height: auto; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.topbar .brand { color: #173c25; flex-shrink: 0; }
.topbar .brand-mark { width: 42px; height: 42px; }
.topbar nav form { margin: 0; }
.topbar nav .login-link { background: #173c25; color: #fff; padding: 10px 20px; border-radius: 8px; font-weight: 700; }
h1 { color: #173c25; }
.hero { border-left: 4px solid #ef7d00; padding-left: 22px; }
.primary { background: #244f30; }
.primary:hover { background: #173c25; }
.module-card { border-top: 3px solid #ef7d00; }
.disabled-card { border-top-color: #cbd3ca; background: #fafbf9; }
.module-card button:disabled { border-color: #d6ded6; color: #758175; background: #f0f3ee; cursor: not-allowed; }
.module-icon { color: #244f30; background: #e8f0e9; }
.module-card .action-link { color: #244f30; font-weight: 700; }
.home-search-panel { margin-top: 10px; border-top: 4px solid #ef7d00; }
.home-search-panel .home-opening-logo { max-width: 180px; }
.portal-footer { max-width: 1200px; margin: 0 auto; padding: 22px 24px; border-top: 1px solid #d7ded8; display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: #617366; }
.setup-notice { background: #fff1df; color: #684519; }
.profile-list { padding: 12px; background: #f3f5f1; border-radius: 8px; font-size: 13px; }
.profile-list li { margin: 8px 0; }
.private-section { margin-top: 25px; }
@media(max-width: 780px) { .topbar { flex-wrap: wrap; padding-inline: 18px; } .topbar nav { flex-wrap: wrap; gap: 14px; font-size: 13px; } .environment-bar { padding-inline: 18px; } .environment-bar span { display: none; } .portal-footer { flex-direction: column; gap: 6px; } }

.document-open-link { display: inline-block; padding: 24px; color: #244f30; font-weight: 700; } .document-open-link[hidden] { display: none; } .private-section.panel { padding: 24px; }

.module-icon svg { display: block; flex-shrink: 0; }

/* Página inicial: consulta em destaque e acesso privado ao lado. */
.home-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(220px, 3fr); gap: 24px; align-items: stretch; margin-top: 10px; }
.home-layout .home-search-panel { width: 100%; min-width: 0; margin: 0; padding: 28px; align-content: center; }
.home-layout .home-search-copy { min-width: 0; }
.home-layout .unified-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.home-layout .unified-search-controls button { white-space: nowrap; }
.home-access-panel { min-width: 0; }
.home-access-panel .login-form, .home-session { height: 100%; max-width: none; padding: 28px 24px; border-top: 4px solid #244f30; border-radius: 18px; box-shadow: var(--shadow); }
.login-form .login-intro { font-size: 14px; margin: 10px 0 4px; }
.home-access-panel .login-form { justify-content: center; }
.home-access-panel .login-form .primary { min-height: 46px; }
.home-session { display: flex; flex-direction: column; justify-content: center; }
.home-session p { margin-top: 14px; }
.home-session-link { display: block; text-align: center; text-decoration: none; }
@media(max-width: 1050px) {
  .home-layout .unified-search-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-layout .unified-search-controls input { grid-column: 1 / -1; }
  .home-layout .home-search-panel { padding: 24px; }
  .home-access-panel .login-form, .home-session { padding: 24px 20px; }
}
@media(max-width: 760px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-layout .home-search-panel { padding: 24px 20px; }
  .home-access-panel .login-form, .home-session { height: auto; padding: 28px 24px; }
}
@media(max-width: 540px) {
  .home-layout .unified-search-controls { grid-template-columns: minmax(0, 1fr); }
}

.environment-bar { justify-content: flex-end; }
@media(max-width: 780px) { .environment-bar { display: none; } }

/* Navegação compacta compartilhada por todos os módulos. */
.page:has(> .module-navigation) {padding-top:20px;}
.page > .module-navigation {display:flex;align-items:center;gap:12px;padding:7px;margin:0 0 18px;min-width:0;background:#fff;border:1px solid #d7e1d9;border-radius:12px;box-shadow:0 3px 12px #173c2506;}
.module-navigation .module-identity {display:flex;align-items:center;gap:9px;flex:none;min-height:42px;padding:8px 14px 8px 10px;border-left:4px solid #ef7d00;border-radius:8px;background:#173c25;color:#fff;}
.module-navigation .module-identity strong {font-size:15px;line-height:1.2;white-space:nowrap;font-weight:750;}
.module-navigation .module-identity svg {width:24px;height:24px;flex:none;color:#ffb76b;}
.module-navigation .module-links {display:flex;align-items:center;gap:3px;min-width:0;flex:1;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#c6d3c9 transparent;}
.module-navigation .module-links a {flex:none;display:flex;align-items:center;justify-content:center;min-height:40px;padding:9px 11px;border-radius:7px;text-decoration:none;color:#405849;font-size:13px;line-height:1.2;font-weight:650;white-space:nowrap;transition:background .15s;}
.module-navigation .module-links a:hover {background:#f0f5f0;color:#173c25;}
.module-navigation .module-links a[aria-current="page"] {color:#173c25;background:#e7f0e8;box-shadow:inset 0 -3px #ef7d00;font-weight:750;}
.module-navigation .module-links a:focus-visible {outline:2px solid #e87900;outline-offset:-2px;}
@media(max-width:700px) {
  .page:has(> .module-navigation) {padding-top:14px;}
  .page > .module-navigation {flex-direction:column;align-items:stretch;gap:5px;padding:6px;margin-bottom:14px;}
  .module-navigation .module-identity {min-height:38px;padding-block:7px;}
  .module-navigation .module-links {width:100%;padding-bottom:3px;}
  .module-navigation .module-links a {min-height:40px;}
}
@media print {.module-navigation {display:none!important;}}
