/* Páginas independentes usam os mesmos tokens de superfícies, campos, ações e
   seleção do sistema. Todos os ajustes são reversíveis pelo visual antigo. */
html.sf-pilot-modern.sf-pilot-public body {
    min-height: 100vh; min-height: 100dvh; height: auto; padding: 24px 0 32px; box-sizing: border-box;
}
html.sf-pilot-modern.sf-pilot-public body .sf-responsive-standalone-content {
    float: none; width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 24px;
    min-width: 0; box-sizing: border-box; overflow-wrap: anywhere;
}
html.sf-pilot-modern.sf-pilot-public body .sf-responsive-standalone-content:not(.landing-wrapper) {
    border: 1px solid var(--sf-border); border-radius: 12px; box-shadow: var(--sf-shadow);
}
html.sf-pilot-modern.sf-pilot-public body :is(form, .ui-fieldset-content) { min-width: 0; }
html.sf-pilot-modern.sf-pilot-public body .login-panel { width: min(520px, calc(100% - 32px)); }
html.sf-pilot-modern.sf-pilot-public body :is(.logo, img.sf-responsive-image) { max-width: 100%; height: auto; }
html.sf-pilot-modern.sf-pilot-public body .logo { object-fit: contain; padding: 8px; background: #fff; border-radius: 10px; box-sizing: border-box; }
html.sf-pilot-modern.sf-pilot-public body > .ui-g-2,
html.sf-pilot-modern.sf-pilot-public body > form > .ui-g-2 { display: none; }
html.sf-pilot-modern.sf-pilot-public body .ui-fieldset > .ui-fieldset-legend {
    background: var(--sf-surface); color: var(--sf-text); border: 1px solid var(--sf-border);
    border-radius: 10px; padding: 10px 14px; font-weight: 600; line-height: 1.4;
}
html.sf-pilot-modern.sf-pilot-public body .md-inputfield { display: flex; flex-direction: column; text-align: left; }
html.sf-pilot-modern.sf-pilot-public body .md-inputfield > label {
    position: static !important; transform: none !important; order: -1; margin: 0 0 8px;
    color: var(--sf-text) !important; font-size: 14px !important; line-height: 1.4;
}
html.sf-pilot-modern.sf-pilot-public body :is(input.ui-inputfield, textarea.ui-inputfield) {
    min-height: 44px; padding: 8px 12px; max-width: 100%; box-sizing: border-box;
}
html.sf-pilot-modern.sf-pilot-public body :is(.ui-selectonemenu, .ui-selectcheckboxmenu) { min-height: 44px; }
html.sf-pilot-modern.sf-pilot-public body .ui-selectonemenu .ui-selectonemenu-label { min-height: 42px; padding: 8px 12px; box-sizing: border-box; }
html.sf-pilot-modern.sf-pilot-public body .ui-autocomplete .ui-autocomplete-dropdown { height: 44px; }
html.sf-pilot-modern.sf-pilot-public body .ui-inputgroup { height: auto; align-items: flex-end; }
html.sf-pilot-modern.sf-pilot-public body .ui-button { min-height: 40px; }
html.sf-pilot-modern.sf-pilot-public body .ui-button-text { white-space: normal; }
html.sf-pilot-modern.sf-pilot-public body .ui-fileupload-buttonbar {
    background: var(--sf-soft); border-color: var(--sf-border); border-radius: 8px 8px 0 0;
}
html.sf-pilot-modern.sf-pilot-public body .ui-fileupload-content { background: var(--sf-surface); border-color: var(--sf-border); }
html.sf-pilot-modern.sf-pilot-public body :is(.sf-responsive-standalone-content, .exception-detail) a:not(.ui-button) { color: var(--sf-accent); }
/* A cor original de cada aviso vira o brilho ao redor do card, como no login.
   A superfície do card e o fundo de apoio continuam seguindo claro/escuro. */
html.sf-pilot-modern.sf-pilot-public body.exception-body,
html.sf-pilot-modern.sf-pilot-licencaInvalida body {
    --sf-exception-rgb: 230, 42, 16;
    --sf-exception-glow: rgba(var(--sf-exception-rgb), .28);
    background: radial-gradient(ellipse at 50% 20%, var(--sf-exception-glow), transparent 75%), var(--sf-bg) !important;
    background-attachment: fixed !important; background-repeat: no-repeat !important;
}
html.sf-pilot-modern.sf-pilot-public body.accessdenied-page { --sf-exception-rgb: 233, 30, 99; }
html.sf-pilot-modern.sf-pilot-public body.notfound-page { --sf-exception-rgb: 63, 81, 181; }
html.sf-pilot-modern.sf-pilot-licencaInvalida body { --sf-exception-rgb: 205, 92, 92; }
html.sf-pilot-modern.sf-pilot-public.sf-pilot-dark body.exception-body,
html.sf-pilot-modern.sf-pilot-licencaInvalida.sf-pilot-dark body {
    --sf-exception-glow: rgba(var(--sf-exception-rgb), .22);
}
/* Erros: código ilustrado compacto, mensagem e comandos preservados. */
html.sf-pilot-modern.sf-pilot-public body.exception-body { display: flex; flex-direction: column; align-items: center; padding: 40px 16px; }
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-type {
    background: transparent !important; width: min(520px, 100%); height: auto;
    padding: 0; border: 0; box-sizing: border-box;
}
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-type img { width: 240px; max-width: 100%; max-height: 140px; object-fit: contain; }
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-panel { width: min(520px, 100%); padding: 28px; margin: 20px auto 0; }
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-panel h1 { color: var(--sf-text); font-size: 28px; line-height: 1.2; }
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-panel > i { color: var(--sf-accent); font-size: 48px; }
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-detail { color: var(--sf-muted); margin: 20px 0 28px; line-height: 1.6; }
html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-panel form + form { margin-top: 10px; }
/* Landing e agenda pública conservam conteúdo, logo e cores dos eventos. */
html.sf-pilot-modern.sf-pilot-public body.landing-body { padding: 0 0 24px; }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper { width: 100%; padding: 0; }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper #header {
    background: linear-gradient(110deg, var(--sf-topbar-start), var(--sf-topbar-end)); color: #e7eef9; min-height: 0;
}
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper #header .header-top { background: transparent; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px 24px; box-sizing: border-box; }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper #header :is(h1, .ui-outputlabel, #menu > li > a, #menu-button) { color: #e7eef9; }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper :is(#features, #promotion, #pricing, #video, .footer) { background: var(--sf-bg); color: var(--sf-text); border-color: var(--sf-border); }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper :is(#features, #promotion, #pricing, #video, .footer) :is(h1, h2, h3, p, a) { color: inherit; }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper .pricing-header { background: var(--sf-selected); color: var(--sf-selected-ink, var(--sf-text)); }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper .feature-icon { background: var(--sf-surface); border-color: var(--sf-border); }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper .feature-icon i { color: var(--sf-accent); }
html.sf-pilot-modern.sf-pilot-public body .landing-wrapper .pricing-content i { color: var(--sf-accent); }
html.sf-pilot-modern.sf-pilot-public body .fc-toolbar h2 { color: var(--sf-text); }
@media (max-width: 1024px) {
    html.sf-pilot-modern.sf-pilot-public body .sf-responsive-standalone-content { width: calc(100% - 24px); padding: 16px; }
    html.sf-pilot-modern.sf-pilot-public body .sf-responsive-standalone-content.landing-wrapper { width: 100%; padding: 0; }
    html.sf-pilot-modern.sf-pilot-public body .landing-wrapper #header .header-top #menu { background: var(--sf-surface); color: var(--sf-text); }
    html.sf-pilot-modern.sf-pilot-public body .landing-wrapper #header .header-top #menu > li > a { color: var(--sf-text); }
    html.sf-pilot-modern.sf-pilot-public body .landing-wrapper #header .header-top #menu > li > a:hover { background: var(--sf-soft); }
}
@media (max-width: 767px) {
    html.sf-pilot-modern.sf-pilot-public body .sf-responsive-standalone-content { width: calc(100% - 16px); padding: 12px; }
    html.sf-pilot-modern.sf-pilot-public body.exception-body { padding: 24px 8px; }
    html.sf-pilot-modern.sf-pilot-public body.exception-body .exception-panel { padding: 20px; }
    html.sf-pilot-modern.sf-pilot-public body .ui-button { min-height: 44px; }
}
