/* ==========================================================================
   FoundrsOS — Design System (handoff design_handoff_foundrsos)
   Tokens, base, shells, componentes e estados.
   Breakpoints: mobile < 760 · tablet < 1180 · desktop >= 1180 (org/commit hint >= 1280)
   ========================================================================== */

:root {
    /* Superfícies */
    --fos-bg: #0A0A0A;
    --fos-panel: #161616;
    --fos-panel-hover: #1B1B1B;
    --fos-inner: #212121;
    --fos-inner-2: #1C1C1C;
    --fos-inner-3: #242424;
    --fos-hover: #2A2A2A;
    --fos-line: #262626;
    --fos-line-2: #212121;
    --fos-line-3: #2A2A2A;
    --fos-dash: #3A3A3A;

    /* Texto */
    --fos-fg: #FCFCFC;
    --fos-fg-2: #C9C9C5;
    --fos-fg-nav: #B5B5B1;
    --fos-fg-3: #9A9A96;
    --fos-fg-4: #8A8A86;
    --fos-fg-5: #6B6B68;
    --fos-fg-disabled: #4A4A47;

    /* Semântica */
    --fos-accent: #D7FF67;
    --fos-accent-gradient: linear-gradient(180deg, #E3FF8F 0%, #D7FF67 60%, #B9E24A 100%);
    --fos-accent-gradient-h: linear-gradient(90deg, #B9E24A, #D7FF67);
    --fos-accent-radial: radial-gradient(circle at 50% 35%, #E6FF9A 0%, #D7FF67 55%, #B9E24A 100%);
    --fos-accent-soft: rgba(215, 255, 103, .14);
    --fos-accent-soft-2: rgba(215, 255, 103, .12);
    --fos-accent-border: rgba(215, 255, 103, .45);
    --fos-positive: #8CD9A0;
    --fos-positive-soft: rgba(140, 217, 160, .12);
    --fos-negative: #F08080;
    --fos-negative-soft: rgba(240, 128, 128, .12);
    --fos-warning: #F2C14E;
    --fos-warning-soft: rgba(242, 193, 78, .12);
    --fos-lilac: #B8A6FF;
    --fos-lilac-soft: rgba(184, 166, 255, .14);
    --fos-on-accent: #0A0A0A;

    /* Tipografia */
    --fos-font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Raios */
    --fos-r-panel: 26px;
    --fos-r-kpi: 24px;
    --fos-r-card-m: 22px;
    --fos-r-dialog: 28px;
    --fos-r-inner: 18px;
    --fos-r-field: 16px;
    --fos-r-pill: 999px;

    /* Sombras */
    --fos-shadow-pop: 0 16px 48px rgba(0, 0, 0, .55);
    --fos-shadow-dialog: 0 24px 64px rgba(0, 0, 0, .6);
    --fos-shadow-drawer: -24px 0 64px rgba(0, 0, 0, .6);
    --fos-shadow-toast: 0 12px 40px rgba(0, 0, 0, .5);

    /* Tokens responsivos (desktop) */
    --fos-page-pad: 20px 40px 56px;
    --fos-panel-pad: 28px;
    --fos-panel-pad-lg: 32px;
    --fos-dialog-pad: 32px;
    --fos-h1: 38px;
    --fos-h1-big: 44px;
    --fos-h2: 40px;
    --fos-kpi-val: 28px;
    --fos-pad-cell: 28px;
    --fos-struct-w: 300px;
    --fos-bar-gap: 14px;
    --fos-gap: 20px;
    --fos-page-pad-y: 76px;
}

@media (max-width: 1179.98px) {
    :root {
        --fos-page-pad: 18px 24px 48px;
        --fos-struct-w: 250px;
        --fos-page-pad-y: 66px;
        --fos-h2: 34px;
    }
}

@media (max-width: 759.98px) {
    :root {
        --fos-page-pad: 14px 16px 40px;
        --fos-panel-pad: 20px;
        --fos-panel-pad-lg: 22px;
        --fos-dialog-pad: 24px;
        --fos-h1: 28px;
        --fos-h1-big: 32px;
        --fos-h2: 28px;
        --fos-kpi-val: 22px;
        --fos-pad-cell: 16px;
        --fos-struct-w: 190px;
        --fos-page-pad-y: 54px;
        --fos-bar-gap: 6px;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */

html, body {
    background: var(--fos-bg);
    color: var(--fos-fg);
    font-family: var(--fos-font);
    color-scheme: dark;
}

body {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    font-variant-numeric: tabular-nums;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fos-font);
    color: inherit;
}

a { color: var(--fos-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font-family: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--fos-accent); outline-offset: 2px; }
h1:focus { outline: none; }

.material-symbols-rounded, .msr {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    flex: none;
    user-select: none;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
.msr--fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.msr--bold { font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 20; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2A2A2A; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3A3A3A; background-clip: padding-box; }
.fos-noscroll { scrollbar-width: none; }
.fos-noscroll::-webkit-scrollbar { display: none; }

@keyframes fos-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fos-slidein { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fos-spin { to { transform: rotate(360deg); } }
@keyframes fos-hl { 0% { background: rgba(215, 255, 103, .16); } 100% { background: transparent; } }
@keyframes fos-shimmer { 0%, 100% { opacity: .35; } 50% { opacity: .8; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.fos-anim-pop { animation: fos-pop .2s ease; }
.fos-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Utilitários de cor / texto */
.fos-fg { color: var(--fos-fg) !important; }
.fos-fg-2 { color: var(--fos-fg-2) !important; }
.fos-fg-3 { color: var(--fos-fg-3) !important; }
.fos-fg-4 { color: var(--fos-fg-4) !important; }
.fos-fg-5 { color: var(--fos-fg-5) !important; }
.fos-accent { color: var(--fos-accent) !important; }
.fos-pos { color: var(--fos-positive) !important; }
.fos-neg { color: var(--fos-negative) !important; }
.fos-warn { color: var(--fos-warning) !important; }
.fos-lilac-c { color: var(--fos-lilac) !important; }
.fos-strike { text-decoration: line-through; }
.fos-num { text-align: right !important; white-space: nowrap; }
.fos-nowrap { white-space: nowrap; }
.fos-w500 { font-weight: 500 !important; }
.fos-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fos-pretty { text-wrap: pretty; }
.fos-meta { font-size: 12.5px; color: var(--fos-fg-5); }
.fos-muted { font-size: 13.5px; color: var(--fos-fg-3); }
.fos-foot-note { font-size: 12.5px; color: var(--fos-fg-5); margin-top: 14px; display: flex; align-items: center; gap: 6px; text-wrap: pretty; }
.fos-foot-note .msr { font-size: 16px; }
.fos-eyebrow { font-size: 13px; color: var(--fos-accent); letter-spacing: .06em; text-transform: uppercase; }
.fos-divider { height: 1px; background: var(--fos-line-2); border: 0; margin: 0; }

@media (max-width: 1179.98px) { .fos-hide-tablet { display: none !important; } }
@media (max-width: 759.98px) { .fos-hide-mobile { display: none !important; } }
@media (min-width: 760px) { .fos-only-mobile { display: none !important; } }
@media (min-width: 1180px) { .fos-only-tablet-down { display: none !important; } }

/* ==========================================================================
   Página e grid
   ========================================================================== */

.fos-shell { min-height: 100vh; background: var(--fos-bg); display: flex; justify-content: center; }
.fos-page {
    width: 100%;
    max-width: 1440px;
    min-height: 100vh;
    padding: var(--fos-page-pad);
    box-sizing: border-box;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}
.fos-main { animation: fos-pop .2s ease; }

.fos-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 36px 0 22px;
    flex-wrap: wrap;
}
.fos-page-head--hub { align-items: flex-end; margin: 40px 0 28px; }
.fos-page-head--commit { margin: 36px 0 28px; }
.fos-page-head__lead { display: flex; align-items: center; gap: 16px; min-width: 0; }
.fos-page-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 759.98px) { .fos-page-head__actions { justify-content: flex-start; } }

.fos-h1 { margin: 0; font-size: var(--fos-h1); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
.fos-h1--big { font-size: var(--fos-h1-big); letter-spacing: -.025em; line-height: 1.05; }
.fos-h2 { margin: 0; font-size: var(--fos-h2); font-weight: 400; letter-spacing: -.025em; line-height: 1.1; }
.fos-sub { font-size: 13.5px; color: var(--fos-fg-3); margin-top: 4px; }
.fos-sub--hub { font-size: 15px; margin-top: 8px; }

.fos-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--fos-gap);
}
.fos-col-12 { grid-column: span 12; }
.fos-col-8 { grid-column: span 8; }
.fos-col-7 { grid-column: span 7; }
.fos-col-6 { grid-column: span 6; }
.fos-col-5 { grid-column: span 5; }
.fos-col-4 { grid-column: span 4; }
.fos-col-3 { grid-column: span 3; }
@media (max-width: 1179.98px) {
    .fos-col-8 { grid-column: span 12; }
    .fos-col-4 { grid-column: span 6; }
    .fos-col-3 { grid-column: span 6; }
    .fos-col-4.fos-col-t12, .fos-col-3.fos-col-t12 { grid-column: span 12; }
}
@media (max-width: 759.98px) {
    .fos-col-8, .fos-col-7, .fos-col-6, .fos-col-5, .fos-col-4, .fos-col-3 { grid-column: span 12; }
}

.fos-stack { display: flex; flex-direction: column; gap: var(--fos-gap); min-width: 0; }
.fos-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fos-row--between { justify-content: space-between; }
.fos-mb { margin-bottom: 20px; }
.fos-mt { margin-top: 20px; }

.fos-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--fos-gap);
    margin-bottom: 20px;
}
.fos-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fos-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1179.98px) {
    .fos-kpis, .fos-kpis--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Superfícies
   ========================================================================== */

.fos-panel {
    background: var(--fos-panel);
    border-radius: var(--fos-r-panel);
    padding: var(--fos-panel-pad);
    min-width: 0;
    box-sizing: border-box;
}
.fos-panel--lg { padding: var(--fos-panel-pad-lg); }
.fos-panel--flush { padding: 0; overflow: hidden; }
.fos-panel--col { display: flex; flex-direction: column; }
.fos-panel--warn { border: 1px solid rgba(242, 193, 78, .35); }
.fos-panel--accent { border: 1px solid var(--fos-accent-border); background: var(--fos-inner-2); }
.fos-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fos-panel__head--top { align-items: flex-start; }
.fos-panel__title { font-size: 20px; font-weight: 400; line-height: 1.25; margin: 0; }
.fos-panel__title-row { display: flex; align-items: center; gap: 10px; }
.fos-panel__sub { font-size: 13px; color: var(--fos-fg-3); margin-top: 4px; text-wrap: pretty; }
.fos-panel__body { margin-top: 16px; }

.fos-inner { background: var(--fos-inner); border-radius: var(--fos-r-inner); padding: 16px; }
.fos-inner--row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.fos-inner--soft { background: var(--fos-panel-hover); }

.fos-kpi { background: var(--fos-panel); border-radius: var(--fos-r-kpi); padding: 22px 26px; min-width: 0; }
.fos-kpi__label { font-size: 13px; color: var(--fos-fg-4); }
.fos-kpi__value { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; font-size: var(--fos-kpi-val); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.fos-kpi__cur { font-size: 16px; color: var(--fos-fg-4); font-weight: 300; }
.fos-kpi__hint { font-size: 12.5px; color: var(--fos-fg-5); margin-top: 2px; }

.fos-stat { flex: 1 1 120px; background: var(--fos-inner); border-radius: var(--fos-r-inner); padding: 16px; min-width: 0; }
.fos-stat__label { font-size: 12.5px; color: var(--fos-fg-4); }
.fos-stat__value { font-size: 22px; font-weight: 400; margin-top: 2px; }
.fos-stat__value--sm { font-size: 15px; }
.fos-stats { display: flex; gap: 10px; flex-wrap: wrap; }

.fos-kv { display: flex; flex-direction: column; gap: 2px; }
.fos-kv__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--fos-line-2); font-size: 13.5px; }
.fos-kv__row:last-child { border-bottom: 0; }
.fos-kv__label { color: var(--fos-fg-2); min-width: 0; }
.fos-kv__value { font-weight: 500; white-space: nowrap; }

.fos-money { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fos-money__sign { font-size: 22px; font-weight: 400; }
.fos-money__cur { font-size: 24px; color: var(--fos-fg-4); font-weight: 300; }
.fos-money__int { font-size: 42px; font-weight: 400; letter-spacing: -.02em; line-height: 1; }
.fos-money__dec { font-size: 24px; color: var(--fos-fg-4); font-weight: 300; }
.fos-money--md .fos-money__cur, .fos-money--md .fos-money__dec, .fos-money--md .fos-money__sign { font-size: 22px; }
.fos-money--md .fos-money__int { font-size: 36px; }
.fos-money--sm .fos-money__cur, .fos-money--sm .fos-money__dec { font-size: 20px; }
.fos-money--sm .fos-money__int { font-size: 32px; }

.fos-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    font-weight: 600; font-size: 13px; background: var(--fos-inner); color: var(--fos-fg);
}
.fos-avatar--accent { background: var(--fos-accent); color: var(--fos-on-accent); }
.fos-avatar--lilac { background: var(--fos-lilac); color: var(--fos-on-accent); }
.fos-avatar--sm { width: 34px; height: 34px; font-size: 12px; }
.fos-avatar--lg { width: 44px; height: 44px; font-size: 14px; }

.fos-icon-circle {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--fos-inner); color: var(--fos-fg-2);
    display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.fos-icon-circle .msr { font-size: 18px; }
.fos-icon-circle--sm { width: 30px; height: 30px; }
.fos-icon-circle--sm .msr { font-size: 16px; }
.fos-icon-circle--34 { width: 34px; height: 34px; }
.fos-icon-circle--lg { width: 48px; height: 48px; }
.fos-icon-circle--lg .msr { font-size: 24px; }
.fos-icon-circle--xl { width: 56px; height: 56px; }
.fos-icon-circle--xl .msr { font-size: 28px; }
.fos-icon-circle--xxl { width: 64px; height: 64px; }
.fos-icon-circle--xxl .msr { font-size: 32px; }
.fos-icon-circle--panel { background: var(--fos-panel); }
.fos-icon-circle--accent { background: var(--fos-accent-soft); color: var(--fos-accent); }
.fos-icon-circle--pos { background: rgba(140, 217, 160, .14); color: var(--fos-positive); }
.fos-icon-circle--neg { background: rgba(240, 128, 128, .14); color: var(--fos-negative); }
.fos-icon-circle--warn { background: rgba(242, 193, 78, .14); color: var(--fos-warning); }
.fos-icon-circle--lilac { background: var(--fos-lilac-soft); color: var(--fos-lilac); }

/* ==========================================================================
   Botões
   ========================================================================== */

.fos-btn {
    height: 44px;
    padding: 0 18px;
    border-radius: var(--fos-r-pill);
    border: none;
    background: var(--fos-inner);
    color: var(--fos-fg);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: background .15s, filter .15s, border-color .15s;
    line-height: 1;
}
.fos-btn .msr { font-size: 18px; }
.fos-btn--icon-l { padding: 0 18px 0 14px; }
.fos-btn:hover { background: var(--fos-hover); color: var(--fos-fg); }
.fos-btn:disabled, .fos-btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }

.fos-btn--primary { background: var(--fos-accent); color: var(--fos-on-accent); font-weight: 500; }
.fos-btn--primary .msr { font-size: 20px; }
.fos-btn--primary:hover { background: var(--fos-accent); color: var(--fos-on-accent); filter: brightness(1.08); }
.fos-btn--primary:disabled { opacity: .8; }
.fos-btn--primary.is-inactive { background: var(--fos-inner); color: var(--fos-fg-5); }

.fos-btn--secondary { background: var(--fos-inner); color: var(--fos-fg); }

.fos-btn--outline { background: var(--fos-bg); border: 1px solid var(--fos-line); }
.fos-btn--outline:hover { background: var(--fos-hover); }

.fos-btn--ghost { background: none; border: 1px solid var(--fos-line-3); }
.fos-btn--ghost:hover { background: var(--fos-hover); }

.fos-btn--text { background: none; color: var(--fos-fg-3); padding: 0; height: auto; min-height: 44px; }
.fos-btn--text:hover { background: none; color: var(--fos-fg); }
.fos-btn--link { background: none; color: var(--fos-accent); padding: 0 14px; }
.fos-btn--link:hover { background: none; color: var(--fos-accent); text-decoration: underline !important; }

.fos-btn--danger { background: var(--fos-negative); color: var(--fos-on-accent); font-weight: 500; }
.fos-btn--danger:hover { background: var(--fos-negative); color: var(--fos-on-accent); filter: brightness(1.06); }
.fos-btn--danger-ghost { background: none; border: 1px solid var(--fos-line-3); color: var(--fos-negative); }
.fos-btn--danger-ghost:hover { background: var(--fos-hover); color: var(--fos-negative); }
.fos-btn--light { background: var(--fos-fg); color: var(--fos-on-accent); font-weight: 500; }
.fos-btn--light:hover { background: var(--fos-fg); color: var(--fos-on-accent); filter: brightness(.95); }
.fos-btn--dashed { background: none; border: 1px dashed var(--fos-dash); color: var(--fos-fg-2); font-size: 13.5px; padding: 0 16px 0 12px; }
.fos-btn--dashed .msr { font-size: 18px; }
.fos-btn--dashed:hover { background: var(--fos-hover); }

.fos-btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.fos-btn--xs { height: 34px; padding: 0 14px; font-size: 13px; }
.fos-btn--md { height: 48px; padding: 0 20px; }
.fos-btn--lg { height: 52px; padding: 0 24px; font-size: 15px; }
.fos-btn--xl { height: 54px; padding: 0 28px; font-size: 16px; }
.fos-btn--block { width: 100%; }
.fos-btn--grow { flex: 1; }
.fos-btn--glow { box-shadow: 0 0 0 1px rgba(215, 255, 103, .4), 0 14px 44px rgba(215, 255, 103, .26); }

.fos-icon-btn {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--fos-line);
    background: var(--fos-bg);
    color: var(--fos-fg);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    padding: 0; text-decoration: none !important;
    transition: background .15s;
    vertical-align: middle;
}
.fos-icon-btn:hover { background: var(--fos-hover); color: var(--fos-fg); }
.fos-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.fos-icon-btn--sm { width: 36px; height: 36px; border-color: var(--fos-line-3); background: none; }
.fos-icon-btn--sm .msr { font-size: 18px; }
.fos-icon-btn--ghost { width: 34px; height: 34px; border: none; background: none; color: var(--fos-fg-3); }
.fos-icon-btn--ghost .msr { font-size: 18px; }
.fos-icon-btn--filled { width: 40px; height: 40px; border: none; background: var(--fos-inner); }
.fos-icon-btn--panel { width: 40px; height: 40px; border: none; background: var(--fos-panel); }
.fos-icon-btn--48 { width: 48px; height: 48px; border: none; background: var(--fos-inner); }
.fos-icon-btn--52 { width: 52px; height: 52px; border: none; background: var(--fos-inner); }
.fos-icon-btn--26 { width: 26px; height: 26px; border: none; background: none; color: var(--fos-fg-3); }
.fos-icon-btn--26 .msr { font-size: 18px; }
.fos-icon-btn--30 { width: 30px; height: 30px; border: none; background: none; color: var(--fos-fg-3); }
.fos-icon-btn--30 .msr { font-size: 18px; }
.fos-icon-btn--danger { color: var(--fos-negative); }
.fos-icon-btn--danger:hover { color: var(--fos-negative); }

