/*
 * SAT 5 — ajustes de tema sobre o Filament.
 * Claro: menu lateral cinza, destacado do conteúdo.
 * Escuro: grafite (sem preto), menu mais escuro que o conteúdo para dar contraste.
 */

/* ---------- Tema claro ---------- */
html:not(.dark) .fi-body {
    background-color: #f4f5f7;
}

html:not(.dark) .fi-sidebar,
html:not(.dark) .fi-sidebar-header {
    background-color: #e3e6ea;
}

html:not(.dark) .fi-sidebar {
    border-inline-end: 1px solid #d0d5dc;
}

html:not(.dark) .fi-sidebar-group-label {
    color: #4b5563;
}

html:not(.dark) .fi-sidebar-item-btn:hover,
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

/* ---------- Tema escuro (grafite) ---------- */
html.dark {
    --gray-950: #2a2e34; /* fundo da página */
    --gray-900: #343a42; /* barra superior, cartões, tabelas, menus suspensos */
}

html.dark .fi-sidebar,
html.dark .fi-sidebar-header {
    background-color: #1f2328;
}

html.dark .fi-sidebar {
    border-inline-end: 1px solid rgb(255 255 255 / 0.06);
}

html.dark .fi-sidebar-item-btn:hover,
html.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: rgb(255 255 255 / 0.09);
}

/* ---------- Botões principais no laranja da marca, texto branco ----------
 * O Filament clareia o laranja e usa texto escuro por causa do contraste;
 * aqui fixamos o laranja VMAX (#F17607) com texto branco em negrito. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) {
    background-color: #f17607;
    color: #ffffff;
    font-weight: 600;
}

.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link):hover {
    background-color: #d96806;
    color: #ffffff;
}

.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) .fi-icon {
    color: #ffffff;
}

/* ---------- Página de cadastros (cards) ---------- */
.sat5-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
}

.sat5-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.sat5-card-ativo:hover {
    border-color: #f17607;
    box-shadow: 0 4px 14px rgb(241 118 7 / 0.12);
    transform: translateY(-1px);
}

.sat5-card-breve {
    cursor: default;
    opacity: .7;
}

.sat5-card-icone {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    background-color: #fff1e6;
    color: #c95f00;
}

.sat5-card-icone-svg {
    width: 1.35rem;
    height: 1.35rem;
}

.sat5-card-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.sat5-card-titulo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}

.sat5-card-descricao {
    font-size: .875rem;
    line-height: 1.35;
    color: #6b7280;
}

.sat5-card-selo {
    font-size: .7rem;
    font-weight: 500;
    padding: .05rem .45rem;
    border-radius: 999px;
    background-color: #f3f4f6;
    color: #6b7280;
}

.sat5-card-seta {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    margin-top: .1rem;
}

html.dark .sat5-card {
    background-color: #343a42;
    border-color: rgb(255 255 255 / 0.08);
}

html.dark .sat5-card-icone {
    background-color: rgb(241 118 7 / 0.15);
    color: #f8a04f;
}

html.dark .sat5-card-titulo { color: #f3f4f6; }
html.dark .sat5-card-descricao { color: #9ca3af; }
html.dark .sat5-card-selo { background-color: rgb(255 255 255 / 0.08); color: #9ca3af; }

/* ---------- Logo maior na tela de login ---------- */
.fi-simple-main .fi-logo {
    height: 3.25rem !important;
    margin-bottom: 0.5rem;
}

/* ---------- Captcha (ALTCHA) acompanhando o tema ---------- */
html:not(.dark) altcha-widget {
    --altcha-color-base: #ffffff;
    --altcha-color-base-content: #1f2937;
    --altcha-input-background-color: #ffffff;
}

html.dark altcha-widget {
    color-scheme: dark;
    --altcha-color-base: #2a2e34;
    --altcha-color-base-content: #e5e7eb;
    --altcha-input-background-color: #343a42;
}
