/* =====================================================================
   FgTech — Identidade "Encaixe"
   ---------------------------------------------------------------------
   O simbolo da FgTech e uma esfera partida por uma curva em S: metade
   laranja, metade azul, com um miolo prateado entre as duas. O painel e
   montado sobre esse encaixe:

   - o LARANJA #FF6A00 e superficie de destaque (o topo do Inicio, o item
     ativo do menu) e sempre leva TINTA por cima — branco sobre ele da 2.9:1;
   - a BRASA #C24E00 e o laranja que segura texto branco: os botoes;
   - o AZUL do simbolo #43489D e o apoio: rotulos, a costura da curva;
   - a TINTA #17182E (um indigo quase preto, derivado do azul) segura a
     lateral de navegacao;
   - o fundo e branco; campos sao pastilhas prata, cantos redondos.

   Tipos: Archivo expandida (titulos), Onest (texto), Martian Mono (dados).
   Assinatura: a CURVA EM S com o fio azul por baixo — no Inicio e no acesso.

   Os tokens --fgtech-marinho* foram mantidos por compatibilidade com as
   views; hoje apontam para a tinta.
   ===================================================================== */

:root {
    /* Marca — kit oficial */
    --fgtech-laranja: #FF6A00;           /* superficie de destaque, acento, foco */
    --fgtech-laranja-600: #C24E00;       /* brasa: botao com texto branco (4.8:1) */
    --fgtech-laranja-700: #A84300;
    --fgtech-laranja-800: #8F3900;       /* links e texto laranja sobre branco */
    --fgtech-laranja-300: #FF9A4D;       /* laranja sobre a tinta */
    --fgtech-laranja-fraco: #FFF3EA;
    --fgtech-laranja-fraco-2: #FFE0C7;

    --fgtech-aco: #43489D;               /* azul do simbolo: apoio */
    --fgtech-aco-fraco: #EEEFF8;

    --fgtech-marinho: #17182E;           /* tinta (nome herdado) */
    --fgtech-marinho-900: #0E0F20;
    --fgtech-marinho-700: #2A2B4A;

    /* Neutros prata */
    --fgtech-nevoa: #F5F5F8;             /* pastilha: campos, cabecalho de tabela */
    --fgtech-superficie: #FFFFFF;
    --fgtech-linha: #E6E6EE;
    --fgtech-linha-forte: #CFD0DC;
    --fgtech-tinta: #17182E;
    --fgtech-neutra: #5E6075;
    --fgtech-neutra-clara: #8C8EA3;

    /* Semanticos */
    --fgtech-sucesso: #0B7A54;
    --fgtech-sucesso-fraco: #E4F4EE;
    --fgtech-perigo: #CE332B;
    --fgtech-perigo-fraco: #FCECEB;
    --fgtech-atencao: #A96500;
    --fgtech-atencao-fraco: #FDF1DF;

    /* Forma — a esfera: tudo bem redondo, botoes em pilula */
    --fgtech-radius-lg: 22px;
    --fgtech-radius: 14px;
    --fgtech-radius-sm: 10px;
    --fgtech-sombra-1: 0 1px 2px rgba(23, 24, 46, .05);
    --fgtech-sombra-2: 0 2px 4px rgba(23, 24, 46, .05), 0 18px 40px -18px rgba(23, 24, 46, .28);
    --fgtech-anel: 0 0 0 3px rgba(255, 106, 0, .32);

    /* Tipos */
    --fgtech-font-marca: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
    --fgtech-font-ui: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --fgtech-font-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    --fgtech-lateral-w: 256px;
    --fgtech-topo-h: 60px;

    /* Remapeamentos do Bootstrap */
    --bs-primary: var(--fgtech-laranja-600);
    --bs-primary-rgb: 194, 78, 0;
    --bs-subtle-primary: var(--fgtech-laranja-fraco);
    --bs-link-color: var(--fgtech-laranja-800);
    --bs-link-color-rgb: 143, 57, 0;
    --bs-link-hover-color: var(--fgtech-laranja-700);
    --bs-box-shadow: var(--fgtech-anel);
    --bs-body-bg: var(--fgtech-superficie);
    --bs-body-color: var(--fgtech-tinta);
    --bs-body-font-family: var(--fgtech-font-ui);
    --bs-border-color: var(--fgtech-linha);
    --bs-secondary-color: var(--fgtech-neutra);
    --bs-border-radius: var(--fgtech-radius);
}