.fos-spinner {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(10, 10, 10, .3); border-top-color: #0A0A0A;
    animation: fos-spin .7s linear infinite; flex: none; display: inline-block;
}
.fos-spinner--light { border-color: #2A2A2A; border-top-color: var(--fos-accent); width: 20px; height: 20px; animation-duration: .8s; }
.fos-spinner--lg { width: 32px; height: 32px; border-width: 3px; border-color: #2A2A2A; border-top-color: var(--fos-accent); }

/* ==========================================================================
   Badges, tags e dots
   ========================================================================== */

.fos-badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 12px 0 9px; border-radius: var(--fos-r-pill);
    background: var(--fos-inner); color: var(--fos-fg-2);
    font-size: 12.5px; white-space: nowrap; line-height: 1; vertical-align: middle;
}
.fos-badge .msr { font-size: 15px; }
.fos-badge--noicon { padding: 0 12px; }
.fos-badge--sm { height: 26px; padding: 0 11px; font-size: 12px; }
.fos-badge--lg { height: 30px; padding: 0 14px 0 11px; font-size: 13px; font-weight: 500; }
.fos-badge--lg .msr { font-size: 17px; }
.fos-badge--xl { height: 34px; padding: 0 14px 0 11px; font-size: 13px; font-weight: 500; }
.fos-badge--xl .msr { font-size: 17px; }
.fos-badge--success { background: var(--fos-positive-soft); color: var(--fos-positive); }
.fos-badge--danger { background: var(--fos-negative-soft); color: var(--fos-negative); }
.fos-badge--warning { background: var(--fos-warning-soft); color: var(--fos-warning); }
.fos-badge--accent { background: var(--fos-accent-soft); color: var(--fos-accent); }
.fos-badge--lilac { background: var(--fos-lilac-soft); color: var(--fos-lilac); }
.fos-badge--neutral { background: var(--fos-inner); color: var(--fos-fg-2); }
.fos-badge--muted { background: var(--fos-inner); color: var(--fos-fg-4); }
.fos-badge--solid { background: var(--fos-accent); color: var(--fos-on-accent); font-weight: 500; }

.fos-tag {
    display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
    border-radius: var(--fos-r-pill); background: var(--fos-inner); color: var(--fos-fg-2);
    font-size: 12px; white-space: nowrap;
}
.fos-tag--lg { height: 28px; padding: 0 12px; font-size: 12.5px; }
.fos-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.fos-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fos-fg-5); display: inline-block; flex: none; }
.fos-dot--pos { background: var(--fos-positive); }
.fos-dot--neg { background: var(--fos-negative); }
.fos-dot--warn { background: var(--fos-warning); }
.fos-dot--accent { background: var(--fos-accent); }
.fos-dot--neutral { background: var(--fos-fg-2); }
.fos-dot--lg { width: 9px; height: 9px; }
.fos-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.fos-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--fos-fg-4); }
.fos-legend > span { display: flex; align-items: center; gap: 6px; }

