/* 4Legis · shared interface, public dossier and print styles. */
.usage-chart { display: flex; align-items: end; gap: 8px; overflow-x: auto; min-height: 200px; padding: 12px 0; }
.usage-column { display: flex; flex-direction: column; align-items: center; flex: 1 0 22px; max-width: 90px; }
.usage-bar { display: block; width: 100%; min-height: 2px; border-radius: 6px 6px 0 0; background: #244d74; }
.config-list { margin: 0; }
.config-list > div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e3e5e9; padding: 14px 0; }
.config-list dt { color: #616975; }
.config-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.platform-form { padding: 12px; min-width: 0; }
.platform-form label { max-width: 540px; }
.platform-page td { overflow-wrap: anywhere; }
.platform-page .family-grid > .form-panel { min-width: 0; padding: 22px; }
.platform-page .filters label { max-width: 100%; min-width: min(170px, 100%); }
.platform-page small { font-size: 16px; }
.pagination { display: flex; gap: 16px; }
.review-entry + .review-entry { border-top: 1px solid #e3e5e9; margin-top: 24px; }
.member-card > summary { overflow-wrap: anywhere; }
:root {
  color-scheme: light;
  --ink: #152c46; --muted: #616975; --accent: #16395d; --orange: #ff7622;
  --bg: #f5f5f7; --surface: #fff; --line: #e3e5e9; --soft: #eef1f5;
  --ok: #24704e; --warn: #89500f; --danger: #af3036; --navy: #152c46;
  --radius: 22px; --shadow: 0 8px 36px #12283f06;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: #07599a; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #4588bc; outline-offset: 4px; }
main:focus { outline: none; }
svg { flex-shrink: 0; vertical-align: middle; }
img { max-width: 100%; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; background: white; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.app-header { height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; gap: 24px; background: #ffffffed; border-bottom: 1px solid #e8e9ec; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-symbol { display: block; width: 40px; height: 40px; overflow: hidden; border-radius: 10px; position: relative; }
.brand-symbol img { position: absolute; width: 84px; max-width: none; height: 84px; left: -22px; top: -9.4px; }
.brand-wordmark { font-size: 25px; font-weight: 700; letter-spacing: -.9px; }
.brand-dot { color: var(--orange); }
.header-context { display: flex; align-items: center; gap: 20px; min-width: 0; }
.tenant-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.avatar { width: 36px; height: 36px; border: 1px solid #dce1e7; background: #f0f2f5; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 650; flex-shrink: 0; }
.app-layout { display: flex; max-width: 1680px; margin: 0 auto; }
.sidebar { width: 236px; flex: 0 0 236px; height: calc(100dvh - 84px); position: sticky; top: 84px; display: flex; flex-direction: column; padding: 32px 18px 24px 24px; }
.app-nav { display: flex; flex-direction: column; gap: 5px; }
.app-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: #5d6672; font-size: 14px; font-weight: 500; transition: background .18s, color .18s; }
.app-nav a:hover { background: #e9edf2; color: var(--ink); }
.app-nav a[aria-current] { color: var(--ink); background: #e5eaf0; font-weight: 650; }
.app-nav a[aria-current] svg { color: #ad4b09; }
.nav-section { font-size: 10px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); margin: 25px 14px 8px; }
.sidebar-bottom { margin-top: auto; padding: 22px 12px 0; }
.sidebar-caption { font-size: 13px; color: #666e79; letter-spacing: -.2px; margin-bottom: 18px; }
.workspace { min-width: 0; flex: 1; padding: 42px 44px 24px 30px; }
main.card { width: 100%; max-width: 1180px; margin: 0 auto; }
.app-footer { max-width: 1180px; margin: 44px auto 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.app-footer span { font-weight: 700; color: var(--ink); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 650; letter-spacing: -1.2px; margin: 0 0 12px; }
h2 { font-size: 21px; font-weight: 620; letter-spacing: -.55px; margin: 34px 0 16px; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -.25px; margin: 24px 0 12px; }
p { margin: 0 0 16px; }
.sub, .meta { color: var(--muted); }
p.sub { margin: 0 0 24px; font-size: 14px; max-width: 760px; }
.meta { font-size: 13px; }
.eyebrow, .kicker { font-size: 10px; font-weight: 700; letter-spacing: 1.7px; color: #606977; margin: 0 0 18px; text-transform: uppercase; }
.eyebrow::before { content: ''; display: inline-block; width: 18px; height: 3px; background: var(--orange); vertical-align: middle; margin-right: 10px; border-radius: 2px; }
.lead { font-size: 17px; line-height: 1.65; color: var(--muted); letter-spacing: -.2px; }
header.row { margin: 0 0 28px; }
.page-intro { margin-bottom: 28px; }
.page-intro .sub { margin-bottom: 0; }
label { display: block; color: #374758; font-size: 13px; font-weight: 600; margin: 22px 0 8px; }
input, textarea, select { width: 100%; border: 1px solid #cdd3db; background: #fff; color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.5; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: #737c88; opacity: 1; }
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: 0; border-color: #6b8bab; box-shadow: 0 0 0 4px #16395d10; }
input[type='date'] { min-height: 48px; }
input[type='hidden'] { display: none; }
button, a.button, a.download { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; margin-top: 22px; padding: 11px 22px; border: 1px solid transparent; border-radius: 12px; background: var(--accent); color: white; font-weight: 600; font-size: 14px; line-height: 1.5; cursor: pointer; text-decoration: none; transition: background .18s, transform .18s; }
button:hover, a.button:hover, a.download:hover { background: #234d73; }
button:active, a.button:active { transform: translateY(1px); }
button:disabled { opacity: .65; cursor: wait; }
button.secondary, a.button.secondary { background: transparent; color: var(--muted); border-color: var(--line); }
button.logout { padding: 8px 0; margin: 0; border: 0; min-height: 44px; font-size: 13px; }
.full-width { width: 100%; }
.form-panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); margin: 24px 0; }
.form-panel > label:first-of-type { margin-top: 0; }
.form-panel h2 { margin-top: 0; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 12px; }
.form-progress { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.form-progress:empty { display: none; }
.form-progress:not(:empty)::before { content: ''; display: inline-block; height: 10px; width: 10px; border: 2px solid #cdd5df; border-top-color: var(--accent); border-radius: 50%; margin-right: 8px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error, .notice, .review-callout, .feedback-status { padding: 18px 20px; margin: 22px 0; border: 1px solid; border-radius: 14px; font-size: 14px; overflow-wrap: anywhere; }
.error { color: var(--danger); background: #fff4f3; border-color: #f1d2d2; }
.notice { color: var(--warn); background: #fff9ed; border-color: #eee0c1; }
.notice ul, .error ul { margin-bottom: 0; }
.review-callout { color: var(--ink); background: #edf2f8; border-color: #cedae7; }
.feedback-status.ok { color: var(--ok); border-color: #c6dfd1; background: #f0f8f3; }
.feedback-status.erro { color: var(--danger); background: #fff4f3; border-color: #f1d2d2; }
.badge { display: inline-block; padding: 4px 9px; color: var(--accent); background: #eaf0f6; border-radius: 7px; font-size: 11px; font-weight: 550; line-height: 1.4; vertical-align: middle; letter-spacing: 0; }
.badge.ok { color: var(--ok); background: #e7f2eb; }
.badge.warn { color: var(--warn); background: #f9edda; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; font-size: 15px; margin: 20px 0; max-width: 85ch; }
.citation-card { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 14px; padding: 22px 24px; margin: 14px 0; overflow-wrap: anywhere; scroll-margin-top: 105px; }
.citation-card .src { font-size: 14px; font-weight: 650; }
.citation-card blockquote { font-size: 14px; line-height: 1.8; color: #495667; border-left: 2px solid #dfe5ec; padding-left: 18px; margin: 14px 0 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; font-size: 13px; font-weight: 600; }
details { margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px 20px; }
summary { cursor: pointer; font-size: 14px; font-weight: 550; color: var(--accent); }
details[open] > summary { margin-bottom: 18px; }
.chunk { white-space: pre-wrap; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.chunk .ref { font-weight: 600; color: var(--ink); }
footer.disclaimer { border-top: 1px solid #ded8c9; background: #f7f2e8; color: #795422; font-size: 13px; border-radius: 12px; padding: 16px 20px; margin-top: 30px; }
.table-scroll, .scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; margin: 18px 0 28px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #5d6876; background: #f7f8fa; font-weight: 600; text-align: left; white-space: normal; }
th, td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.quality td:not(:first-child), .quality th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 18px; align-items: end; flex-wrap: wrap; background: #fff; padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; margin: 24px 0; }
.filters label { margin: 0; flex: 1; min-width: 140px; max-width: 260px; }
.filters button { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.stat-card .stat-label { font-size: 12px; color: var(--muted); display: block; }
.stat-card .stat-value { display: block; font-size: 35px; font-weight: 620; letter-spacing: -1.5px; margin: 7px 0 2px; }
.stat-card .meta { font-size: 11px; }
.kqs { font-size: 36px; font-weight: 650; letter-spacing: -1.5px; margin: 8px 0 20px; }
.aviso { color: var(--warn); }
pre.resumo { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; font-size: 13px; font-family: inherit; }
.empty-state { padding: 32px; text-align: center; background: white; border: 1px dashed #d1d8e0; border-radius: 18px; color: var(--muted); }
.family-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.family-card { padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.family-card h3 { margin-top: 0; }
.family-card ul { font-size: 13px; color: var(--muted); padding-left: 18px; margin-bottom: 0; }
.welcome { padding: 6px 0 34px; }
.greeting { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.welcome h1 { font-size: clamp(36px, 3.7vw, 52px); line-height: 1.12; letter-spacing: -2px; margin-bottom: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading .meta { font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-height: 260px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s, border-color .2s; }
.feature-card:hover { transform: translateY(-3px); color: var(--ink); border-color: #b9c7d4; box-shadow: 0 12px 30px #12283f0c; }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: #edf1f6; border-radius: 14px; color: var(--accent); }
.feature-card:nth-child(2) .feature-icon { background: #fff1e8; color: #a34b14; }
.feature-card:nth-child(3) .feature-icon { background: #edf3ef; color: #356348; }
.feature-card h3 { font-size: 18px; margin: 22px 0 10px; }
.feature-card p { font-size: 13px; line-height: 1.65; color: var(--muted); margin-bottom: 24px; }
.card-link { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 650; }
.process-link { display: flex; align-items: center; gap: 16px; margin: 18px 0 38px; padding: 20px 24px; border: 1px solid var(--line); background: #ffffff70; border-radius: 18px; text-decoration: none; }
.process-link > span:nth-child(2) { flex: 1; }
.process-link strong { font-size: 14px; }
.process-link .meta, .admin-links .meta { display: block; margin-top: 3px; font-size: 12px; }
.feature-icon.small { width: 40px; height: 40px; border-radius: 11px; }
.admin-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-links a { display: flex; align-items: center; gap: 16px; border-radius: 16px; padding: 20px 22px; text-decoration: none; background: #fff; border: 1px solid var(--line); }
.admin-links a > span { flex: 1; }
.admin-links strong { font-size: 13px; }
.admin-links a:hover, .process-link:hover { border-color: #aebfce; }
.workspace-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 28px 0 0; }
.public .workspace { padding: 48px 24px 28px; }
.public main.card { max-width: 860px; }
.public main.card:not(.wide):not(.login-layout) { max-width: 560px; background: #fff; border: 1px solid var(--line); padding: 40px; border-radius: var(--radius); margin-top: 8vh; }
.public .app-footer { max-width: 860px; }
.dossier { background: #fff; padding: 40px 44px; border: 1px solid var(--line); border-radius: var(--radius); }
.dossier header { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 28px; }
.dossier h1 { font-size: 32px; }
.dossier .doc { border: 1px solid var(--line); padding: 28px; border-radius: 16px; }
.login-page .app-header { background: transparent; position: static; border: 0; padding: 0 6%; height: 100px; }
.login-page .workspace { padding: 4vh 6% 24px; }
.login-page main.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10%; max-width: 1150px; align-items: center; min-height: 64vh; }
.login-intro h1 { font-size: clamp(38px, 4.2vw, 60px); line-height: 1.1; letter-spacing: -2.5px; margin-bottom: 26px; }
.login-intro .lead { max-width: 445px; }
.login-features { display: flex; flex-direction: column; gap: 14px; margin: 28px 0 34px; font-size: 13px; color: #455568; }
.login-features span { display: flex; align-items: center; gap: 12px; }
.login-signature { font-size: 12px; color: var(--muted); }
.login-panel { padding: 40px; border: 1px solid #e1e5ea; background: #fff; border-radius: 26px; box-shadow: 0 20px 65px #15345109; }
.login-panel h2 { font-size: 25px; letter-spacing: -.9px; margin-top: 22px; }
.login-panel .sub { font-size: 13px; }
.login-emblem { display: inline-flex; align-items: center; justify-content: center; height: 56px; width: 56px; border-radius: 17px; color: var(--accent); background: #eff3f7; }
.login-help { font-size: 12px; text-align: center; color: var(--muted); margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.login-page .app-footer { max-width: 1150px; margin-top: 6vh; }
@media (min-width: 1700px) { .workspace { padding-top: 55px; } }
@media (max-width: 1100px) {
  .sidebar { width: 210px; flex-basis: 210px; padding-left: 14px; }
  .workspace { padding: 32px 24px; }
  .feature-card { padding: 22px; }
  .feature-grid { gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 29px; }
}
@media (max-width: 850px) {
  .app-header { height: 72px; padding: 0 22px; }
  .app-layout { display: block; }
  .sidebar { position: sticky; top: 72px; height: auto; width: 100%; padding: 10px 16px; background: #f5f5f7f5; border-bottom: 1px solid var(--line); z-index: 15; backdrop-filter: blur(16px); }
  .app-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 3px; }
  .app-nav a { flex-shrink: 0; min-height: 44px; font-size: 12px; padding: 9px 12px; gap: 7px; }
  .app-nav svg { width: 17px; height: 17px; }
  .nav-section, .sidebar-caption { display: none; }
  .sidebar-bottom { display: none; }
  .logout { width: 36px; }
  .logout-label { display: none; }
  .logout svg { width: 19px; height: 19px; }
  .authenticated .header-context { gap: 12px; }
  .avatar { display: none; }
  .workspace { padding: 30px 24px 20px; }
  .login-page main.login-layout { gap: 6%; }
  .login-panel { padding: 28px; }
  .login-intro h1 { font-size: 40px; }
  .dossier { padding: 28px; }
}
@media (max-width: 620px) {
  .app-header { padding: 0 18px; gap: 14px; }
  .brand { gap: 9px; }
  .brand-symbol { width: 34px; height: 34px; border-radius: 8px; }
  .brand-symbol img { transform: scale(.85); transform-origin: 22px 9.4px; }
  .brand-wordmark { font-size: 22px; }
  .tenant-label { font-size: 11px; line-height: 1.4; text-align: right; max-width: 150px; }
  .workspace, .public .workspace { padding: 26px 18px 20px; }
  h1 { font-size: 29px; letter-spacing: -1px; }
  .welcome h1 { font-size: 38px; letter-spacing: -1.6px; }
  .welcome { padding: 0 0 18px; }
  .lead { font-size: 15px; }
  .desktop-only, .section-heading > .meta { display: none; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 17px; }
  .section-heading .badge { font-size: 10px; }
  .feature-grid, .admin-links, .family-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; padding: 24px; }
  .feature-card h3 { margin-top: 16px; }
  .feature-card p { margin-bottom: 18px; }
  .card-link { padding-top: 12px; border-top: 1px solid var(--line); }
  .process-link { padding: 18px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 30px; }
  .form-panel { padding: 22px 20px; border-radius: 18px; }
  input, textarea, select { font-size: 16px; }
  .form-panel > button { width: 100%; }
  .filters { gap: 12px; padding: 16px; }
  .filters label { flex: 1 1 120px; min-width: 0; }
  .filters button { width: 100%; }
  th, td { padding: 12px 14px; }
  table { min-width: 570px; }
  .citation-card { padding: 20px; }
  .dossier { padding: 24px 20px; border-radius: 18px; }
  .dossier h1 { font-size: 27px; }
  .dossier .doc { padding: 20px; }
  .public main.card:not(.wide):not(.login-layout) { padding: 28px; }
  .login-page .app-header { height: 80px; padding: 0 22px; }
  .login-page main.login-layout { display: block; min-height: 0; }
  .login-intro { padding: 10px 6px 22px; }
  .login-intro h1 { font-size: 39px; letter-spacing: -1.6px; margin-bottom: 18px; }
  .login-intro .lead { font-size: 14px; }
  .login-features, .login-signature { display: none; }
  .login-panel { padding: 28px 24px; border-radius: 22px; }
  .login-panel h2 { font-size: 24px; }
  .login-page .app-footer { margin-top: 32px; }
  .workspace-note { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: white; font-size: 11pt; }
  .app-header, .sidebar, .app-footer, .skip-link, form, .feedback, .download, .card-actions { display: none !important; }
  .app-layout { display: block; }
  .workspace, .public .workspace { padding: 0; }
  main.card, .public main.card { max-width: none; }
  .dossier { border: 0; padding: 0; }
  .citation-card, .notice, .review-callout { break-inside: avoid; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; }
  details:not([open]) { display: none; }
}