/* ---------- Base ---------- */
body {
    font-family: var(--fgtech-font-ui);
    font-size: 14px;
    background-color: var(--fgtech-superficie);
    color: var(--fgtech-tinta);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--fgtech-font-marca);
    font-stretch: 118%;
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--fgtech-tinta);
}

.fgtech-mono, .fgtech-dado {
    font-family: var(--fgtech-font-mono);
    font-size: .82em;
    font-stretch: 87.5%;
    letter-spacing: -.01em;
    font-feature-settings: "tnum" 1;
}

.fgtech-muted { color: var(--fgtech-neutra) !important; }

::selection {
    background: var(--fgtech-laranja-fraco-2);
    color: var(--fgtech-tinta);
}

*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb {
    background: var(--fgtech-linha-forte);
    border-radius: 10px;
    border: 3px solid var(--fgtech-superficie);
}
*::-webkit-scrollbar-thumb:hover { background: var(--fgtech-neutra-clara); }
*::-webkit-scrollbar-track { background: transparent; }

/* =====================================================================
   1. Lateral — a navegacao em tinta, fixa a esquerda (desktop) e gaveta
      offcanvas no celular (Bootstrap .offcanvas-lg).
   ===================================================================== */
.fgtech-lateral {
    --bs-offcanvas-width: min(300px, 86vw);
    --bs-offcanvas-bg: var(--fgtech-tinta);
    --bs-offcanvas-color: rgba(255, 255, 255, .82);
    /* !important porque o .offcanvas-lg do Bootstrap zera o fundo a partir de 992px */
    background-color: var(--fgtech-tinta) !important;
    color: rgba(255, 255, 255, .82);
}

@media (min-width: 992px) {
    .fgtech-lateral {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--fgtech-lateral-w);
        display: flex;
        flex-direction: column;
        z-index: 1030;
    }
    .fgtech-palco { margin-left: var(--fgtech-lateral-w); }
}

.fgtech-lateral-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 22px 18px;
}
.fgtech-lateral-topo img { height: 26px; display: block; }

.fgtech-lateral-corpo {
    flex: 1;
    overflow-y: auto;
    padding: 4px 14px 14px;
}
.fgtech-lateral-corpo::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-color: var(--fgtech-tinta); }

.fgtech-nav-section {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--fgtech-font-marca);
    font-stretch: 125%;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--fgtech-laranja-300); /* 7:1 sobre a tinta */
    padding: 0 10px;
    margin: 20px 0 8px;
}

.fgtech-nav { gap: 2px; }

.fgtech-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.fgtech-nav-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
    flex-shrink: 0;
    transition: color .15s ease;
}
.fgtech-nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.fgtech-nav-link:hover i { color: #fff; }

/* O item ativo e uma pilula laranja com tinta por cima — a metade laranja
   do simbolo acendendo onde voce esta. */
.fgtech-nav-link.active {
    background: var(--fgtech-laranja);
    color: var(--fgtech-tinta);
    font-weight: 700;
}
.fgtech-nav-link.active i { color: var(--fgtech-tinta); }

.fgtech-lateral-pe {
    padding: 12px 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.fgtech-conta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    transition: background-color .16s ease;
}
.fgtech-conta:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.fgtech-conta > i { margin-left: auto; font-size: 10px; color: rgba(255, 255, 255, .75); }

.fgtech-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fgtech-laranja);
    color: var(--fgtech-tinta);
    font-family: var(--fgtech-font-marca);
    font-stretch: 125%;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.fgtech-conta-nome { font-size: 13.5px; font-weight: 500; line-height: 1.15; min-width: 0; }
.fgtech-conta-nome small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .75); font-weight: 400; }