/* ==========================================================================
   Controles: segmentado, busca, filtros, período
   ========================================================================== */

.fos-seg {
    display: flex; align-items: center; height: 44px; padding: 4px;
    border-radius: var(--fos-r-pill); background: var(--fos-panel); gap: 2px;
    max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; box-sizing: border-box;
}
.fos-seg::-webkit-scrollbar { display: none; }
.fos-seg__opt {
    height: 36px; padding: 0 16px; border-radius: var(--fos-r-pill); border: none;
    background: transparent; color: var(--fos-fg-3); font-size: 14px; cursor: pointer;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex: none;
    text-decoration: none !important;
}
.fos-seg__opt:hover { color: var(--fos-fg); }
.fos-seg__opt.is-on, .fos-seg__opt[aria-selected="true"], .fos-seg__opt[aria-checked="true"] { background: var(--fos-hover); color: var(--fos-fg); }
.fos-seg--accent .fos-seg__opt.is-on, .fos-seg--accent .fos-seg__opt[aria-selected="true"] { background: var(--fos-accent); color: var(--fos-on-accent); }
.fos-seg--lg { height: 48px; padding: 5px; }
.fos-seg--lg .fos-seg__opt { height: 38px; padding: 0 18px; }
.fos-seg--inner { height: auto; padding: 3px; background: var(--fos-inner); width: fit-content; }
.fos-seg--inner .fos-seg__opt { height: 28px; padding: 0 12px; font-size: 13px; }
.fos-seg--inner .fos-seg__opt.is-on, .fos-seg--inner .fos-seg__opt[aria-selected="true"] { background: var(--fos-dash); }
.fos-seg--fit { width: fit-content; }
.fos-seg--wrap { flex-wrap: wrap; height: auto; min-height: 44px; }
@media (max-width: 759.98px) { .fos-seg--wrap { flex-wrap: nowrap; height: 44px; } }

.fos-search {
    display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
    border-radius: var(--fos-r-pill); background: var(--fos-panel); min-width: 0; box-sizing: border-box;
}
.fos-search .msr { color: var(--fos-fg-5); font-size: 18px; }
.fos-search input { flex: 1; background: none; border: none; font-size: 14px; outline: none; min-width: 0; color: var(--fos-fg); width: 220px; }
.fos-search input::placeholder { color: var(--fos-fg-5); }
.fos-search--grow { flex: 1 1 280px; }
.fos-search--grow input { width: auto; }
.fos-search--lg { height: 48px; padding: 0 18px; width: 320px; }
.fos-search--lg .msr { font-size: 20px; }
.fos-search--lg input { width: auto; }
@media (max-width: 759.98px) {
    .fos-search--lg { width: 100%; }
    .fos-search input { width: 100%; }
    .fos-page-head__actions .fos-search { flex: 1 1 100%; }
}

.fos-select-pill {
    display: inline-flex; align-items: center; height: 44px; padding: 0 14px;
    border-radius: var(--fos-r-pill); background: var(--fos-panel); font-size: 14px;
    color: var(--fos-fg-2); gap: 8px; white-space: nowrap; border: none; cursor: pointer; position: relative;
}
.fos-select-pill .msr { font-size: 18px; color: var(--fos-fg-5); }
.fos-select-pill select {
    appearance: none; -webkit-appearance: none; background: transparent; border: none; outline: none;
    color: var(--fos-fg-2); font-size: 14px; cursor: pointer; padding-right: 22px; margin-right: -22px; height: 100%;
}
.fos-select-pill select option { background: var(--fos-panel); color: var(--fos-fg); }
.fos-select-pill--outline { background: var(--fos-bg); border: 1px solid var(--fos-line); color: var(--fos-fg); }

.fos-period {
    display: inline-flex; align-items: center; height: 44px; border: 1px solid var(--fos-line);
    border-radius: var(--fos-r-pill); background: var(--fos-bg); padding: 0 4px; box-sizing: border-box;
}
.fos-period__btn {
    width: 36px; height: 36px; border-radius: 50%; border: none; background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--fos-fg-4);
}
.fos-period__btn:hover { background: var(--fos-hover); }
.fos-period__btn:disabled { opacity: .4; cursor: not-allowed; }
.fos-period__btn .msr { font-size: 18px; }
.fos-period__label { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 14px; white-space: nowrap; }
.fos-period__label .msr { font-size: 18px; color: var(--fos-fg-4); }
.fos-period select { background: transparent; border: none; color: var(--fos-fg); font-size: 14px; outline: none; cursor: pointer; }
.fos-period select option { background: var(--fos-panel); }

