@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/**
 * FBA WEB — Design System Central (Premium)
 * Cores, Tipografia e Resets Globais
 */

html {
    scroll-behavior: smooth;
}

:root {
    /* Paleta Principal (Harmonizada HSL) */
    --laranja: hsl(32, 82%, 51%);
    /* #E8861A */
    --laranja-esc: hsl(32, 82%, 44%);
    /* #C8711A */
    --marrom: hsl(0, 7%, 22%);
    /* #3D3535 */
    --cinza-bg: hsl(30, 14%, 94%);
    /* #f4f1ee */
    --cinza-brd: hsl(30, 11%, 87%);
    /* #e2ddd8 */
    --branco: #ffffff;
    --verde: hsl(123, 46%, 34%);
    /* #2e7d32 */
    --vermelho: hsl(0, 66%, 47%);
    /* #c62828 */
    --texto: hsl(0, 7%, 22%);
    /* #3D3535 */
    --texto-light: hsl(0, 0%, 53%);
    /* #888888 */
    --sombra: 0 4px 12px hsla(0, 7%, 22%, 0.08);

    /* Gaps e Radii */
    --radius: 8px;
    --gap: 16px;
}

/* Reset Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--cinza-bg);
    color: var(--texto);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
.navbar-title,
.proc-pasta {
    font-family: 'Inter', Georgia, serif;
    font-weight: 700;
}

/* Ajustes Gerais de Tipografia */
.nav-btn,
.btn-editar,
.btn-sync,
.stat-card .l,
.navbar-data small {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

/* Tabelas Premium */
table {
    width: 100%;
}

/* Otimização de Links */
a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Scrollbar Style (Opcional - Premium) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cinza-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--cinza-brd);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--texto-light);
}

/* ─── Navegação Global (Navbar Premium - Grid Layout) ────────────────────── */
.navbar {
    background: var(--marrom);
    height: 56px;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Esquerda (Auto) | Centro (Fixo) | Direita (Auto) */
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.navbar a {
    color: #bbb;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.navbar a:hover {
    color: #fff;
}

/* Coluna Esquerda: Logo + Breadcrumb */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--laranja);
    padding: 1px;
}

.navbar-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.navbar-title {
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    font-family: Georgia, serif;
    letter-spacing: 0.5px;
    text-transform: none;
}

.navbar-tagline {
    color: var(--laranja);
    font-size: 9px;
    font-family: Arial, sans-serif;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 1px;
}

.navbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bbb;
    font-size: 13px;
}

.navbar-breadcrumb a {
    color: #888;
}

.navbar-current {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* Coluna Central: Relógio/Data */
.navbar-center {
    display: flex;
    justify-content: center;
}

.navbar-data {
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
}

.navbar-data small {
    color: #bbb;
    font-size: 10px;
    display: block;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Coluna Direita: Saudação + Sair */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

.nav-info {
    color: #bbb;
    font-size: 12px;
}

.btn-sair {
    color: #bbb;
    text-decoration: none;
    font-size: 12px;
    padding: 5px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    transition: all .2s;
}

.btn-sair:hover {
    color: #fff !important;
    border-color: #aaa;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* BOTÃO VOLTAR AO TOPO (FLOATING) */
.btn-topo {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--laranja);
    color: #fff !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-topo:hover {
    transform: translateY(-5px);
    background: var(--laranja-esc);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-topo i, .btn-topo span {
    display: block;
    line-height: 1;
}

.btn-topo .seta {
    font-size: 18px;
    margin-bottom: 2px;
}

/* ─── Dashboard Stats Grid ──────────────────────────────────────────────── */
.stats-grid, .stat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--branco);
    border-radius: 6px;
    padding: 14px 16px;
    border: 1px solid var(--cinza-brd);
    box-shadow: var(--sombra);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card .n {
    font-size: 28px;
    font-weight: 800;
    color: var(--marrom);
    line-height: 1;
}

.stat-card .n.laranja { color: var(--laranja); }
.stat-card .n.verde { color: var(--verde); }
.stat-card .n.vermelho { color: var(--vermelho); }

.stat-card .l {
    font-size: 10px;
    color: var(--texto-light);
    margin-top: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ─── Botões de Navegação Secundária ────────────────────────────────────────── */
.nav-botoes {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    position: relative;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: Arial, sans-serif;
}

.nav-btn-laranja {
    background: var(--laranja);
    color: #fff;
}

.nav-btn-laranja:hover {
    background: var(--laranja-esc);
    transform: translateY(-1px);
}

.nav-btn-escuro {
    background: var(--marrom);
    color: #fff;
}

.nav-btn-escuro:hover {
    background: #000;
    transform: translateY(-1px);
}

.nav-btn-cinza {
    background: #4a5568;
    color: #fff;
}

.nav-btn-cinza:hover {
    background: #2d3748;
    transform: translateY(-1px);
}

.nav-btn.ativo {
    background: var(--laranja-esc);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.nav-btn-cinza.ativo {
    background: #2d3748;
}

/* Badge de Alerta Pulsante */
.badge-alert {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: var(--vermelho);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(198, 40, 40, 0.4);
    animation: pulse-red 2s infinite;
    z-index: 10;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(198, 40, 40, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(198, 40, 40, 0); }
}