.fgtech-topo-icone {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, .72);
    transition: background-color .16s ease, color .16s ease;
}
.fgtech-topo-icone:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* Topo do celular: branco, com o logo colorido e o botao da gaveta */
.fgtech-topo {
    height: var(--fgtech-topo-h);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    background: var(--fgtech-superficie);
    border-bottom: 1px solid var(--fgtech-linha);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.fgtech-topo-marca img { height: 24px; display: block; }

.fgtech-menu-botao {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--fgtech-laranja);
    color: var(--fgtech-tinta);
    flex-shrink: 0;
}

/* =====================================================================
   2. Pagina
   ===================================================================== */
.fgtech-content {
    padding: 34px 40px 64px;
    width: 100%; /* sem largura maxima: o conteudo vai ate a borda direita em qualquer tela */
}

.fgtech-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.fgtech-page-title {
    font-family: var(--fgtech-font-marca);
    font-stretch: 125%;
    font-weight: 800;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -.035em;
    color: var(--fgtech-tinta);
    margin: 0;
}

.fgtech-page-apoio {
    margin: 8px 0 0;
    color: var(--fgtech-neutra);
    font-size: 14.5px;
    max-width: 72ch;
}

.fgtech-secao-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--fgtech-font-marca);
    font-stretch: 125%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--fgtech-aco);
    margin: 0 0 14px;
}

/* O simbolo em miniatura: as duas metades da esfera, separadas pelo vao em S */
.fgtech-esfera {
    width: 11px;
    height: 12px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(100deg, var(--fgtech-laranja) 0 46%, transparent 46% 56%, var(--fgtech-aco) 56%);
}

/* So opacidade, sem transform: um transform (mesmo o de identidade, retido pelo
   fill-mode) faz do elemento um containing block e quebra position:fixed dentro
   da pagina — era o que derrubava o rodape de acoes do SVA e os modais. */
.fgtech-fade-in { animation: fgtechFade .26s ease; }
@keyframes fgtechFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =====================================================================
   3. Botoes — pilula
   ===================================================================== */
.btn {
    font-family: var(--fgtech-font-ui);
    font-weight: 600;
    font-size: 14px;
    border-radius: 999px;
    padding: .52rem 1.15rem;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    --bs-btn-bg: var(--fgtech-laranja-600);
    --bs-btn-border-color: var(--fgtech-laranja-600);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--fgtech-laranja-700);
    --bs-btn-hover-border-color: var(--fgtech-laranja-700);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--fgtech-laranja-800);
    --bs-btn-active-border-color: var(--fgtech-laranja-800);
    --bs-btn-focus-shadow-rgb: 255, 106, 0;
}
.btn-primary:disabled,
.btn-primary.disabled,
fieldset:disabled .btn-primary {
    background-color: var(--fgtech-laranja-600) !important;
    border-color: var(--fgtech-laranja-600) !important;
    opacity: .45;
}

/* .btn-dark e usado como "cancelar/secundario" nas telas: contorno de tinta */
.btn-dark {
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--fgtech-tinta);
    --bs-btn-color: var(--fgtech-tinta);
    --bs-btn-hover-bg: var(--fgtech-tinta);
    --bs-btn-hover-border-color: var(--fgtech-tinta);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--fgtech-marinho-700);
    --bs-btn-active-border-color: var(--fgtech-marinho-700);
    --bs-btn-active-color: #fff;
    border-width: 1.5px;
}

.btn-outline-primary {
    --bs-btn-color: var(--fgtech-laranja-800);
    --bs-btn-border-color: var(--fgtech-linha-forte);
    --bs-btn-hover-bg: var(--fgtech-laranja-600);
    --bs-btn-hover-border-color: var(--fgtech-laranja-600);
    --bs-btn-hover-color: #fff;
}

.btn-danger {
    --bs-btn-bg: var(--fgtech-perigo);
    --bs-btn-border-color: var(--fgtech-perigo);
    --bs-btn-hover-bg: #B02A23;
    --bs-btn-hover-border-color: #B02A23;
}

.btn-link { color: var(--fgtech-laranja-800); font-weight: 600; }