.fos-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.fos-chips { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fos-chips::-webkit-scrollbar { display: none; }
.fos-chip {
    height: 40px; padding: 0 16px; border-radius: var(--fos-r-pill); border: 1px solid var(--fos-line);
    background: var(--fos-panel); color: var(--fos-fg-3); font-size: 13.5px; cursor: pointer; white-space: nowrap; flex: none;
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important;
}
.fos-chip:hover { color: var(--fos-fg); }
.fos-chip.is-on, .fos-chip[aria-pressed="true"] { border-color: var(--fos-accent); background: var(--fos-accent-soft-2); color: var(--fos-accent); }
.fos-chip--inner { background: var(--fos-inner); color: var(--fos-fg-2); height: 44px; padding: 0 14px; }
.fos-chip--sm { height: 34px; padding: 0 13px; font-size: 12.5px; border: none; }
.fos-chip--sm.is-on { background: var(--fos-hover); color: var(--fos-fg); border: none; }

.fos-options { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex-wrap: wrap; }
.fos-options::-webkit-scrollbar { display: none; }
.fos-option {
    height: 46px; padding: 0 16px; border-radius: 14px; border: 1.5px solid transparent;
    background: var(--fos-inner); color: var(--fos-fg-2); font-size: 14px; cursor: pointer; white-space: nowrap; flex: none;
    display: inline-flex; align-items: center; gap: 8px;
}
.fos-option.is-on, .fos-option[aria-pressed="true"], .fos-option[aria-checked="true"] { border-color: var(--fos-accent); background: var(--fos-accent-soft-2); color: var(--fos-accent); }
.fos-option:disabled { opacity: .5; cursor: not-allowed; }

.fos-type-toggle { display: flex; padding: 4px; border-radius: var(--fos-r-pill); background: var(--fos-inner); margin-bottom: 20px; gap: 2px; }
.fos-type-toggle button {
    flex: 1; height: 44px; border-radius: var(--fos-r-pill); border: none; background: transparent; color: var(--fos-fg-3);
    font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.fos-type-toggle button .msr { font-size: 18px; }
.fos-type-toggle button.is-in { background: rgba(140, 217, 160, .16); color: var(--fos-positive); }
.fos-type-toggle button.is-out { background: rgba(240, 128, 128, .16); color: var(--fos-negative); }
.fos-type-toggle button.is-neutral { background: var(--fos-hover); color: var(--fos-fg); }

/* ==========================================================================
   Tabela densa e matriz
   ========================================================================== */

.fos-table-wrap { overflow: auto; max-height: 560px; }
.fos-table-wrap--tall { max-height: 600px; }
.fos-table-wrap--auto { max-height: none; }
.fos-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.fos-table th {
    position: sticky; top: 0; z-index: 2; background: var(--fos-panel);
    text-align: left; padding: 16px 12px 12px; font-weight: 400; color: var(--fos-fg-4);
    border-bottom: 1px solid var(--fos-line); white-space: nowrap;
}
.fos-table td { padding: 12px; border-bottom: 1px solid var(--fos-line-2); vertical-align: middle; color: var(--fos-fg); }
.fos-table th:first-child, .fos-table td:first-child { padding-left: var(--fos-pad-cell); }
.fos-table th:last-child, .fos-table td:last-child { padding-right: 24px; }
.fos-table tbody tr:hover > td { background: var(--fos-panel-hover); }
.fos-table tbody tr.is-hl > td { animation: fos-hl 2.6s ease; }
.fos-table tbody tr:last-child > td { border-bottom-color: var(--fos-line-2); }
.fos-table .fos-td-actions { text-align: right; white-space: nowrap; padding-top: 8px; padding-bottom: 8px; width: 84px; }
.fos-table .fos-td-muted { color: var(--fos-fg-3); }
.fos-table .fos-td-strong { font-weight: 500; }
.fos-table .fos-td-sub { display: block; font-size: 12.5px; color: var(--fos-fg-5); }
.fos-table--plain th { position: static; padding: 0 10px 12px; }
.fos-table--plain th:first-child, .fos-table--plain td:first-child { padding-left: 10px; }
.fos-table--plain th:last-child, .fos-table--plain td:last-child { padding-right: 10px; }
.fos-table--plain td { padding: 13px 10px; }
.fos-table--compact td { padding-top: 8px; padding-bottom: 8px; }

.fos-table-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding: 18px var(--fos-pad-cell); border-top: 1px solid var(--fos-line);
}
.fos-table-foot__totals { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.fos-table-foot__total { display: flex; align-items: baseline; gap: 6px; }
.fos-table-foot__total > span:first-child { font-size: 12.5px; color: var(--fos-fg-4); }
.fos-table-foot__total > span:last-child { font-size: 15px; font-weight: 500; }
.fos-table-foot__total--big > span:last-child { font-size: 18px; }
.fos-table-note { padding: 16px var(--fos-pad-cell); border-top: 1px solid var(--fos-line); font-size: 12.5px; color: var(--fos-fg-5); display: flex; gap: 28px; flex-wrap: wrap; }
.fos-pager {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px var(--fos-pad-cell); border-top: 1px solid var(--fos-line-2); font-size: 13px; color: var(--fos-fg-5);
}
.fos-pager__btns { display: flex; gap: 6px; }
.fos-pager__btn { height: 34px; padding: 0 14px; border-radius: var(--fos-r-pill); border: 1px solid var(--fos-line-2); background: none; color: var(--fos-fg); font-size: 13px; cursor: pointer; }
.fos-pager__btn:hover { background: var(--fos-hover); }
.fos-pager__btn:disabled { color: var(--fos-fg-disabled); cursor: default; background: none; }

.fos-cell-title { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.fos-cell-sub { font-size: 12.5px; color: var(--fos-fg-5); padding-left: 17px; }
.fos-cell-code { color: var(--fos-fg-5); font-size: 12.5px; }

/* Matriz com colunas fixas */
.fos-matrix { border-collapse: separate; border-spacing: 0; font-size: 13px; width: 100%; }
.fos-matrix th, .fos-matrix td { white-space: nowrap; }
.fos-matrix thead th {
    position: sticky; top: 0; z-index: 3; background: var(--fos-panel); text-align: right;
    padding: 16px 12px 12px; font-weight: 400; color: var(--fos-fg-4); border-bottom: 1px solid var(--fos-line); min-width: 72px;
}
.fos-matrix thead th.is-current { color: var(--fos-fg); }
.fos-matrix thead th.is-future { color: var(--fos-fg-disabled); }
.fos-matrix .fos-mx-struct {
    position: sticky; left: 0; z-index: 2; background: var(--fos-panel); text-align: left;
    padding: 0 12px 0 var(--fos-pad-cell); border-right: 1px solid var(--fos-line-2);
    min-width: var(--fos-struct-w); width: var(--fos-struct-w); max-width: var(--fos-struct-w);
    overflow: hidden; text-overflow: ellipsis;
}
.fos-matrix thead .fos-mx-struct { z-index: 4; padding: 16px 12px 12px var(--fos-pad-cell); text-align: left; }
.fos-matrix .fos-mx-total {
    position: sticky; right: 0; z-index: 2; background: var(--fos-inner-2); text-align: right;
    padding: 0 var(--fos-pad-cell) 0 14px; border-left: 1px solid var(--fos-line); font-weight: 500; min-width: 120px; color: var(--fos-fg-2);
}
.fos-matrix thead .fos-mx-total { z-index: 4; padding: 16px var(--fos-pad-cell) 12px 14px; color: var(--fos-fg); font-weight: 500; background: var(--fos-inner-2); }
.fos-matrix tbody th, .fos-matrix tbody td { height: 42px; border-bottom: 1px solid var(--fos-line-2); }
.fos-matrix tbody td { text-align: right; padding: 0 12px; color: var(--fos-fg-3); }
.fos-matrix tbody th { font-weight: 400; color: var(--fos-fg-3); }
.fos-matrix tr.is-group th { font-weight: 500; color: var(--fos-fg); }
.fos-matrix tr.is-total th, .fos-matrix tr.is-total td { height: 52px; font-size: 14px; font-weight: 500; color: var(--fos-fg); background: var(--fos-inner-2); border-bottom-color: var(--fos-line-3); }
.fos-matrix tr.is-total .fos-mx-total { background: var(--fos-inner-3); color: var(--fos-fg); }
.fos-matrix tr.is-row th, .fos-matrix tr.is-row td { height: 44px; }
.fos-matrix tr.lvl-1 .fos-mx-struct { padding-left: 52px; }
.fos-matrix tr.lvl-2 .fos-mx-struct { padding-left: 74px; }
@media (max-width: 759.98px) {
    .fos-matrix tr.lvl-1 .fos-mx-struct { padding-left: 34px; }
    .fos-matrix tr.lvl-2 .fos-mx-struct { padding-left: 52px; }
}
.fos-matrix .fos-mx-sign { color: var(--fos-fg-5); font-weight: 400; margin-right: 8px; }
.fos-matrix .fos-mx-toggle { margin: 0 6px 0 -8px; }
.fos-matrix td.is-neg, .fos-matrix th.is-neg { color: var(--fos-negative) !important; }
.fos-matrix td.is-strong { color: var(--fos-fg); }
.fos-matrix td.is-accent { color: var(--fos-accent) !important; }
.fos-matrix td.is-empty { color: var(--fos-fg-disabled); }
.fos-matrix tbody tr:hover > td:not(.fos-mx-total), .fos-matrix tbody tr:hover > th { background: var(--fos-panel-hover); }
.fos-matrix tbody tr.is-total:hover > td:not(.fos-mx-total), .fos-matrix tbody tr.is-total:hover > th { background: var(--fos-inner-2); }

/* Cards de lista no mobile */
.fos-cards { display: flex; flex-direction: column; gap: 10px; }
.fos-list-card { background: var(--fos-panel); border-radius: var(--fos-r-card-m); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.fos-list-card.is-hl { animation: fos-hl 2.6s ease; }
.fos-list-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fos-list-card__title { font-size: 15px; font-weight: 500; text-wrap: pretty; }
.fos-list-card__value { font-size: 16px; font-weight: 500; white-space: nowrap; }
.fos-list-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--fos-fg-4); }
.fos-list-card__actions { display: flex; gap: 8px; }
.fos-list-card__actions .fos-btn { flex: 1; }
.fos-list-card--foot { font-size: 13px; color: var(--fos-fg-4); gap: 8px; }
.fos-list-card--foot > span { display: flex; justify-content: space-between; gap: 10px; }

/* ==========================================================================
   Árvore hierárquica
   ========================================================================== */

.fos-tree { background: var(--fos-panel); border-radius: var(--fos-r-panel); padding: 12px var(--fos-panel-pad); }
.fos-tree-row {
    display: flex; align-items: center; gap: 12px; min-height: 48px;
    padding: 8px 8px 8px 8px; margin: 0 -8px; border-radius: 14px; border-bottom: 1px solid var(--fos-line-2);
    font-size: 14px;
}
.fos-tree-row:hover { background: var(--fos-panel-hover); }
.fos-tree-row.lvl-0 { min-height: 54px; font-size: 15px; font-weight: 500; }
.fos-tree-row.lvl-1 { padding-left: 32px; }
.fos-tree-row.lvl-2 { min-height: 44px; padding-left: 62px; font-size: 13.5px; color: var(--fos-fg-3); }
.fos-tree-row.lvl-3 { min-height: 44px; padding-left: 86px; font-size: 13.5px; color: var(--fos-fg-3); }
.fos-tree-row.is-muted { color: var(--fos-fg-3); }
.fos-tree-row.is-inactive { opacity: .6; }
.fos-tree-row__spacer { width: 30px; flex: none; }
.fos-tree-row__code { color: var(--fos-fg-5); font-size: 13px; font-weight: 400; flex: none; min-width: 52px; }
.fos-tree-row__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fos-tree-row__meta { font-size: 12.5px; color: var(--fos-fg-5); white-space: nowrap; font-weight: 400; }
.fos-tree-row__actions { display: flex; gap: 2px; flex: none; }
.fos-tree__foot { padding: 14px 0 6px; font-size: 12.5px; color: var(--fos-fg-5); }
@media (max-width: 759.98px) {
    .fos-tree-row__meta { display: none; }
    .fos-tree-row.lvl-1 { padding-left: 20px; }
    .fos-tree-row.lvl-2 { padding-left: 38px; }
    .fos-tree-row.lvl-3 { padding-left: 52px; }
}

/* ==========================================================================
   Grid de cartões
   ========================================================================== */

.fos-card-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--fos-gap); }
.fos-card {
    grid-column: span 4; text-align: left; background: var(--fos-panel); border: 1px solid var(--fos-line);
    border-radius: var(--fos-r-panel); padding: var(--fos-panel-pad); min-height: 210px;
    display: flex; flex-direction: column; gap: 12px; color: var(--fos-fg); cursor: pointer;
    transition: background .15s; overflow: hidden; box-sizing: border-box; position: relative; text-decoration: none !important;
    font-size: 14px;
}
.fos-card:hover { background: var(--fos-panel-hover); color: var(--fos-fg); }
.fos-card--noborder { border-color: transparent; }
.fos-card--thumb { min-height: 260px; }
.fos-card.is-disabled { opacity: .62; cursor: not-allowed; }
.fos-card.is-selected { border-color: var(--fos-accent-border); background: var(--fos-inner-2); }
.fos-card--tool { min-height: 200px; gap: 14px; padding: 26px 28px; border-color: transparent; }
@media (max-width: 1179.98px) { .fos-card { grid-column: span 6; } }
@media (max-width: 759.98px) { .fos-card { grid-column: span 12; } .fos-card--tool { padding: 20px; } }
.fos-card__thumb {
    height: 128px; border-radius: 18px; background: var(--fos-panel-hover); display: flex; align-items: center; justify-content: center;
    color: var(--fos-accent); position: relative; overflow: hidden; flex: none;
}
.fos-card__thumb::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#2A2A2A 1px, transparent 1px); background-size: 16px 16px; opacity: .7; }
.fos-card__thumb .msr { font-size: 30px; opacity: .9; position: relative; }
.fos-card__thumb img { width: 100%; height: 100%; object-fit: cover; position: relative; }
@media (max-width: 759.98px) { .fos-card__thumb { height: 110px; } }
.fos-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fos-card__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--fos-accent-soft); color: var(--fos-accent); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.fos-card__icon .msr { font-size: 22px; }
.fos-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.fos-card__icon--lg { width: 48px; height: 48px; }
.fos-card__icon--lg .msr { font-size: 24px; }
.fos-card__icon--muted { background: var(--fos-inner); color: var(--fos-fg-4); }
.fos-card__title { font-size: 19px; letter-spacing: -.015em; text-wrap: pretty; font-weight: 400; margin: 0; }
.fos-card__title--lg { font-size: 22px; }
.fos-card__sub { font-size: 13.5px; color: var(--fos-fg-3); text-wrap: pretty; flex: 1; }
.fos-card__foot { font-size: 13px; color: var(--fos-fg-5); display: flex; align-items: center; gap: 6px; }
.fos-card__foot .msr { font-size: 16px; }
.fos-card__meta { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--fos-line-2); }
.fos-card__meta > span { min-width: 0; }
.fos-card__meta-label { display: block; font-size: 11.5px; color: var(--fos-fg-5); }
.fos-card__meta-value { display: block; font-size: 14px; font-weight: 500; }
.fos-card__menu { position: absolute; top: 14px; right: 14px; }

