Collaborators logged into GTI Gerenciador open GTI Fiscal without a second password. The panel signs a 60 s JWT (Ed25519; the Hub holds only the public key); the Hub checks signature, iss/aud/exp/nbf, maximum lifetime, nonce against a one-time state cookie set when the flow starts at GET /login (login-CSRF protection) and a single-use jti (sso_used_assertions). Collaborators are provisioned in admin_users with auth_source=GTI_GERENCIADOR and no password; a CHECK constraint makes a passwordless local account or a federated account with a password impossible (migration 0021). Sessions last FEDERATED_SESSION_SECONDS (1 h) and are renewed silently through the panel. The local admin stays as break-glass at /login/local, audited. Logout ends only the Hub session. Every SSO success/rejection (stable reason code), logout and local login is audited with the real client IP, never the token. verify_password now fails closed on a missing hash instead of raising. Visual identity: gti-theme.css is a verbatim copy of the panel's design system (tokens, sidebar, light/dark theme) plus its tema.js, sidebar.js and logo; control-panel.css keeps only Hub components, all colours from the panel tokens. Page structure and features unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
151 lines
10 KiB
CSS
151 lines
10 KiB
CSS
/* GTI Fiscal — componentes específicos do Fiscal sobre o design system do
|
|
GTI Gerenciador (gti-theme.css, carregado antes). Nenhuma cor própria:
|
|
tudo vem dos tokens --cor-* do Gerenciador, inclusive no tema escuro. */
|
|
|
|
/* Aliases usados pelos templates do Fiscal -> tokens do Gerenciador */
|
|
:root {
|
|
--ink: var(--cor-texto);
|
|
--muted: var(--cor-texto-secundario);
|
|
--paper: var(--cor-fundo);
|
|
--card: var(--cor-superficie);
|
|
--line: var(--cor-borda);
|
|
--accent: var(--cor-acento-texto);
|
|
--accent-soft: var(--cor-acento-suave);
|
|
--danger: var(--cor-perigo);
|
|
--warn: var(--cor-aviso);
|
|
--shadow: var(--sombra-card);
|
|
}
|
|
|
|
/* ---------- layout: mesma sidebar do Gerenciador, conteúdo um pouco mais largo ---------- */
|
|
.conteudo-fiscal { max-width: 1280px; }
|
|
.sidebar-nav a.sidebar-voltar { color: var(--cor-texto-secundario); font-size: 0.9rem; }
|
|
.sidebar-nav a.sidebar-voltar:hover { color: var(--cor-texto); }
|
|
.sidebar-secao { padding: 14px 12px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cor-texto-secundario); }
|
|
.sidebar.recolhida .sidebar-secao { display: none; }
|
|
|
|
/* ---------- tipografia de página ---------- */
|
|
.page-heading, .detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
|
|
.page-heading h1, .detail-head h1 { margin-bottom: 4px; }
|
|
p { margin-top: 0; }
|
|
.eyebrow { color: var(--cor-acento-texto); font-size: 0.72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
|
|
.muted, small { color: var(--cor-texto-secundario); }
|
|
small { display: block; font-size: 0.78rem; }
|
|
.live-dot { color: var(--cor-sucesso); font-size: 0.8rem; white-space: nowrap; }
|
|
|
|
/* ---------- cartões (mesmo visual de .cartao do Gerenciador) ---------- */
|
|
.metric, .panel { background: var(--cor-superficie); border: 1px solid var(--cor-borda); box-shadow: var(--sombra-card); border-radius: 12px; }
|
|
.panel { padding: 20px; margin-bottom: 20px; }
|
|
.panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
|
|
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
|
|
.panel-title h2 { margin-bottom: 0; }
|
|
.panel-title a { font-size: 0.85rem; }
|
|
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
|
|
.cards.compact { grid-template-columns: repeat(4, 1fr); }
|
|
.metric { padding: 16px; }
|
|
.metric span { color: var(--cor-texto-secundario); font-size: 0.8rem; }
|
|
.metric strong { font-size: 1.75rem; display: block; margin-top: 6px; }
|
|
.metric-inline strong { display: inline; }
|
|
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
|
|
.split .panel { margin-bottom: 0; }
|
|
|
|
.coverage { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
|
|
.coverage div { border-left: 3px solid var(--cor-acento); padding-left: 12px; }
|
|
.coverage strong { display: block; font-size: 1.4rem; }
|
|
.coverage span { color: var(--cor-texto-secundario); font-size: 0.78rem; }
|
|
.coverage-status { margin: 16px 0 0; color: var(--cor-sucesso); font-size: 0.8rem; font-weight: 700; }
|
|
.registry-summary { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--cor-borda); color: var(--cor-texto-secundario); font-size: 0.8rem; }
|
|
.registry-summary a { text-decoration: none; }
|
|
.bar-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--cor-borda); padding: 8px 0; }
|
|
.bar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
|
|
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 8px; margin: 0 -8px; border-bottom: 1px solid var(--cor-borda); border-radius: 8px; text-decoration: none; color: inherit; transition: background var(--transicao); }
|
|
.list-row:last-child { border-bottom: 0; }
|
|
.list-row:hover { background: var(--cor-superficie-alt); }
|
|
.empty-state { color: var(--cor-texto-secundario); border: 1px dashed var(--cor-borda); border-radius: 8px; padding: 18px; margin: 0; }
|
|
|
|
/* ---------- badges: mesma forma do .badge do Gerenciador, cores semânticas dos tokens ---------- */
|
|
.badge, .severity { display: inline-flex; align-items: center; border: 0; border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; font-style: normal; font-weight: 600; white-space: nowrap; background: var(--cor-superficie-alt); color: var(--cor-texto-secundario); }
|
|
.badge.large { padding: 6px 12px; }
|
|
.badge-stack { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
|
|
.online, .fiscal-complete, .status-completed, .info { background: var(--cor-sucesso-fundo); color: var(--cor-sucesso); }
|
|
.degraded, .warning, .fiscal-incomplete, .status-pending, .status-running, .priority-high { background: var(--cor-aviso-fundo); color: var(--cor-aviso); }
|
|
.offline, .unknown, .priority-low { background: var(--cor-superficie-alt); color: var(--cor-texto-secundario); }
|
|
.failed, .error.badge, .priority-critical, .status-failed, .critical { background: var(--cor-perigo-fundo); color: var(--cor-perigo); }
|
|
.blocked, .priority-normal, .fiscal-blocked { background: var(--cor-acento-suave); color: var(--cor-acento-texto); }
|
|
|
|
/* ---------- formulários e botões (padrão do Gerenciador) ---------- */
|
|
.conteudo-fiscal button { margin-top: 0; }
|
|
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
|
|
.filters label { color: var(--cor-texto-secundario); display: grid; gap: 4px; font-size: 0.8rem; font-weight: 600; margin: 0; }
|
|
.filters input, .filters select { width: auto; min-width: 150px; }
|
|
.filters button { align-self: end; }
|
|
textarea { padding: 9px 10px; border-radius: 8px; border: 1px solid var(--cor-borda); background: var(--cor-fundo); color: var(--cor-texto); font: inherit; width: 100%; }
|
|
/* Como no Gerenciador: <button> é a ação principal (laranja, gti-theme.css);
|
|
link com cara de botão (a.secondary ~ a.botao) tem só contorno. */
|
|
a.secondary { display: inline-block; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--cor-borda); background: transparent; color: var(--cor-texto); font-weight: 400; text-decoration: none; }
|
|
a.secondary:hover { border-color: var(--cor-acento); color: var(--cor-acento); }
|
|
.blocker-filters label { flex: 1 1 170px; }
|
|
.compact-filters { margin-top: 12px; }
|
|
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
|
|
.form-grid label { display: grid; gap: 5px; color: var(--cor-texto-secundario); font-weight: 600; margin: 0; }
|
|
.form-grid .wide { grid-column: 1 / -1; }
|
|
.form-grid textarea { min-height: 100px; resize: vertical; }
|
|
.error, .error-text { color: var(--cor-perigo); }
|
|
.alert.error { padding: 10px 14px; border-radius: 8px; background: var(--cor-perigo-fundo); color: var(--cor-perigo); }
|
|
|
|
/* ---------- tabelas (mesmo cartão de .tabela-wrap do Gerenciador) ---------- */
|
|
.table-wrap { overflow-x: auto; border: 1px solid var(--cor-borda); border-radius: 12px; background: var(--cor-superficie); box-shadow: var(--sombra-card); }
|
|
.panel .table-wrap { box-shadow: none; }
|
|
/* Tabelas do Fiscal são largas: mantêm a largura mínima (rolagem horizontal no
|
|
.table-wrap) e só quebram palavras que não cabem — o overflow-wrap:anywhere
|
|
do tema quebraria nomes letra por letra em colunas estreitas. */
|
|
.conteudo-fiscal table { width: 100%; min-width: 960px; }
|
|
.conteudo-fiscal td { vertical-align: top; overflow-wrap: break-word; }
|
|
.conteudo-fiscal td a.secondary, .conteudo-fiscal td .badge { white-space: nowrap; }
|
|
caption { text-align: left; font-size: 1rem; font-weight: 700; padding: 14px 14px 4px; }
|
|
td a { text-decoration: none; }
|
|
|
|
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 12px 0 20px; color: var(--cor-texto-secundario); }
|
|
.pagination a { border: 1px solid var(--cor-borda); background: transparent; color: var(--cor-texto); border-radius: 8px; padding: 6px 12px; text-decoration: none; }
|
|
.pagination a:hover { border-color: var(--cor-acento); color: var(--cor-acento); }
|
|
|
|
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--cor-borda); }
|
|
.tabs a { padding: 9px 13px; text-decoration: none; color: var(--cor-texto-secundario); }
|
|
.tabs a.active { color: var(--cor-acento-texto); border-bottom: 3px solid var(--cor-acento); font-weight: 700; }
|
|
|
|
.facts { display: grid; grid-template-columns: minmax(130px, .7fr) 1fr; gap: 10px 18px; margin: 0; }
|
|
.facts dt { color: var(--cor-texto-secundario); font-weight: 600; }
|
|
.facts dd { margin: 0; overflow-wrap: anywhere; }
|
|
.event-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--cor-borda); }
|
|
.event-row:last-child { border-bottom: 0; }
|
|
.event-time { color: var(--cor-texto-secundario); font-size: 0.8rem; }
|
|
.evidence { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.8rem/1.4 ui-monospace, monospace; }
|
|
|
|
/* ---------- páginas avulsas (acesso de emergência, erro de SSO, saída) — mesmo visual do login do Gerenciador ---------- */
|
|
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(circle at top, var(--cor-superficie-alt), var(--cor-fundo)); }
|
|
.login-card { width: 100%; max-width: 380px; text-align: center; margin: 0; }
|
|
.login-card form { text-align: left; }
|
|
.login-card form button[type="submit"] { width: 100%; }
|
|
.login-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 12px; }
|
|
.login-card h1 { font-size: 1.3rem; margin-bottom: 4px; }
|
|
.login-subtitle { color: var(--cor-texto-secundario); font-size: 0.9rem; margin: 0 0 20px; }
|
|
.login-actions { display: grid; gap: 10px; margin-top: 16px; }
|
|
.login-actions a.botao { margin: 0; }
|
|
|
|
@media (max-width: 1100px) {
|
|
.cards { grid-template-columns: repeat(3, 1fr); }
|
|
.bar-grid { grid-template-columns: repeat(2, 1fr); }
|
|
.page-heading, .detail-head { align-items: flex-start; flex-direction: column; }
|
|
.badge-stack { justify-content: flex-start; }
|
|
}
|
|
@media (max-width: 768px) {
|
|
.cards, .cards.compact, .split { grid-template-columns: 1fr 1fr; }
|
|
.coverage { grid-template-columns: repeat(2, 1fr); }
|
|
.form-grid { grid-template-columns: 1fr; }
|
|
.form-grid .wide { grid-column: auto; }
|
|
.event-row { grid-template-columns: 1fr; gap: 4px; }
|
|
}
|
|
@media (max-width: 520px) {
|
|
.cards, .cards.compact, .split, .bar-grid { grid-template-columns: 1fr; }
|
|
.filters label, .filters input, .filters select, .filters button { width: 100%; }
|
|
}
|