.btn-sm { font-size: 13px; padding: .34rem .8rem; }
.btn-lg { font-size: 15px; padding: .66rem 1.4rem; }

/* Botoes de icone (a lupa dos filtros, acoes redondas).
   Tamanho FIXO e icone centralizado no grid — nao depender de aspect-ratio +
   stretch do flex: se um vizinho da linha crescer (campo ng-date mais alto,
   mensagem de validacao), o botao seguia a altura da linha e virava um circulo
   gigante. Era o "layout estranho" da lupa nas telas de listagem. */
.btn.rounded-circle { padding: 0; }

.btn.ratio-1:not(.btn-sm) {
    flex: 0 0 auto;
    align-self: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    display: inline-grid;
    place-items: center;
    aspect-ratio: auto;
}
.btn-sm.rounded-circle { width: 32px; height: 32px; display: inline-grid; place-items: center; }

/* As acoes de cada linha das tabelas ("..."): disco de tinta discreto,
   que acende em laranja no hover — o laranja fica para a acao principal. */
td .btn-primary.btn-sm.rounded-circle,
.datatable-buttons .btn-primary.btn-sm.rounded-circle {
    --bs-btn-bg: var(--fgtech-nevoa);
    --bs-btn-border-color: var(--fgtech-nevoa);
    --bs-btn-color: var(--fgtech-tinta);
    --bs-btn-hover-bg: var(--fgtech-laranja);
    --bs-btn-hover-border-color: var(--fgtech-laranja);
    --bs-btn-hover-color: var(--fgtech-tinta);
    --bs-btn-active-bg: var(--fgtech-laranja);
    --bs-btn-active-color: var(--fgtech-tinta);
}

/* =====================================================================
   4. Formularios — pastilhas prata, sem contorno, anel laranja no foco
   ===================================================================== */
label, .form-label {
    display: block;
    font-family: var(--fgtech-font-ui);
    font-weight: 600;
    font-size: 12.5px;
    color: var(--fgtech-tinta);
    margin-bottom: 6px;
}
/* rotulos que vivem em linha com o controle */
.form-check-label,
.btn-check + label,
.input-group > label,
.form-floating > label { display: inline-block; margin-bottom: 0; }
.form-text { color: var(--fgtech-neutra); font-size: 12.5px; }

.form-control,
.form-select {
    border: 1.5px solid transparent;
    border-radius: var(--fgtech-radius);
    padding: .56rem .9rem;
    color: var(--fgtech-tinta);
    background-color: var(--fgtech-nevoa);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.form-control:hover,
.form-select:hover { background-color: #EFEFF4; }
.form-control::placeholder { color: var(--fgtech-neutra-clara); }

.form-control:focus,
.form-select:focus,
.input-group .form-control:focus {
    border-color: var(--fgtech-laranja);
    background-color: var(--fgtech-superficie);
    box-shadow: var(--fgtech-anel);
}
.form-control:disabled,
.form-control[readonly] { background-color: var(--fgtech-nevoa); color: var(--fgtech-neutra); border-style: dashed; border-color: var(--fgtech-linha-forte); }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2317182E'%3E%3Cpath d='M8 11.2 3.4 6.6a1 1 0 0 1 1.4-1.4L8 8.4l3.2-3.2a1 1 0 1 1 1.4 1.4L8 11.2Z'/%3E%3C/svg%3E");
    background-size: 15px;
    background-position: right .8rem center;
}

.input-group-text {
    border: 1.5px solid transparent;
    background: var(--fgtech-nevoa);
    color: var(--fgtech-neutra);
    border-radius: var(--fgtech-radius);
}

.form-check-input {
    border: 1.5px solid var(--fgtech-linha-forte);
    width: 1.1em;
    height: 1.1em;
    margin-top: .2em;
}
.form-check-input:checked {
    background-color: var(--fgtech-laranja-600);
    border-color: var(--fgtech-laranja-600);
}
.form-check-input:focus {
    border-color: var(--fgtech-laranja);
    outline: 0;
    box-shadow: var(--fgtech-anel);
}
.form-check-label { font-family: var(--fgtech-font-ui); font-weight: 500; font-size: 13.5px; color: var(--fgtech-tinta); }

.form-switch { padding-left: 3.1em; }
.form-switch .form-check-input {
    width: 2.5em;
    height: 1.4em;
    margin-top: .1em;
    margin-left: -3.1em;
}

.form-floating > label { color: var(--fgtech-neutra); font-family: var(--fgtech-font-ui); font-weight: 400; }

/* =====================================================================
   5. Cartoes
   ===================================================================== */
.card {
    border: 1px solid var(--fgtech-linha);
    border-radius: var(--fgtech-radius-lg);
    background: var(--fgtech-superficie);
    box-shadow: none;
}
.card-body { padding: 24px; }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--fgtech-linha);
    padding: 16px 24px;
    font-family: var(--fgtech-font-marca);
    font-stretch: 118%;
    font-weight: 800;
    color: var(--fgtech-tinta);
}
.card-footer { background: transparent; border-top: 1px solid var(--fgtech-linha); padding: 14px 24px; }