/* ==========================================================================
   Formulários
   ========================================================================== */

.fos-form { display: flex; flex-direction: column; gap: 16px; }
.fos-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fos-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fos-form-grid > .span-2, .fos-form-grid > .fos-span-2 { grid-column: span 2; }
.fos-form-grid--3 > .fos-span-3 { grid-column: span 3; }
@media (max-width: 759.98px) {
    .fos-form-grid, .fos-form-grid--3 { grid-template-columns: 1fr; }
    .fos-form-grid > .span-2, .fos-form-grid > .fos-span-2, .fos-form-grid--3 > .fos-span-3 { grid-column: span 1; }
}

.fos-field { display: block; min-width: 0; margin: 0; }
.fos-label { display: block; font-size: 13px; color: var(--fos-fg-3); margin-bottom: 7px; font-weight: 400; }
.fos-label__req { color: var(--fos-fg-3); }

.fos-input, .fos-select, .fos-textarea {
    width: 100%; height: 50px; padding: 0 16px; border-radius: var(--fos-r-field);
    background: var(--fos-inner); border: 1.5px solid transparent; font-size: 14px; color: var(--fos-fg);
    outline: none; box-sizing: border-box; transition: border-color .15s; color-scheme: dark;
}
.fos-select { padding: 0 38px 0 14px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%238A8A86'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
.fos-select option { background: var(--fos-panel); color: var(--fos-fg); }
.fos-textarea { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.fos-input::placeholder, .fos-textarea::placeholder { color: var(--fos-fg-5); }
.fos-input:focus, .fos-select:focus, .fos-textarea:focus { border-color: #3A3A3A; }
.fos-input:focus-visible, .fos-select:focus-visible, .fos-textarea:focus-visible { outline: 2px solid var(--fos-accent); outline-offset: 2px; }
.fos-input:disabled, .fos-select:disabled, .fos-textarea:disabled, .fos-input[readonly].is-readonly { opacity: .6; cursor: not-allowed; }
.fos-input.is-invalid, .fos-select.is-invalid, .fos-textarea.is-invalid, .fos-input-group.is-invalid { border-color: var(--fos-negative); }
.fos-input--center { text-align: center; }
.fos-input--code { text-align: center; letter-spacing: .34em; font-size: 18px; }
.fos-input--pill { height: 52px; padding: 0 18px; border-radius: var(--fos-r-pill); }
.fos-input--right { text-align: right; }
.fos-input--sm { height: 40px; border-radius: 12px; padding: 0 12px; font-size: 13.5px; }

.fos-input-group {
    display: flex; align-items: center; height: 50px; padding: 0 16px; border-radius: var(--fos-r-field);
    background: var(--fos-inner); border: 1.5px solid transparent; gap: 8px; box-sizing: border-box; width: 100%;
}
.fos-input-group:focus-within { border-color: #3A3A3A; }
.fos-input-group input, .fos-input-group .fos-bare {
    flex: 1; min-width: 0; background: none; border: none; font-size: 14px; outline: none; color: var(--fos-fg); height: 100%; padding: 0; box-shadow: none;
}
.fos-input-group__affix { color: var(--fos-fg-4); font-size: 14px; flex: none; }
.fos-input-group__affix--suffix { font-size: 13px; }
.fos-input-group--sm { height: 40px; border-radius: 12px; padding: 0 12px; }

.fos-field-error { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--fos-negative); margin-top: 6px; }
.fos-field-error .msr { font-size: 15px; }
.fos-hint { display: block; font-size: 12.5px; color: var(--fos-fg-5); margin-top: 6px; text-wrap: pretty; }
.fos-validation-message, .validation-message { font-size: 12.5px; color: var(--fos-negative); margin-top: 6px; }

.fos-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--fos-r-inner); padding: 14px 16px; font-size: 13.5px; background: var(--fos-inner); color: var(--fos-fg-2); }
.fos-alert .msr { font-size: 18px; }
.fos-alert__text { flex: 1; text-wrap: pretty; min-width: 0; }
.fos-alert--error { background: var(--fos-negative-soft); color: var(--fos-negative); }
.fos-alert--success { background: var(--fos-positive-soft); color: var(--fos-positive); }
.fos-alert--warning { background: var(--fos-warning-soft); color: var(--fos-warning); }
.fos-alert--info .msr { color: var(--fos-accent); }
.fos-alert--note { font-size: 12.5px; }
.fos-alert--note .msr { color: var(--fos-accent); }

.fos-switch {
    width: 100%; height: 50px; padding: 0 16px; border-radius: var(--fos-r-field); background: var(--fos-inner); border: none;
    color: var(--fos-fg); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    text-align: left; box-sizing: border-box;
}
.fos-switch:hover { background: var(--fos-hover); }
.fos-switch:disabled { opacity: .55; cursor: not-allowed; }
.fos-switch__track { width: 44px; height: 26px; border-radius: var(--fos-r-pill); background: var(--fos-dash); padding: 3px; display: flex; justify-content: flex-start; flex: none; box-sizing: border-box; transition: background .15s; }
.fos-switch__knob { width: 20px; height: 20px; border-radius: 50%; background: var(--fos-fg-4); transition: background .15s; }
.fos-switch[aria-checked="true"] .fos-switch__track { background: var(--fos-accent); justify-content: flex-end; }
.fos-switch[aria-checked="true"] .fos-switch__knob { background: var(--fos-on-accent); }
.fos-switch--inline { width: auto; height: auto; padding: 0; background: none; }
.fos-switch--inline:hover { background: none; }

.fos-check {
    width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--fos-dash); background: transparent; color: var(--fos-on-accent);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none;
}
.fos-check .msr { font-size: 17px; font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 20; }
.fos-check.is-on, .fos-check[aria-checked="true"] { border-color: var(--fos-accent); background: var(--fos-accent); }
.fos-check:disabled { cursor: not-allowed; }
.fos-check--sm { width: 22px; height: 22px; }
.fos-check--sm .msr { font-size: 15px; }
.fos-check--square { border-radius: 7px; }

