/*
 * FDSMS | Interface institucional 2026
 * Camada visual não destrutiva sobre app.css e CSS das etapas existentes.
 * Azul #39A8D4 · Azul profundo #174B69 · Verde #008A50 · Amarelo #FFC619
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --brand: #167ba4;
    --brand-dark: #174b69;
    --fdsms-sky: #39a8d4;
    --fdsms-navy: #174b69;
    --fdsms-green: #008a50;
    --fdsms-yellow: #ffc619;
    --bg: #f4f9fc;
    --card: #ffffff;
    --text: #1c3549;
    --muted: #586e80;
    --border: #dce8ef;
    --danger: #a52b38;
    --danger-bg: #fff0f1;
    --success: #0b7347;
    --success-bg: #e7f6ee;
    --fdsms-sidebar-width: 266px;
    --fdsms-shadow: 0 12px 38px rgba(20, 72, 104, .065);
    --fdsms-radius: 19px;
    font-synthesis: none;
}

html { background: var(--bg); scroll-behavior: smooth; }
body { color: var(--text); background: var(--bg); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14.5px; line-height: 1.58; }
button, input, select, textarea { font: inherit; }
a { color: #12658c; text-underline-offset: 3px; }
a:hover { color: #0b4d70; }
:focus-visible { outline: 3px solid #edb526 !important; outline-offset: 3px !important; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: #b7e7f8; color: #123b53; }
h1, h2, h3, h4, h5, h6 { color: var(--fdsms-navy); letter-spacing: -.035em; overflow-wrap: break-word; }
h1 { font-size: clamp(1.65rem, 2.65vw, 2.45rem); font-weight: 800; line-height: 1.18; }
h2 { font-weight: 800; }
p { overflow-wrap: break-word; }
small, .muted, .subtext, .field-help { color: var(--muted); }
.eyebrow { color: #176b92; font-size: .7rem; letter-spacing: .12em; font-weight: 900; }
[hidden] { display: none !important; }

/* Navegação lateral única para todos os módulos */
body.fdsms-app { min-height: 100vh; padding-left: var(--fdsms-sidebar-width); background: radial-gradient(circle at 94% 0, rgba(57,168,212,.09), transparent 38%), var(--bg); }
.fdsms-skip-link { position: fixed; z-index: 10030; top: 8px; left: 12px; background: var(--fdsms-yellow); color: #173447; padding: 12px 18px; border-radius: 10px; font-weight: 900; transform: translateY(-180%); text-decoration: none; }
.fdsms-skip-link:focus { transform: translateY(0); }
.fdsms-sidebar { position: fixed; z-index: 300; inset: 0 auto 0 0; width: var(--fdsms-sidebar-width); display: flex; flex-direction: column; background: linear-gradient(171deg, #174b69 0%, #10374f 60%, #092d42 100%); color: #f0f8fc; box-shadow: 6px 0 30px rgba(12,49,73,.07); }
.fdsms-sidebar-brand { display: flex; align-items: center; min-height: 110px; padding: 19px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.115); }
.fdsms-brand-link { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; min-width: 0; }
.fdsms-brand-link:hover { color: #fff; }
.fdsms-brand-link img { display: block; width: 44px; height: 65px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.12)); }
.fdsms-brand-link strong { display: block; font-size: 1.3rem; line-height: 1.1; font-weight: 900; letter-spacing: .05em; }
.fdsms-brand-link small { display: block; color: #bddbe9; font-size: .67rem; margin-top: 6px; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.fdsms-sidebar-scroll { flex: 1; min-height: 0; overflow: auto; padding: 14px 11px 22px; scrollbar-color: #56829a transparent; scrollbar-width: thin; }
.fdsms-nav-group { margin: 0 0 18px; }
.fdsms-nav-heading { color: #a6cedd; margin: 0; padding: 15px 14px 8px; font-size: .64rem; line-height: 1.5; font-weight: 800; letter-spacing: .145em; text-transform: uppercase; }
.fdsms-nav-link { position: relative; min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; margin: 3px 0; color: #e2eff5; text-decoration: none; font-size: .83rem; font-weight: 650; transition: background .18s, color .18s, transform .18s; }
.fdsms-nav-link > span { flex: 1; }
.fdsms-nav-link > .fdsms-icon:last-child { width: 14px; height: 14px; opacity: .45; }
.fdsms-nav-link:hover, .fdsms-nav-link:focus-visible { color: #fff; background: rgba(255,255,255,.13); }
.fdsms-nav-link.is-active { background: #dff5ff; color: #123c55; box-shadow: inset 3px 0 0 var(--fdsms-yellow); font-weight: 800; }
.fdsms-nav-link.is-active > .fdsms-icon:last-child { opacity: .8; }
.fdsms-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.fdsms-sidebar-bottom { padding: 13px 14px 19px; border-top: 1px solid rgba(255,255,255,.12); background: rgba(3,25,39,.19); }
.fdsms-sidebar-user { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 5px 3px 13px; }
.fdsms-avatar { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 12px; background: #4ab6d8; color: #0d3850; font-size: 1.02rem; font-weight: 900; }
.fdsms-user-meta { flex: 1; min-width: 0; }
.fdsms-user-meta strong { display: block; color: #fff; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdsms-user-meta small { display: block; color: #b9d5e2; font-size: .67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fdsms-sidebar-tools { display: grid; grid-template-columns: 1fr; gap: 3px; }
.fdsms-tool-link { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 34px; padding: 6px 8px; font-size: .77rem; font-weight: 700; background: transparent; border: 0; border-radius: 9px; color: #d1eaf5; text-decoration: none; cursor: pointer; text-align: left; }
.fdsms-tool-link .fdsms-icon { width: 17px; height: 17px; }
.fdsms-tool-link:hover { color: white; background: rgba(255,255,255,.1); }
.fdsms-logout-form { margin: 0; }
.fdsms-mobile-header, .fdsms-menu-backdrop, .fdsms-sidebar-close { display: none; }
.fdsms-app .portal-theme-switch { display: none !important; } /* o controle completo fica na navegação */

/* Cabeçalho e estrutura das páginas preexistentes */
.fdsms-app .topbar { position: sticky; top: 0; z-index: 90; min-height: 82px; padding: 16px clamp(22px, 3.4vw, 49px); background: rgba(255,255,255,.96); color: var(--text); border-bottom: 1px solid var(--border); box-shadow: 0 3px 14px rgba(13,61,92,.025); backdrop-filter: blur(16px); }
.fdsms-app .topbar > div { min-width: 0; }
.fdsms-app .topbar strong { color: var(--fdsms-navy); font-size: .94rem; letter-spacing: -.02em; }
.fdsms-app .topbar-sub { color: var(--muted); opacity: 1; margin-top: 4px; font-size: .78rem; font-weight: 550; }
.fdsms-app .topbar-link { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 auto; min-height: 38px; padding: 8px 15px; background: #eaf5fa; border: 1px solid #d7ebf4; border-radius: 10px; color: #175475; font-size: .8rem; font-weight: 800; text-decoration: none; }
.fdsms-app .topbar-link:hover { background: #d9eff8; color: #123a55; }
.fdsms-app .portal-topbar-brand, .fdsms-app .portal-topbar-brand:hover { color: var(--fdsms-navy); }
.fdsms-app .portal-topbar-logo { width: 37px; height: 49px; object-fit: contain; }
.fdsms-app .portal-topbar-title { font-size: 1.05rem; }
.fdsms-app .topbar .btn-link { border: 1px solid #d7ebf4; background: #eaf5fa; color: #174b69; font-weight: 800; min-height: 40px; border-radius: 10px; }
.fdsms-app .topbar .btn-link:hover { background: #dceffa; }
.fdsms-app .topbar form { margin: 0; }
.fdsms-app .container { width: min(1250px, calc(100% - 68px)); max-width: none; padding: 37px 0 76px; margin-inline: auto; }
.fdsms-app .container.narrow, .fdsms-app .container.narrow-form { max-width: 920px; }
.fdsms-app .narrow-form .form-card { max-width: 100%; }
.fdsms-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; padding: 20px clamp(24px,3.4vw,49px) 28px; border-top: 1px solid #dce9f1; background: #f7fbfd; }
.fdsms-footer div { display: flex; flex-direction: column; line-height: 1.55; }
.fdsms-footer strong { color: var(--fdsms-navy); font-weight: 900; letter-spacing: .04em; }
.fdsms-footer span, .fdsms-footer small { font-size: .7rem; color: var(--muted); }

/* Banner do painel e cartões */
.fdsms-app .welcome { position: relative; overflow: hidden; min-height: 176px; margin: 0 0 26px; padding: clamp(23px, 3vw, 34px); border: 1px solid #cee6f0; background: linear-gradient(115deg, #e7f7fc 0%, #f6fcfe 64%, #e8f6eb 100%); border-radius: 22px; box-shadow: 0 9px 22px rgba(22,93,129,.055); }
.fdsms-app .welcome::after { content: ''; position: absolute; width: 260px; height: 260px; top: -115px; right: -45px; border-radius: 50%; border: 44px solid rgba(57,168,212,.14); pointer-events: none; }
.fdsms-app .welcome h1 { position: relative; z-index: 1; margin-top: 5px; font-size: clamp(1.5rem, 2.55vw, 2.3rem); max-width: 850px; }
.fdsms-app .welcome p { position: relative; z-index: 1; margin-bottom: 0; color: #405d71; font-size: .88rem; }
.fdsms-app .welcome .eyebrow { color: #0e688d; margin-bottom: 6px; }
.fdsms-app .grid-cards { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.fdsms-app .feature-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--fdsms-radius); box-shadow: var(--fdsms-shadow); transition: transform .19s, box-shadow .19s, border-color .19s; }
.fdsms-app .feature-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(20,72,104,.1); border-color: #bfdfed; }
.fdsms-app .feature-card > .fdsms-card-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 15px; border: 1px solid #ccecf7; border-radius: 13px; background: #e6f6fc; color: #146b92; }
.fdsms-app .feature-card[data-module='financeiro'] .fdsms-card-icon, .fdsms-app .feature-card[data-module='competicoes'] .fdsms-card-icon { background: #e5f6ed; border-color: #c5e9d6; color: #007346; }
.fdsms-app .feature-card[data-module='limpeza'] .fdsms-card-icon { color: #8d6712; background: #fff5dc; border-color: #fbe7a3; }
.fdsms-app .feature-card h2 { margin: 0 0 7px; font-size: 1.05rem; line-height: 1.35; }
.fdsms-app .feature-card p { margin: 0 0 18px; font-size: .82rem; line-height: 1.65; flex: 1; }
.fdsms-app .feature-card .card-action { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding: 8px 0 0; font-size: .81rem; color: #12658c; text-decoration: none; font-weight: 850; }
.fdsms-app .feature-card .card-action::after { content: '→'; font-size: 1.15rem; line-height: .9; transition: transform .15s; }
.fdsms-app .feature-card .card-action:hover::after { transform: translateX(4px); }
.fdsms-app .permission-box { margin-top: 22px; background: #fff; }
.fdsms-app .status-badge { font-size: .68rem; padding: 5px 10px; margin: 0 0 14px; }

/* Cartões, seções, formulários, filtros e tabelas */
.fdsms-app :is(.form-card,.simple-card,.feature-card,.permission-box,.competition-card,.competition-section,.competition-hero,.review-box,.metric-card,.section-card,.release-hero,.release-card,.release-footer-note,.profile-card,.permissions-hero,.person-header-card,.notification-card,.unified-section,.table-wrap,.permission-table-wrap,.privacy-note,.rule-box) { border-color: var(--border); border-radius: var(--fdsms-radius); }
.fdsms-app :is(.form-card,.simple-card,.permission-box,.competition-card,.competition-section,.competition-hero,.metric-card,.section-card,.release-hero,.release-card,.release-footer-note,.profile-card,.permissions-hero,.person-header-card,.notification-card,.unified-section) { background: var(--card); box-shadow: var(--fdsms-shadow); }
.fdsms-app .page-heading { align-items: center; margin-bottom: 24px; }
.fdsms-app .page-heading h1 { margin-bottom: 9px; }
.fdsms-app .page-heading p:last-child { margin-bottom: 0; }
.fdsms-app .page-heading > div:first-child { min-width: 0; }
.fdsms-app .filters { margin-top: 18px; margin-bottom: 21px; padding: 19px; background: #fff; border-color: var(--border); border-radius: 15px; box-shadow: 0 4px 20px rgba(17,75,107,.035); }
.fdsms-app label { color: #27465b; font-weight: 750; font-size: .81rem; }
.fdsms-app :is(input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']), select, textarea) { width: 100%; border: 1px solid #cedde7; background: #fff; color: #17384d; border-radius: 10px; min-height: 43px; padding: 10px 12px; box-shadow: inset 0 1px 2px rgba(17,67,99,.02); }
.fdsms-app textarea { min-height: 95px; resize: vertical; }
.fdsms-app input[type='checkbox'], .fdsms-app input[type='radio'], .login-page input[type='checkbox'] { width: 19px; height: 19px; min-height: 0; accent-color: var(--fdsms-green); flex: 0 0 auto; }
.fdsms-app input[type='file'] { width: 100%; max-width: 100%; padding: 10px; border: 1px dashed #b8d3e2; border-radius: 10px; background: #f9fcfe; }
.fdsms-app :is(input,select,textarea)::placeholder { color: #71889a; opacity: 1; }
.fdsms-app :is(input,select,textarea):focus { border-color: #329cc8; outline: 3px solid rgba(57,168,212,.2); outline-offset: 1px; }
.fdsms-app :is(input:disabled, select:disabled, textarea:disabled, input[readonly]) { background: #eff5f8; color: #5b6e7b; }
.fdsms-app :is(.btn-primary,.btn-secondary,.btn-danger) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 43px; margin-top: 0; padding: 10px 17px; border-radius: 11px; font-weight: 800; font-size: .81rem; text-decoration: none; transition: transform .16s, background .16s, box-shadow .16s; cursor: pointer; }
.fdsms-app .btn-primary { background: #126e96; border: 1px solid #126e96; color: #fff; box-shadow: 0 6px 16px rgba(19,105,147,.13); }
.fdsms-app .btn-primary:hover { background: #0b4e70; border-color: #0b4e70; color: #fff; transform: translateY(-1px); }
.fdsms-app .btn-secondary { border: 1px solid #bbd7e5; background: #f0f8fb; color: #145575; }
.fdsms-app .btn-secondary:hover { background: #e0f0f8; color: #123e5c; }
.fdsms-app .btn-danger { color: #fff; background: #a52b38; border: 1px solid #a52b38; }
.fdsms-app .btn-danger:hover { background: #86202c; }
.fdsms-app .form-card .btn-primary { margin-top: 18px; }
.fdsms-app .form-actions .btn-primary, .fdsms-app .heading-actions .btn-primary, .fdsms-app .competition-actions .btn-primary, .fdsms-app .category-actions .btn-primary, .fdsms-app .filters .btn-primary { margin-top: 0; }
.fdsms-app .form-actions { gap: 10px; }
.fdsms-app :is(.tabs-inline a,.release-nav a) { color: #215771; background: #fff; border-color: #d3e5ef; border-radius: 10px; font-size: .78rem; }
.fdsms-app :is(.tabs-inline a.active, .tabs-inline a[aria-current='page']) { border-color: #78bddb; background: #eaf7fc; color: #115579; }
.fdsms-app .table-wrap, .fdsms-app .permission-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); box-shadow: var(--fdsms-shadow); }
.fdsms-app :is(.data-table,.permission-table) { width: 100%; border-collapse: separate; border-spacing: 0; }
.fdsms-app :is(.data-table,.permission-table) th { position: relative; background: #f0f7fb; color: #31566d; font-size: .69rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; white-space: nowrap; }
.fdsms-app :is(.data-table,.permission-table) td { font-size: .82rem; color: var(--text); }
.fdsms-app :is(.data-table,.permission-table) :is(th,td) { border-bottom: 1px solid #e5eef4; padding: 13px 15px; }
.fdsms-app :is(.data-table,.permission-table) tbody tr:hover { background: #f7fbfd; }
.fdsms-app .data-table td a { font-weight: 750; }
.fdsms-app .fdsms-table-filter { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin: 16px 0 10px; }
.fdsms-app .fdsms-table-filter label { max-width: 340px; flex: 1 1 260px; font-weight: 700; margin: 0; }
.fdsms-app .fdsms-table-filter input { margin-top: 5px; }
.fdsms-app .fdsms-table-count { align-self: center; color: var(--muted); font-size: .72rem; }
.fdsms-app .status-badge, .fdsms-app .badge, .fdsms-app .competition-status, .fdsms-app .release-status, .fdsms-app .profile-scope { border-radius: 100px; font-weight: 850; letter-spacing: .01em; }
.fdsms-app :is(.alert,.privacy-note,.rule-box,.review-box,.profile-note,.release-note) { border-radius: 12px; line-height: 1.65; }
.fdsms-app .alert { border: 1px solid transparent; padding: 13px 17px; }
.fdsms-app .alert-success { border-color: #bae6ce; }
.fdsms-app .alert-error { border-color: #f2c9cf; }
.fdsms-app .alert-warning { border-color: #f4d992; }
.fdsms-app .competition-grid { gap: 17px; }
.fdsms-app .competition-card { padding: 23px; }
.fdsms-app .competition-card h2 { font-size: 1.08rem; margin: 12px 0 7px; }
.fdsms-app .competition-card .competition-status { background: #e5f6ee; color: #096841; }
.fdsms-app :is(.competition-card,.competition-section) p { font-size: .84rem; line-height: 1.65; }
.fdsms-app .metric-card { border-top: 3px solid #39a8d4; padding: 20px; }
.fdsms-app .metric-card:nth-child(2) { border-top-color: var(--fdsms-green); }
.fdsms-app .metric-card:nth-child(3) { border-top-color: var(--fdsms-yellow); }
.fdsms-app .metric-card:nth-child(4) { border-top-color: #6b93bd; }
.fdsms-app .metric-card span { color: var(--muted); font-size: .77rem; }
.fdsms-app .metric-card strong { color: #154b6a; }
.fdsms-app :is(.function-option, .participant-row, .association-counts div, .result-list div) { border-color: var(--border); }
.fdsms-app .function-option:hover { background: #f5fafc; }
.fdsms-app .field-group, .fdsms-app .unified-section { border-color: var(--border); }
.fdsms-app .readonly-grid > div, .fdsms-app .automatic-charge-info { background: #f7fbfd; border-color: var(--border); }
.fdsms-app .notification-card h2 { color: var(--fdsms-navy); }
.fdsms-app .release-card::before { background: var(--fdsms-green); }
.fdsms-app .separator { border-top-color: var(--border); }

/* Suporte opcional para conteúdos institucionais em Libras com legenda sincronizada. */
.fdsms-libras-panel { margin: 22px 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--fdsms-radius); background: var(--card); box-shadow: var(--fdsms-shadow); }
.fdsms-libras-panel h2 { font-size: 1.1rem; }
.fdsms-libras-video { display: block; width: min(100%, 800px); aspect-ratio: 16 / 9; background: #081827; border-radius: 12px; }

/* Login: área institucional + formulário original sem alterar autenticação */
body.login-page { display: block; min-height: 100vh; padding: 0; background: #f4f9fc; }
.fdsms-auth-layout { min-height: 100vh; width: 100%; display: grid; grid-template-columns: minmax(330px, 47%) minmax(360px, 53%); }
.fdsms-auth-intro { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(35px, 6vw, 82px); color: #fff; background: linear-gradient(155deg, #174b69 0%, #0d405c 62%, #0a614d 118%); }
.fdsms-auth-intro::before { content: ''; position: absolute; width: 420px; height: 420px; right: -220px; top: 18%; border: 75px solid rgba(57,168,212,.15); border-radius: 50%; }
.fdsms-auth-intro::after { content: ''; position: absolute; width: 220px; height: 220px; right: 20%; bottom: -150px; border: 48px solid rgba(255,198,25,.11); border-radius: 50%; }
.fdsms-auth-intro > * { position: relative; z-index: 1; }
.fdsms-auth-mark { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.fdsms-auth-mark img { width: 70px; height: 102px; object-fit: contain; }
.fdsms-auth-fullname { max-width: 440px; margin: 0; color: #fff; font-size: clamp(.84rem, 1.35vw, 1rem); line-height: 1.55; font-weight: 700; }
.fdsms-auth-intro h2 { max-width: 610px; color: #fff; font-size: clamp(2rem,3.7vw,3.85rem); line-height: 1.14; letter-spacing: -.045em; margin: 22px auto 19px; text-align: center; }
.fdsms-auth-intro h2 em { font-style: normal; color: #9ee2f9; }
.fdsms-auth-intro .fdsms-auth-lead { max-width: 500px; color: #d3e7ef; font-size: 1.02rem; line-height: 1.8; margin: 0 auto; text-align: center; }
.fdsms-auth-intro .fdsms-auth-bottom { display: flex; align-items: center; gap: 8px; color: #b8d9e6; font-size: .75rem; }
.fdsms-auth-intro .fdsms-auth-bottom::before { content: ''; height: 9px; width: 9px; background: var(--fdsms-yellow); border-radius: 50%; }
.fdsms-auth-form-area { display: flex; align-items: center; justify-content: center; padding: 38px 30px; }
.login-page .login-wrap { width: min(100%, 460px); }
.login-page .login-card { width: 100%; padding: 39px; background: white; border: 1px solid #e3edf3; border-radius: 23px; box-shadow: 0 23px 70px rgba(18,63,88,.075); }
.login-page .portal-login-logo-wrap { display: none; }
.login-page .eyebrow { font-size: .68rem; color: #1682ab; }
.login-page .fdsms-auth-intro .eyebrow { text-align: center; }
.login-page h1 { font-size: clamp(1.8rem, 2.8vw, 2.3rem); margin: 6px 0; }
.login-page .muted { line-height: 1.65; margin-bottom: 21px; font-size: .83rem; }
.login-page label { margin: 16px 0 7px; color: #31526b; font-size: .79rem; font-weight: 800; }
.login-page input:not([type='hidden']) { min-height: 49px; border-radius: 11px; border-color: #d0e0e8; color: #193b4e; }
.login-page .btn-primary { margin-top: 25px; padding: 14px; border-radius: 11px; background: #126e96; color: white; font-size: .9rem; box-shadow: 0 10px 19px rgba(18,110,150,.15); }
.login-page .btn-primary:hover { background: #0f5070; }
.login-page .login-footer { margin-top: 23px; font-size: .73rem; }
.login-page .fdsms-login-trust { padding-top: 19px; margin: 14px 0 0; border-top: 1px solid #e6eff4; display: flex; align-items: flex-start; gap: 8px; color: #587185; font-size: .73rem; line-height: 1.6; }
.login-page .fdsms-login-trust .fdsms-icon { width: 17px; height: 17px; color: #008a50; }
.fdsms-error-page { min-height: 100vh; display: grid; place-items: center; }
.fdsms-error-page .simple-card { padding: 35px; box-shadow: var(--fdsms-shadow); }

/* Tema escuro: mantém o cookie/endpoint já existentes */
body[data-fdsms-theme='escuro'] { --bg: #091827 !important; --card: #13283a !important; --text: #e8f2f8 !important; --muted: #b5c7d4 !important; --border: #355165 !important; --fdsms-navy: #e7f5ff; --fdsms-shadow: 0 12px 34px rgba(0,0,0,.16); background: #091827 !important; color: #e8f2f8 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .topbar { background: #122d40 !important; border-color: #355165; }
body[data-fdsms-theme='escuro'].fdsms-app .topbar :is(strong,.portal-topbar-title) { color: #ecf8ff !important; }
body[data-fdsms-theme='escuro'].fdsms-app .topbar :is(.topbar-link,.btn-link) { background: #21465e !important; color: #edf8ff !important; border-color: #45667b !important; }
body[data-fdsms-theme='escuro'] :is(h1,h2,h3,h4,h5,h6,legend,label,.metric-card strong) { color: #e9f6ff !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(.form-card,.simple-card,.feature-card,.permission-box,.competition-card,.competition-section,.competition-hero,.metric-card,.section-card,.release-hero,.release-card,.release-footer-note,.profile-card,.permissions-hero,.person-header-card,.notification-card,.unified-section,.table-wrap,.permission-table-wrap,.filters) { background: #13283a !important; color: #e8f2f8 !important; border-color: #355165 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .welcome { background: linear-gradient(115deg, #173a52, #183b42) !important; border-color: #385f72 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .welcome p { color: #c6dce8 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .welcome h1 { color: #f4fbff !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(.data-table,.permission-table) th { background: #1e4054 !important; color: #e0f1fb !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(.data-table,.permission-table) td { color: #e8f2f8 !important; border-color: #355165 !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(.data-table,.permission-table) tbody tr:hover { background: #1a384d !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(input:not([type='checkbox']):not([type='radio']):not([type='hidden']),select,textarea) { background: #0d2233 !important; color: #ecf8ff !important; border-color: #476579 !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(.btn-secondary,.tabs-inline a,.release-nav a) { background: #1c4057 !important; color: #e7f4ff !important; border-color: #4d728a !important; }
body[data-fdsms-theme='escuro'].fdsms-app .btn-primary { background: #126e96 !important; color: #fff !important; }
body[data-fdsms-theme='escuro'].fdsms-app :is(.readonly-grid > div,.automatic-charge-info,.privacy-note,.rule-box,.review-box,.release-note,.profile-note,.observation-row td) { background: #19374a !important; color: #e3eff7 !important; border-color: #3c6074 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .fdsms-footer { background: #0d2435 !important; border-color: #355165 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .fdsms-footer strong { color: #d9f2fc !important; }
body[data-fdsms-theme='escuro'] :is(.fdsms-nav-heading,.fdsms-user-meta small) { color: #bad7e8 !important; }
body[data-fdsms-theme='escuro'].fdsms-app .badge,body[data-fdsms-theme='escuro'].fdsms-app .competition-status { background: #234761; color: #d6effc; }

@media (max-width: 1250px) {
    .fdsms-app .grid-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fdsms-app .competition-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fdsms-app .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 990px) {
    :root { --fdsms-sidebar-width: 266px; }
    body.fdsms-app { padding-left: 0; }
    .fdsms-mobile-header { position: sticky; top: 0; z-index: 120; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; padding: 0 17px; color: #fff; background: #174b69; box-shadow: 0 3px 15px rgba(0,0,0,.12); }
    .fdsms-menu-toggle { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.26); border-radius: 9px; color: #fff; background: transparent; font-size: .82rem; font-weight: 800; cursor: pointer; }
    .fdsms-mobile-brand { color: white; text-decoration: none; font-size: .87rem; }
    .fdsms-mobile-brand strong { color: #fff; }
    .fdsms-mobile-spacer { width: 70px; }
    .fdsms-sidebar { width: min(288px, calc(100vw - 48px)); z-index: 510; transform: translateX(-105%); transition: transform .23s ease; }
    body.fdsms-nav-open .fdsms-sidebar { transform: translateX(0); }
    .fdsms-sidebar-close { display: grid; place-items: center; margin-left: auto; padding: 7px; color: #fff; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: 9px; cursor: pointer; }
    .fdsms-sidebar-close .fdsms-icon { width: 18px; height: 18px; }
    .fdsms-menu-backdrop { position: fixed; display: none; inset: 0; width: 100%; height: 100%; padding: 0; z-index: 500; background: rgba(2,22,36,.62); border: none; cursor: pointer; }
    body.fdsms-nav-open .fdsms-menu-backdrop { display: block; }
    body.fdsms-nav-open { overflow: hidden; }
    .fdsms-app .topbar { top: 58px; min-height: 62px; padding: 12px 23px; }
    .fdsms-app .container { width: min(100% - 42px, 1250px); padding-top: 28px; }
    .fdsms-app .filters-wide, .fdsms-app .filters-finance-65, .fdsms-app .filters-finance { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 670px) {
    body { font-size: 14px; }
    .fdsms-app .topbar { padding: 11px 17px; gap: 9px; }
    .fdsms-app .topbar strong { font-size: .82rem; }
    .fdsms-app .topbar-sub { font-size: .69rem; }
    .fdsms-app .topbar-link { padding: 8px 10px; font-size: .73rem; }
    .fdsms-app .portal-topbar-logo { width: 27px; height: 37px; }
    .fdsms-app .portal-topbar-title { font-size: .86rem; }
    .fdsms-app .container { width: calc(100% - 28px); padding: 20px 0 48px; }
    .fdsms-app .welcome { padding: 21px; min-height: auto; }
    .fdsms-app .welcome::after { width: 140px; height: 140px; top: -55px; right: -60px; border-width: 25px; }
    .fdsms-app .grid-cards, .fdsms-app .metric-grid, .fdsms-app .competition-grid, .fdsms-app .participant-columns { grid-template-columns: 1fr; }
    .fdsms-app .feature-card, .fdsms-app .form-card, .fdsms-app .simple-card, .fdsms-app .section-card, .fdsms-app .competition-hero, .fdsms-app .competition-card, .fdsms-app .competition-section { padding: 19px; }
    .fdsms-app .page-heading { flex-direction: column; align-items: stretch; gap: 12px; }
    .fdsms-app .filters, .fdsms-app .filters-wide, .fdsms-app .filters-finance, .fdsms-app .filters-finance-65 { grid-template-columns: 1fr; padding: 15px; }
    .fdsms-app :is(.heading-actions,.form-actions,.category-actions,.competition-actions) { width: 100%; }
    .fdsms-app :is(.heading-actions,.form-actions,.category-actions,.competition-actions) > :is(a,button) { width: 100%; }
    .fdsms-app .data-table th,.fdsms-app .data-table td { padding: 11px 12px; }
    .fdsms-footer { padding: 18px 18px 25px; }
}
@media (max-width: 860px) {
    .fdsms-auth-layout { grid-template-columns: 1fr; }
    .fdsms-auth-intro { min-height: 250px; padding: 22px 26px; gap: 17px; }
    .fdsms-auth-mark img { width: 42px; height: 62px; }
    .fdsms-auth-fullname { font-size: .83rem; line-height: 1.4; }
    .fdsms-auth-intro h2 { font-size: clamp(1.65rem, 4vw, 2.4rem); margin: 8px auto; }
    .fdsms-auth-intro .fdsms-auth-lead { font-size: .87rem; }
    .fdsms-auth-intro .fdsms-auth-bottom { display: none; }
    .fdsms-auth-form-area { padding: 26px 20px 46px; }
    .login-page .login-card { padding: 28px; }
}
@media (max-width: 425px) {
    .fdsms-auth-intro { min-height: 170px; }
    .fdsms-auth-intro .fdsms-auth-lead { display: none; }
    .fdsms-auth-form-area { padding: 17px 12px 33px; }
    .login-page .login-card { padding: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