/* =====================================================================
   6. Tabelas — sem moldura pesada: fio prata, cabecalho em mono azul
   ===================================================================== */
[class*="table-responsive"] {
    background: var(--fgtech-superficie);
    border: 1px solid var(--fgtech-linha);
    border-radius: var(--fgtech-radius-lg);
}

.table {
    --bs-table-bg: transparent;
    color: var(--fgtech-tinta);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0;
    vertical-align: middle;
}
.table > thead > tr > th {
    font-family: var(--fgtech-font-mono);
    font-stretch: 87.5%;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fgtech-aco);
    background: transparent;
    border-bottom: 1.5px solid var(--fgtech-tinta);
    padding: 14px 18px 10px;
    white-space: nowrap;
}
.table > tbody > tr > td {
    border-bottom: 1px solid var(--fgtech-linha);
    padding: 13px 18px;
    vertical-align: middle;
}
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #FAFAFC; }

.table > tbody > tr { transition: background-color .12s ease; }
.table > tbody > tr:hover > * { --bs-table-bg-state: var(--fgtech-laranja-fraco); }
.table tbody tr.clickable { cursor: pointer; }

/* o datatable ordena pelo cabecalho */
.table > thead > tr > th[ng-click],
.table > thead > tr > th .sorter { cursor: pointer; user-select: none; }
.table > thead > tr > th i { color: var(--fgtech-laranja); margin-left: 5px; }

/* areas aninhadas nao recebem a moldura */
[class*="table-responsive"] [class*="table-responsive"],
td [class*="table-responsive"] {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

.datatable-buttons { width: 1%; white-space: nowrap; text-align: right; }

/* =====================================================================
   7. Estado vazio
   ===================================================================== */
.fgtech-empty {
    background: var(--fgtech-nevoa);
    border: 0;
    border-radius: var(--fgtech-radius-lg);
    text-align: center;
    padding: 56px 24px;
    color: var(--fgtech-neutra);
}
.fgtech-empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fgtech-laranja);
    color: var(--fgtech-tinta);
    font-size: 1.3rem;
}
.fgtech-empty-title {
    font-family: var(--fgtech-font-marca);
    font-stretch: 125%;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -.02em;
    color: var(--fgtech-tinta);
    margin: 0 0 7px;
}
.fgtech-empty-text {
    margin: 0 auto;
    max-width: 46ch;
    font-size: 14px;
    color: var(--fgtech-neutra);
}

/* =====================================================================
   8. Abas, dropdowns, selos, paginacao, alertas, modais
   ===================================================================== */
.nav-tabs {
    border-bottom: 0;
    gap: 6px;
    padding: 4px;
    background: var(--fgtech-nevoa);
    border-radius: 999px;
    display: inline-flex;
    flex-wrap: wrap;
}
.nav-tabs .nav-link {
    border: 0;
    border-radius: 999px;
    font-family: var(--fgtech-font-ui);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--fgtech-neutra);
    padding: .45rem 1rem;
    margin-bottom: 0;
}
.nav-tabs .nav-link:hover { color: var(--fgtech-tinta); background: rgba(23, 24, 46, .05); }
.nav-tabs .nav-link.active {
    color: var(--fgtech-tinta);
    background: var(--fgtech-laranja);
}
.tab-content.border {
    border-color: var(--fgtech-linha) !important;
    border-radius: var(--fgtech-radius-lg);
    background: var(--fgtech-superficie);
    margin-top: 12px;
}