.fos-range { width: 100%; accent-color: var(--fos-accent); height: 34px; }

.fos-check-row { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 14px; color: var(--fos-fg); cursor: pointer; }
.fos-check-row__text { min-width: 0; }
.fos-check-row__hint { display: block; font-size: 12.5px; color: var(--fos-fg-5); }

.fos-dropzone { border: 1.5px dashed var(--fos-dash); border-radius: 22px; padding: 44px 24px; text-align: center; background: var(--fos-panel-hover); }
.fos-dropzone.is-over { border-color: var(--fos-accent); }

/* Seções de configuração (padrão formulário) */
.fos-config-section { background: var(--fos-panel); border-radius: var(--fos-r-panel); padding: var(--fos-panel-pad); }
.fos-config-section__fields { margin-top: 18px; }
.fos-note { background: var(--fos-panel); border-radius: var(--fos-r-panel); padding: var(--fos-panel-pad); }
.fos-note__head { display: flex; align-items: center; gap: 10px; }
.fos-note__title { font-size: 17px; }
.fos-note__text { font-size: 13.5px; color: var(--fos-fg-3); margin-top: 12px; line-height: 1.5; text-wrap: pretty; }

/* ==========================================================================
   Overlays: popover, menu, drawer, diálogo, toast
   ========================================================================== */

.fos-click-away { position: fixed; inset: 0; z-index: 40; background: transparent; }
.fos-popover {
    position: absolute; z-index: 50; background: var(--fos-panel); border: 1px solid var(--fos-line);
    border-radius: 22px; padding: 10px; box-shadow: var(--fos-shadow-pop); animation: fos-pop .15s ease;
    box-sizing: border-box; color: var(--fos-fg);
}
.fos-popover--menu { border-radius: 18px; padding: 8px; min-width: 250px; }
.fos-popover__title { padding: 8px 10px 10px; font-size: 15px; font-weight: 500; }
.fos-popover__sep { border-top: 1px solid var(--fos-line); margin-top: 6px; padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.fos-menu-item {
    width: 100%; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 14px;
    border: none; background: transparent; color: var(--fos-fg); font-size: 14px; cursor: pointer; text-align: left;
    text-decoration: none !important; box-sizing: border-box;
}
.fos-menu-item:hover, .fos-menu-item.is-current { background: var(--fos-hover); color: var(--fos-fg); }
.fos-menu-item.is-active { background: var(--fos-inner); }
.fos-menu-item .msr { color: var(--fos-fg-4); }
.fos-menu-item--nav { height: 40px; min-height: 40px; padding: 0 12px; border-radius: 12px; gap: 10px; }
.fos-menu-item--nav .msr { color: var(--fos-accent); }
.fos-menu-item--tall { min-height: 56px; border-radius: 16px; }
.fos-menu-item--danger, .fos-menu-item--danger .msr { color: var(--fos-negative); }
.fos-menu-item__text { flex: 1; min-width: 0; }
.fos-menu-item__title { display: block; font-size: 14px; }
.fos-menu-item__sub { display: block; font-size: 12px; color: var(--fos-fg-4); }
.fos-menu-item__aside { margin-left: auto; font-size: 12px; color: var(--fos-fg-5); }

.fos-overlay { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.fos-overlay__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.fos-drawer {
    position: relative; width: 560px; max-width: 100%; height: 100%; background: var(--fos-panel);
    border-radius: 28px 0 0 28px; display: flex; flex-direction: column; box-shadow: var(--fos-shadow-drawer);
    animation: fos-slidein .22s ease; color: var(--fos-fg);
}
.fos-drawer--wide { width: 720px; }
.fos-drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 28px 32px 20px; }
.fos-drawer__title { margin: 0; font-size: 26px; font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
.fos-drawer__sub { font-size: 13px; color: var(--fos-fg-4); margin-top: 4px; }
.fos-drawer__body { flex: 1; overflow: auto; padding: 0 32px 24px; }
.fos-drawer__body > .fos-alert { margin-bottom: 18px; }
.fos-drawer__foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 20px 32px; border-top: 1px solid var(--fos-line); }
.fos-drawer__status { flex: 1; font-size: 12.5px; color: var(--fos-fg-4); min-width: 0; }
.fos-drawer__save { min-width: 170px; }
.fos-drawer__collapse {
    height: 48px; border-radius: var(--fos-r-field); border: none; background: var(--fos-inner); color: var(--fos-fg); font-size: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; width: 100%;
}
.fos-drawer__collapse:hover { background: var(--fos-hover); }
.fos-drawer__collapse .msr { color: var(--fos-fg-4); }
@media (max-width: 759.98px) {
    .fos-drawer, .fos-drawer--wide { width: 100%; border-radius: 0; }
    .fos-drawer__head { padding: 20px 18px 16px; }
    .fos-drawer__body { padding: 0 18px 20px; }
    .fos-drawer__foot { padding: 16px 18px; }
    .fos-drawer__save { min-width: 120px; }
}

.fos-dialog-backdrop { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .65); }
.fos-dialog {
    width: min(480px, 100%); background: var(--fos-panel); border-radius: var(--fos-r-dialog); padding: var(--fos-dialog-pad);
    box-shadow: var(--fos-shadow-dialog); animation: fos-pop .16s ease; color: var(--fos-fg); max-height: calc(100vh - 48px); overflow: auto; box-sizing: border-box;
}
.fos-dialog--md { width: min(640px, 100%); }
.fos-dialog--lg { width: min(860px, 100%); }
.fos-dialog__icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--fos-negative-soft); color: var(--fos-negative); }
.fos-dialog__icon .msr { font-size: 26px; }
.fos-dialog__title { margin: 18px 0 0; font-size: 24px; font-weight: 400; letter-spacing: -.02em; line-height: 1.2; }
.fos-dialog__title--top { margin-top: 0; }
.fos-dialog__text { margin: 10px 0 0; font-size: 14px; color: var(--fos-fg-3); line-height: 1.5; text-wrap: pretty; }
.fos-dialog__body { margin-top: 18px; }
.fos-dialog__actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.fos-dialog__actions .fos-btn--grow { min-width: 140px; }

