/* O mesmo espaço de trabalho do financeiro, limitado às páginas autenticadas. */
#app.app-layout { --fin-accent-strong: #C7341C; --fin-line: #e4e6eb; --fin-surface: #fff; --fin-muted: #f8f9fb; background: var(--fin-surface); }
body:not(.theme-dark) #app.app-layout { --surface: #fff; --surface-muted: #f8f9fb; --border-light: #e4e6eb; --text: #25272c; --text-secondary: #626771; }
body.theme-dark #app.app-layout { --fin-line: var(--border-light); --fin-surface: var(--surface); --fin-muted: var(--surface-muted); }
#app.app-layout #sidebar, #app.app-layout #topbar { display: none; }
#app.app-layout .main-content { margin-left: 0; width: 100%; min-width: 0; background: var(--fin-surface); }
#app.app-layout #content-area { max-width: none; width: 100%; padding: 20px 30px 40px; min-width: 0; outline: none; }
#app.app-layout #content-area:has(.fin-workspace) { padding: 0; }
#app-shell-header { background: var(--fin-surface); }
#app-shell-header .fin-shell-header { gap: 16px; }
.app-menu-group { display: block; padding: 12px 10px 3px; text-transform: uppercase; font-size: 10px; color: var(--text-secondary); letter-spacing: .04em; }
.app-shell-search { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: none; border: 0; font: inherit; font-size: 12px; color: var(--text-secondary); padding: 8px; min-height: 44px; cursor: pointer; }
.app-shell-search svg { width: 18px; height: 18px; }
.app-section-navigation { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 30px 10px; border-bottom: 1px solid var(--fin-line); }
.app-section-navigation .fin-app-link { font-size: 12px; padding: 8px 12px; }
.app-section-navigation .fin-app-link[aria-current] { background: var(--fin-accent-strong); color: white; font-weight: 500; }
#app-shell-header :is(button,summary):focus-visible { outline: 2px solid var(--fin-accent-strong); outline-offset: 3px; }
#app.app-layout .page-header { position: relative; top: auto; padding: 0 0 16px; margin: 0 0 18px; background: transparent; border: 0; box-shadow: none; align-items: center; gap: 16px; }
#app.app-layout .page-header h2 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
#app.app-layout .page-subtitle { color: var(--text-secondary); font-size: 12px; max-width: 80ch; line-height: 1.6; }
#app.app-layout .btn { border-radius: 5px; box-shadow: none; }
#app.app-layout :is(.card,.table-container,.stat-card,.dashboard-card,.panel) { border-radius: 6px; box-shadow: none; border-color: var(--fin-line); }
#app.app-layout :is(.table-toolbar,.filters,.filter-bar,.filtros) { gap: 10px; box-shadow: none; border-radius: 5px; }
#app.app-layout .table-toolbar { padding: 0 0 16px; }
#app.app-layout table thead th { background: var(--fin-muted); font-size: 11px; font-weight: 500; color: var(--text-secondary); }
#app.app-layout table td { font-size: 12px; border-color: var(--fin-line); }
#app.app-layout :is(input,select,textarea) { border-radius: 4px; }
#app.app-layout :is(.tabs,.agenda-filters,[role="tablist"]) { box-shadow: none; }
/* A referência centraliza os formulários; a altura e rolagem continuam locais. */
@media (min-width: 769px) {
 body.layout-instituto-ativo #modal { position: relative; inset: auto; width: min(900px,92vw); max-width: 900px; height: auto; max-height: 86dvh; margin: auto; border-radius: 6px; border: 1px solid var(--border-light); animation: none; }
 body.layout-instituto-ativo #modal.modal-inscricoes { width: min(1100px,94vw); max-width: 1100px; }
 body.layout-instituto-ativo #modal .modal-header { padding: 24px 28px; }
 body.layout-instituto-ativo #modal .modal-header h3 { font-size: 22px; }
 body.layout-instituto-ativo #modal .modal-body { padding: 14px 28px 24px; }
}
body.layout-instituto-ativo #modal :is(input,select,textarea) { border-radius: 4px; }
body.layout-instituto-ativo #modal .form-group > label { font-size: 12px; color: var(--text-secondary); }
body.layout-instituto-ativo #modal .btn { border-radius: 5px; box-shadow: none; }
@media (max-width: 1100px) {
 #app-shell-header .fin-app-navigation { display: none; }
 #app-shell-header .fin-institute-menu { margin-left: auto; }
}
@media (max-width: 768px) {
 #app.app-layout #content-area { padding: 18px 16px 88px; }
 #app.app-layout #content-area:has(.fin-workspace) { padding: 0; }
 #app-shell-header .fin-shell-header { padding: 4px 16px; gap: 4px; }
 #app-shell-header .fin-institute-menu { margin-left: 0; }
 #app-shell-header .app-shell-search { margin-left: auto; width: 44px; flex-shrink: 0; }
 #app-shell-header .app-shell-search span { display: none; }
 #app-shell-header .fin-user-menu { margin-left: 0; max-width: 40vw; }
 .app-section-navigation { padding: 8px 16px; gap: 3px; }
 .app-section-navigation .fin-app-link { padding: 8px; min-height: 44px; font-size: 11px; }
 #app.app-layout .page-header { align-items: flex-start; flex-wrap: wrap; }
 #app.app-layout .page-header h2 { font-size: 18px; }
 #app.app-layout .page-header .btn-group { flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
 #app-shell-header * { animation: none; transition: none; }
}
#app.app-layout :is(.agenda-chip,.tab-btn,[role="tab"]) { border-radius: 5px; min-height: 44px; box-shadow: none; }
#app.app-layout :is(.agenda-chip.active,.agenda-chip.ativa,.tab-btn.active,[role="tab"][aria-selected="true"]) { background: var(--fin-accent-strong); border-color: var(--fin-accent-strong); color: white; }
#app.app-layout .agenda-filters { background: transparent; border-radius: 0; padding: 0; border: 0; gap: 6px; }
body.layout-instituto-ativo #modal .form-group { border: 1px solid var(--border-light); border-radius: 4px; padding: 10px 12px; background: var(--surface); min-width: 0; }
body.layout-instituto-ativo #modal .form-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
body.layout-instituto-ativo #modal .form-group > label { font-size: 11px; margin-bottom: 5px; }
body.layout-instituto-ativo #modal .form-group > :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) { border: 0; border-radius: 0; padding: 4px 0; min-height: 30px; background: transparent; box-shadow: none; }
body.layout-instituto-ativo #modal .form-group > :is(input,select,textarea):focus { outline: none; }
#app.app-layout :is(.agenda-chip.active,.agenda-chip.ativa,.tab-btn.active,[role="tab"][aria-selected="true"]) svg { color: currentColor; }
#app.app-layout .config-colunas { grid-template-columns: minmax(0,1fr); }
#app.app-layout .config-abas.ui-tabs { display: flex; flex-direction: row; flex-wrap: wrap; width: 100%; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--fin-line); border-radius: 0; background: transparent; gap: 6px; overflow: visible; }
#app.app-layout .config-abas.ui-tabs [role="tab"] { width: auto; flex: 0 1 auto; }