.dropdown-menu {
    border: 1px solid var(--fgtech-linha);
    border-radius: var(--fgtech-radius);
    box-shadow: var(--fgtech-sombra-2);
    padding: .35rem;
    --bs-dropdown-link-active-bg: var(--fgtech-laranja-600);
}
.dropdown-item {
    border-radius: var(--fgtech-radius-sm);
    font-weight: 500;
    font-size: 13.5px;
    padding: .5rem .7rem;
}
.dropdown-item:hover,
.dropdown-item:focus { background: var(--fgtech-laranja-fraco); color: var(--fgtech-laranja-800); }
.dropdown-item.active,
.dropdown-item:active { background: var(--fgtech-laranja-600); color: #fff; }
.dropdown-divider { border-color: var(--fgtech-linha); }

.badge {
    font-family: var(--fgtech-font-ui);
    font-weight: 600;
    font-size: 12px;
    padding: .38em .75em;
    border-radius: 999px;
}
.badge.bg-primary { background-color: var(--fgtech-laranja) !important; color: var(--fgtech-tinta) !important; }
.badge.bg-dark { background-color: var(--fgtech-tinta) !important; }
.badge.bg-success { background-color: var(--fgtech-sucesso) !important; }
.badge.bg-danger { background-color: var(--fgtech-perigo) !important; }
.badge.bg-secondary { background-color: var(--fgtech-neutra) !important; }

/* a paginacao das listas mora num wrapper generico (.d-flex.justify-content-center),
   sem margem — encostava direto na tabela. O respiro vem daqui, entao vale para as
   ~10 telas de listagem sem tocar em cada view. */
.pagination {
    margin-top: 1.25rem;
    margin-bottom: .25rem;
    --bs-pagination-color: var(--fgtech-neutra);
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: transparent;
    --bs-pagination-hover-color: var(--fgtech-tinta);
    --bs-pagination-hover-bg: var(--fgtech-nevoa);
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-focus-bg: var(--fgtech-nevoa);
    --bs-pagination-focus-box-shadow: var(--fgtech-anel);
    --bs-pagination-active-color: var(--fgtech-tinta);
    --bs-pagination-active-bg: var(--fgtech-laranja);
    --bs-pagination-active-border-color: var(--fgtech-laranja);
    --bs-pagination-disabled-bg: transparent;
    --bs-pagination-disabled-border-color: transparent;
    --bs-pagination-disabled-color: var(--fgtech-neutra-clara);
}
.pagination .page-link { border: 0; margin: 0 2px; border-radius: 999px !important; font-weight: 600; min-width: 34px; text-align: center; }

.alert { border-radius: var(--fgtech-radius); border-width: 1px; }
.alert-primary {
    background-color: var(--fgtech-laranja-fraco);
    color: var(--fgtech-laranja-800);
    border-color: var(--fgtech-laranja-fraco-2);
}

.list-group-item { border-color: var(--fgtech-linha); }
.list-group-item-primary {
    --bs-list-group-bg: var(--fgtech-laranja-fraco);
    --bs-list-group-border-color: var(--fgtech-laranja-fraco-2);
    --bs-list-group-action-hover-bg: var(--fgtech-laranja-fraco-2);
    --bs-list-group-active-color: #fff;
    --bs-list-group-active-bg: var(--fgtech-laranja-600);
    --bs-list-group-active-border-color: var(--fgtech-laranja-600);
}

.modal-content {
    border: 0;
    border-radius: var(--fgtech-radius-lg);
    box-shadow: var(--fgtech-sombra-2);
}
.modal-header { border-bottom: 1px solid var(--fgtech-linha); padding: 18px 24px; }
.modal-body { padding: 22px 24px; }
.modal-footer { border-top: 1px solid var(--fgtech-linha); padding: 14px 24px; }

.progress-bar.bg-primary { background-color: var(--fgtech-laranja-600); }
.bg-primary { background-color: var(--fgtech-laranja-600) !important; }
.text-primary { color: var(--fgtech-laranja-800) !important; }
.link-primary { color: var(--fgtech-laranja-800) !important; }
.text-muted { color: var(--fgtech-neutra) !important; }
.border { border-color: var(--fgtech-linha) !important; }

/* =====================================================================
   9. Inicio — o topo laranja com a curva em S, e os atalhos
   ===================================================================== */
.fgtech-inicio-topo {
    position: relative;
    margin: -34px -40px 40px;
    padding: 46px 40px 0;
    background: var(--fgtech-laranja);
    color: var(--fgtech-tinta);
}
.fgtech-inicio-topo h1 {
    font-family: var(--fgtech-font-marca);
    font-stretch: 125%;
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.045em;
    color: var(--fgtech-tinta);
    margin: 0;
    max-width: 18ch;
}
.fgtech-inicio-topo p {
    margin: 12px 0 0;
    font-size: 15.5px;
    color: rgba(23, 24, 46, .78);
    max-width: 58ch;
}
.fgtech-inicio-data {
    font-family: var(--fgtech-font-mono);
    font-stretch: 87.5%;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(23, 24, 46, .72);
    margin: 0 0 16px;
}

/* A curva em S: o laranja desce fundo a esquerda e encosta no alto a direita;
   o fio azul corre paralelo, depois do vao prateado. */
.fgtech-curva {
    display: block;
    width: calc(100% + 80px);
    height: 56px;
    margin: 28px -40px -1px;
    background: var(--fgtech-superficie); /* abaixo da curva e branco, nao o laranja da secao */
}
.fgtech-curva .laranja { fill: var(--fgtech-laranja); }
.fgtech-curva .fio { fill: none; stroke: var(--fgtech-aco); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.fgtech-atalho {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    height: 100%;
    background: var(--fgtech-nevoa);
    border-radius: var(--fgtech-radius-lg);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: background-color .18s ease, transform .18s ease;
}
.fgtech-atalho:hover { background: var(--fgtech-laranja-fraco); color: inherit; transform: translateY(-2px); }

.fgtech-atalho-icone {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--fgtech-laranja);
    color: var(--fgtech-tinta);
    font-size: 15px;
    transition: background-color .18s ease, color .18s ease;
}
.fgtech-atalho:hover .fgtech-atalho-icone { background: var(--fgtech-tinta); color: var(--fgtech-laranja); }

.fgtech-atalho-titulo {
    font-family: var(--fgtech-font-marca);
    font-stretch: 118%;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--fgtech-tinta);
    margin: 2px 0 0;
}
.fgtech-atalho-desc {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--fgtech-neutra);
    max-width: 36ch;
}

/* compatibilidade: a saudacao antiga do Inicio */
.fgtech-saudacao { margin-bottom: 26px; }

/* =====================================================================
   10. Acessibilidade, utilidades e responsivo
   ===================================================================== */
:focus-visible {
    outline: 2px solid var(--fgtech-laranja);
    outline-offset: 2px;
    border-radius: 4px;
}
.fgtech-lateral :focus-visible { outline-color: var(--fgtech-laranja-300); }

.tamanho-do-dropdown-usuario { width: 240px; }
.ratio-1 { aspect-ratio: 1; }
.ratio-md-1 { aspect-ratio: 1; }

@media (max-width: 991.98px) {
    .fgtech-content { padding: 24px 16px 48px; }
    .fgtech-inicio-topo { margin: -24px -16px 32px; padding: 32px 16px 0; }
    .fgtech-curva { width: calc(100% + 32px); margin: 22px -16px -1px; height: 40px; }
}

@media (max-width: 767.98px) {
    .fgtech-topbar { flex-direction: column; align-items: stretch; }
    .fgtech-page-title { font-size: 25px; }
    .ratio-md-1 { aspect-ratio: unset; }
    [class*="table-responsive"] .table { min-width: 720px; }
}

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