.fos-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80;
    display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 10px 0 18px; border-radius: var(--fos-r-pill);
    background: var(--fos-fg); color: var(--fos-on-accent); font-size: 14px; box-shadow: var(--fos-shadow-toast);
    animation: fos-pop .18s ease; max-width: calc(100vw - 32px); box-sizing: border-box;
}
.fos-toast__icon { font-size: 20px; }
.fos-toast__icon--success { color: #1E7F49; }
.fos-toast__icon--info { color: #0B6E8F; }
.fos-toast__icon--warning { color: #8A6A12; }
.fos-toast__icon--error { color: #B3261E; }
.fos-toast__msg { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 8px 0; }
.fos-toast__action { border: none; background: var(--fos-on-accent); color: var(--fos-fg); height: 36px; padding: 0 16px; border-radius: var(--fos-r-pill); font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.fos-toast__close { border: none; background: none; color: var(--fos-on-accent); opacity: .55; cursor: pointer; display: flex; padding: 8px; }
.fos-toast__close .msr { font-size: 18px; }

/* ==========================================================================
   Estados
   ========================================================================== */

.fos-state { background: var(--fos-panel); border-radius: var(--fos-r-panel); padding: 56px 24px; text-align: center; }
.fos-state--tall { padding: 64px 24px; }
.fos-state--inline { background: none; padding: 32px 16px; }
.fos-state__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--fos-inner); color: var(--fos-fg-4); display: inline-flex; align-items: center; justify-content: center; }
.fos-state__icon .msr { font-size: 28px; }
.fos-state__icon--error { background: rgba(240, 128, 128, .14); color: var(--fos-negative); }
.fos-state__icon--warn { background: rgba(242, 193, 78, .14); color: var(--fos-warning); }
.fos-state__icon--accent { background: var(--fos-accent-soft); color: var(--fos-accent); }
.fos-state__icon--pos { background: rgba(140, 217, 160, .14); color: var(--fos-positive); }
.fos-state__icon--lilac { background: rgba(184, 166, 255, .14); color: var(--fos-lilac); }
.fos-state__title { font-size: 22px; margin-top: 14px; font-weight: 400; }
.fos-state__title--lg { font-size: 24px; }
.fos-state__text { font-size: 14px; color: var(--fos-fg-3); margin: 6px auto 0; max-width: 460px; text-wrap: pretty; }
.fos-state__actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.fos-skel-panel { background: var(--fos-panel); border-radius: var(--fos-r-panel); padding: 12px var(--fos-pad-cell); }
.fos-skel-row { display: grid; grid-template-columns: 100px 1fr 180px 150px 120px 110px; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--fos-line-2); }
.fos-skel-row:last-child { border-bottom: 0; }
@media (max-width: 759.98px) { .fos-skel-row { grid-template-columns: 1fr 90px; } .fos-skel-row > .fos-skel:nth-child(n+3) { display: none; } }
.fos-skel { height: 12px; border-radius: var(--fos-r-pill); background: var(--fos-inner); animation: fos-shimmer 1.4s infinite; display: block; }
.fos-skel--block { height: 120px; border-radius: 18px; }
.fos-skel--title { height: 20px; width: 40%; }
.fos-skel-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--fos-gap); }
.fos-loading-inline { display: flex; align-items: center; gap: 14px; color: var(--fos-fg-3); font-size: 14px; }

.fos-banner { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.fos-banner__title { font-size: 26px; letter-spacing: -.015em; }
.fos-banner__text { font-size: 14px; color: var(--fos-fg-3); margin-top: 8px; max-width: 720px; text-wrap: pretty; }
.fos-readonly-bar { display: flex; align-items: center; gap: 10px; background: var(--fos-panel); border-radius: var(--fos-r-pill); padding: 10px 16px; font-size: 13.5px; color: var(--fos-fg-2); margin-bottom: 20px; }
.fos-readonly-bar .msr { color: var(--fos-warning); font-size: 18px; }

/* ==========================================================================
   Gráficos em CSS: barras, trilhas, anéis
   ========================================================================== */

.fos-chart { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
@media (max-width: 759.98px) { .fos-chart { grid-template-columns: 32px minmax(0, 1fr); } }
.fos-chart__y { display: flex; flex-direction: column; justify-content: space-between; height: 100%; font-size: 11px; color: var(--fos-fg-5); text-align: right; }
.fos-chart__plot { position: relative; height: 100%; min-height: 190px; }
.fos-chart__grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.fos-chart__grid > span { border-top: 1px dashed var(--fos-line); }
.fos-chart__grid > span:last-child { border-top: 1px solid var(--fos-line-3); }
.fos-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: var(--fos-bar-gap); }
.fos-bars--static { position: relative; inset: auto; height: 260px; }
.fos-bar-col { flex: 1; min-width: 0; height: 100%; border: none; background: none; padding: 0; position: relative; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
button.fos-bar-col { cursor: pointer; }
button.fos-bar-col:disabled { cursor: default; }
.fos-bar { width: 100%; max-width: 44px; min-height: 6px; border-radius: 12px 12px 6px 6px; background: linear-gradient(180deg, #2E2E2E 0%, #212121 100%); transition: height .3s; display: block; }
.fos-bar.is-on { background: var(--fos-accent-gradient); }
.fos-bar.is-future { background: var(--fos-panel-hover); }
.fos-bar.is-pos { background: var(--fos-positive); }
.fos-bar.is-neg { background: var(--fos-negative); }
.fos-bar.is-muted { background: #3A3A3A; }
.fos-bar--sm { border-radius: 6px 6px 3px 3px; max-width: none; min-height: 3px; }
.fos-bar-tip {
    position: absolute; left: 50%; transform: translateX(-50%); height: 30px; padding: 0 12px; border-radius: var(--fos-r-pill);
    background: var(--fos-inner); border: 1px solid var(--fos-accent); color: var(--fos-fg); font-size: 13px; font-weight: 500;
    display: flex; align-items: center; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); z-index: 2;
}
.fos-bar-labels { display: flex; gap: var(--fos-bar-gap); min-width: 0; }
.fos-bar-labels > span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--fos-fg-4); overflow: hidden; }
.fos-bar-labels > span.is-on { color: var(--fos-fg); font-weight: 500; }
.fos-bar-labels > span.is-future { color: var(--fos-fg-disabled); }
.fos-bar-group { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.fos-bar-group__bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.fos-bar-group__label { text-align: center; font-size: 11px; color: var(--fos-fg-5); }

.fos-hbar { display: block; }
.fos-hbar__head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.fos-hbar__head > span:last-child { color: var(--fos-fg-2); white-space: nowrap; }
.fos-hbar__track { height: 8px; border-radius: var(--fos-r-pill); background: var(--fos-inner); margin-top: 6px; overflow: hidden; position: relative; }
.fos-hbar__track--10 { height: 10px; margin-top: 8px; }
.fos-hbar__fill { height: 100%; border-radius: var(--fos-r-pill); background: #3A3A3A; transition: width .3s; }
.fos-hbar__fill.is-on { background: var(--fos-accent); }
.fos-hbar__fill.is-grad { background: var(--fos-accent-gradient-h); }
.fos-hbar__fill.is-pos { background: var(--fos-positive); }
.fos-hbar__fill.is-neg { background: var(--fos-negative); }
.fos-hbar__fill.is-warn { background: var(--fos-warning); }
.fos-hbar__marker { position: absolute; top: -3px; bottom: -3px; border-left: 1.5px dashed var(--fos-fg-5); }
.fos-hbars { display: flex; flex-direction: column; gap: 12px; }

.fos-stackbar { display: flex; height: 34px; border-radius: 12px; overflow: hidden; }
.fos-stackbar > span { display: flex; align-items: center; justify-content: center; font-size: 11.5px; white-space: nowrap; overflow: hidden; }

.fos-ring { position: relative; flex: none; }
.fos-ring svg { display: block; }
.fos-ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.fos-ring__value { font-size: 15px; font-weight: 500; line-height: 1; }
.fos-ring__label { font-size: 12px; color: var(--fos-fg-4); }
.fos-ring circle.fos-ring__progress { transition: stroke-dasharray .3s; }

.fos-chart-canvas { position: relative; width: 100%; min-height: 220px; }

/* ==========================================================================
   Shell do app (header em cápsula)
   ========================================================================== */

.fos-header { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; max-width: 100%; position: relative; z-index: 45; }
@media (max-width: 759.98px) { .fos-header { gap: 10px; } }
.fos-header__brand { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: fit-content; }
/* Marca aprovada: SVGs em curvas, sem dependência de fontes externas.
   O texto original permanece acessível e é o fallback em cores forçadas. */
.fos-brand-mark, .lp-mock__bar .lp-mock__mark {
    width: 28px; height: 28px; flex: none; border: none; border-radius: 0;
    background: url("../images/foundrsos-symbol.svg") center / contain no-repeat;
    display: inline-flex; align-items: center; justify-content: center; color: transparent;
    cursor: pointer; padding: 0; text-decoration: none !important; line-height: 1;
}
.fos-brand-mark:hover { color: transparent; }
.fos-brand-mark--lg { width: 30px; height: 30px; }
.fos-brand-mark--light { filter: grayscale(1) brightness(2); }
.lp-mock__bar .lp-mock__mark { width: 22px; height: 22px; cursor: default; }
.fos-brand-name {
    display: inline-block; flex: none; width: 6.61059em; height: 1em;
    background: url("../images/foundrsos-wordmark.svg") center / contain no-repeat;
    font-size: 18px; line-height: 1; white-space: nowrap; color: transparent;
    overflow: hidden; text-decoration: none !important;
}
.fos-brand-name:hover { color: transparent; }
@media (max-width: 479.98px) { .lp-nav__brand .fos-brand-name { display: none; } }
@media (forced-colors: active) {
    .fos-brand-mark, .fos-brand-mark:hover, .lp-mock__bar .lp-mock__mark,
    .fos-brand-name, .fos-brand-name:hover { background: none; color: CanvasText; filter: none; }
    .fos-brand-name { width: auto; height: auto; font-weight: 600; }
}
.fos-brand-context { font-size: 13px; color: var(--fos-fg-5); margin-left: 4px; white-space: nowrap; }
.fos-header__brand { overflow: visible; }
@media (max-width: 759.98px) { .fos-brand-context { display: none; } .fos-header .fos-brand-name { display: none; } }

.fos-nav {
    display: flex; align-items: center; gap: 2px; height: 44px; padding: 4px; border-radius: var(--fos-r-pill);
    background: var(--fos-panel); position: relative; flex: 0 1 auto; max-width: 100%; min-width: 0;
    overflow-x: auto; scrollbar-width: none; box-sizing: border-box;
}
.fos-nav::-webkit-scrollbar { display: none; }
.fos-nav.has-open { overflow: visible; }
@media (max-width: 1179.98px) { .fos-nav { flex: 1 0 100%; order: 3; } }
.fos-nav__wrap { position: relative; flex: none; }
.fos-nav__item {
    height: 36px; padding: 0 16px 0 18px; border-radius: var(--fos-r-pill); border: none; background: transparent;
    color: var(--fos-fg-nav); font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 4px; white-space: nowrap;
    text-decoration: none !important;
}
.fos-nav__item:hover { background: var(--fos-hover); color: var(--fos-fg); }
.fos-nav__item.is-current { background: var(--fos-hover); color: var(--fos-fg); font-weight: 500; }
.fos-nav__item .msr { font-size: 18px; color: var(--fos-fg-4); }
.fos-nav__menu { top: 44px; left: 0; }

.fos-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 auto; min-width: 0; }
.fos-hdr-btn {
    height: 40px; padding: 0 14px 0 10px; border-radius: var(--fos-r-pill); border: none; background: var(--fos-panel); color: var(--fos-fg);
    font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; flex: none; text-decoration: none !important;
}
.fos-hdr-btn:hover { background: var(--fos-hover); color: var(--fos-fg); }
.fos-hdr-btn .msr { font-size: 18px; }
.fos-hdr-btn--org { padding: 0 14px 0 8px; }
.fos-hdr-btn__org-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--fos-inner); display: flex; align-items: center; justify-content: center; }
.fos-hdr-btn__org-icon .msr { font-size: 16px; color: var(--fos-accent); }
.fos-hdr-btn__org-text { display: flex; align-items: center; gap: 8px; max-width: 220px; overflow: hidden; }
.fos-hdr-btn__org-text > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.fos-hdr-btn__role { font-size: 12px; color: var(--fos-fg-4); }
.fos-hdr-btn__hint { color: var(--fos-fg-5); font-size: 13px; }
.fos-hdr-btn--commit { font-size: 13px; }
.fos-hdr-circle {
    width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--fos-panel); cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--fos-fg); flex: none; position: relative; padding: 0;
}
.fos-hdr-circle:hover { background: var(--fos-hover); }
.fos-hdr-circle__badge { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--fos-accent); border: 2px solid var(--fos-panel); }
.fos-hdr-avatar { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--fos-lilac); color: var(--fos-on-accent); font-weight: 600; font-size: 13px; cursor: pointer; flex: none; padding: 0; position: relative; }
.fos-hdr-avatar__crown { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--fos-accent); color: var(--fos-on-accent); display: flex; align-items: center; justify-content: center; border: 2px solid var(--fos-bg); }
.fos-hdr-avatar__crown .msr { font-size: 10px; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 20; }
@media (max-width: 1279.98px) {
    .fos-hdr-btn__org-text, .fos-hdr-btn__hint { display: none; }
    .fos-hdr-btn--org { padding: 0 8px; }
}
.fos-header__pop-anchor { position: relative; }
.fos-header__pop { top: 48px; right: 0; width: 340px; }
.fos-header__pop--apps { width: 300px; }
@media (max-width: 759.98px) {
    .fos-header__pop, .fos-header__pop--apps { position: fixed; top: 72px; left: 16px; right: 16px; width: auto; }
}

/* ==========================================================================
   Shell público (landing, auth, onboarding, seletor, retorno de pagamento)
   ========================================================================== */

.fos-glow { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; background: radial-gradient(ellipse at center, rgba(215, 255, 103, .10) 0%, rgba(215, 255, 103, 0) 70%); }
.fos-glow--top { top: 0; width: 700px; max-width: 100%; height: 340px; }
.fos-glow--hero { top: -180px; width: 820px; max-width: 100%; height: 420px; }

.fos-center-screen { min-height: calc(100vh - var(--fos-page-pad-y)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0; position: relative; box-sizing: border-box; }
.fos-auth-brand {
    position: relative; display: flex; align-items: center; gap: 10px; background: none; border: none; color: var(--fos-fg);
    cursor: pointer; padding: 8px 12px; border-radius: var(--fos-r-pill); margin-bottom: 26px; text-decoration: none !important;
}
.fos-auth-brand:hover { background: var(--fos-hover); color: var(--fos-fg); }
.fos-auth-card { position: relative; width: min(440px, 100%); background: var(--fos-panel); border-radius: var(--fos-r-dialog); padding: 34px 32px; box-sizing: border-box; }
@media (max-width: 759.98px) { .fos-auth-card { padding: 26px 22px; } }
.fos-auth-title { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
@media (max-width: 759.98px) { .fos-auth-title { font-size: 26px; } }
.fos-auth-sub { margin: 10px 0 0; font-size: 14px; color: var(--fos-fg-3); line-height: 1.5; text-wrap: pretty; }
.fos-auth-card > .fos-alert { margin-top: 18px; }
.fos-auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.fos-auth-or { display: flex; align-items: center; gap: 12px; margin: 2px 0; font-size: 12.5px; color: var(--fos-fg-5); }
.fos-auth-or::before, .fos-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--fos-line); }
.fos-auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--fos-line-2); font-size: 13.5px; color: var(--fos-fg-4); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fos-auth-foot a, .fos-auth-foot button { border: none; background: none; color: var(--fos-accent); font-size: 13.5px; cursor: pointer; padding: 0; }
.fos-auth-note { position: relative; margin-top: 18px; max-width: 440px; font-size: 12.5px; color: var(--fos-fg-5); text-align: center; text-wrap: pretty; }
.fos-link-btn { border: none; background: none; color: var(--fos-accent); font-size: 13.5px; cursor: pointer; padding: 0; align-self: flex-start; }
.fos-link-btn:hover { text-decoration: underline; }

.fos-wizard { width: min(720px, 100%); }
.fos-wizard__steps { display: flex; gap: 8px; }
.fos-wizard__steps > span { flex: 1; height: 5px; border-radius: var(--fos-r-pill); background: var(--fos-inner); }
.fos-wizard__steps > span.is-done { background: var(--fos-accent); }

/* ==========================================================================
   Formulários nativos do Blazor (EditForm) e erro do runtime
   ========================================================================== */

.validation-message { color: var(--fos-negative); font-size: 12.5px; margin-top: 6px; display: block; }
.invalid { outline: 1px solid var(--fos-negative); }
.valid.modified:not([type=checkbox]) { outline: none; }

#blazor-error-ui {
    background: var(--fos-panel); color: var(--fos-fg); box-shadow: 0 -8px 24px rgba(0, 0, 0, .5); display: none;
    left: 0; bottom: 0; padding: 14px 20px; position: fixed; width: 100%; z-index: 1200; border-top: 1px solid var(--fos-line); box-sizing: border-box;
}
#blazor-error-ui .reload { color: var(--fos-accent); margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .75rem; }
.blazor-error-boundary { background: var(--fos-negative-soft); color: var(--fos-negative); padding: 1rem 1.25rem; border-radius: var(--fos-r-inner); }
.blazor-error-boundary::after { content: "Ocorreu um erro nesta área."; }
