/*
 * SPIV — Sistema de Vendas
 * Estilo principal — inspirado nos Correios (azul + amarelo)
 * Bootstrap 5.3.8 + customizações
 */

/* ── Variáveis de Cor ─────────────────────────────────────── */
:root {
    --spiv-azul:       #003087;
    --spiv-azul-claro: #004aad;
    --spiv-amarelo:    #FFCC00;
    --spiv-amarelo-hover: #e6b800;
    --spiv-branco:     #ffffff;
    --spiv-cinza-bg:   #f4f6fa;
    --spiv-cinza-brd:  #dee2e6;
    --spiv-text-dark:  #1a1a2e;
    --spiv-text-muted: #6c757d;
    --spiv-shadow:     0 4px 20px rgba(0, 48, 135, 0.12);
    --spiv-shadow-hover: 0 8px 32px rgba(0, 48, 135, 0.2);
}

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--spiv-cinza-bg);
    color: var(--spiv-text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAVBAR ───────────────────────────────────────────────── */
.spiv-navbar {
    background: var(--spiv-azul);
    border-bottom: 4px solid var(--spiv-amarelo);
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.spiv-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    text-decoration: none;
}

.spiv-navbar .navbar-brand img {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}

.spiv-navbar .navbar-brand img:hover {
    transform: scale(1.05);
}

.spiv-navbar .brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--spiv-amarelo);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.spiv-navbar .brand-tagline {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.75);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-top: -4px;
}

/* Nav links */
.spiv-navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1.2rem 1rem !important;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.2s ease;
}

.spiv-navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--spiv-amarelo);
    border-radius: 3px 3px 0 0;
    transition: width 0.25s ease;
}

.spiv-navbar .navbar-nav .nav-link:hover,
.spiv-navbar .navbar-nav .nav-link.active {
    color: var(--spiv-amarelo) !important;
}

.spiv-navbar .navbar-nav .nav-link:hover::after,
.spiv-navbar .navbar-nav .nav-link.active::after {
    width: 80%;
}

.spiv-navbar .navbar-toggler {
    border-color: rgba(255,204,0,0.4);
}

.spiv-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* Barra de topo utilitária */
.spiv-topbar {
    background: #001f5b;
    border-bottom: 1px solid rgba(255,204,0,0.2);
    padding: 6px 0;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
}

.spiv-topbar a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.spiv-topbar a:hover {
    color: var(--spiv-amarelo);
}

/* ── HERO / BANNER ───────────────────────────────────────── */
.spiv-hero {
    background: linear-gradient(135deg, var(--spiv-azul) 0%, var(--spiv-azul-claro) 60%, #0066cc 100%);
    color: var(--spiv-branco);
    padding: 3.5rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}

.spiv-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,204,0,0.06);
    border-radius: 50%;
    pointer-events: none;
}

.spiv-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: rgba(255,204,0,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.spiv-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.spiv-hero h1 span {
    color: var(--spiv-amarelo);
}

.spiv-hero .lead {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    max-width: 500px;
}

.spiv-hero .btn-hero-primary {
    background: var(--spiv-amarelo);
    color: var(--spiv-azul);
    font-weight: 700;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255,204,0,0.35);
}

.spiv-hero .btn-hero-primary:hover {
    background: var(--spiv-amarelo-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,204,0,0.45);
}

.spiv-hero .btn-hero-secondary {
    background: transparent;
    color: var(--spiv-branco);
    border: 2px solid rgba(255,255,255,0.5);
    padding: 0.7rem 1.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spiv-hero .btn-hero-secondary:hover {
    border-color: var(--spiv-amarelo);
    color: var(--spiv-amarelo);
    background: rgba(255,204,0,0.08);
    transform: translateY(-2px);
}

/* Stats bar */
.spiv-stats-bar {
    background: var(--spiv-amarelo);
    padding: 0.85rem 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.stat-item {
    text-align: center;
    border-right: 1px solid rgba(0,48,135,0.15);
    padding: 0.25rem 1rem;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item .stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--spiv-azul);
    line-height: 1;
}

.stat-item .stat-label {
    font-size: 0.7rem;
    color: rgba(0,48,135,0.75);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ── CONTEÚDO PRINCIPAL (2 colunas) ─────────────────────── */
.spiv-main {
    flex: 1;
    padding: 2.5rem 0;
}

/* Coluna 1 — Serviços / Cards */
.spiv-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--spiv-azul);
    border-left: 4px solid var(--spiv-amarelo);
    padding-left: 12px;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spiv-card {
    background: var(--spiv-branco);
    border: 1px solid var(--spiv-cinza-brd);
    border-radius: 12px;
    box-shadow: var(--spiv-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    margin-bottom: 1rem;
    text-decoration: none;
    color: inherit;
    display: block;
}

.spiv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--spiv-shadow-hover);
    color: inherit;
}

.spiv-card .card-icon-bar {
    background: var(--spiv-azul);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.spiv-card .card-icon-bar .icon {
    background: var(--spiv-amarelo);
    color: var(--spiv-azul);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.spiv-card .card-icon-bar .card-title-top {
    font-size: 1rem;
    font-weight: 700;
    color: var(--spiv-branco);
    margin: 0;
}

.spiv-card .card-body-content {
    padding: 1rem 1.25rem;
}

.spiv-card .card-body-content p {
    font-size: 0.88rem;
    color: var(--spiv-text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.spiv-card .card-link {
    font-size: 0.82rem;
    color: var(--spiv-azul);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.spiv-card .card-link:hover {
    gap: 8px;
    color: var(--spiv-azul-claro);
}

/* Coluna 2 — Acesso Rápido + Notícias */
.spiv-access-panel {
    background: var(--spiv-branco);
    border: 1px solid var(--spiv-cinza-brd);
    border-radius: 12px;
    box-shadow: var(--spiv-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.spiv-access-panel .panel-header {
    background: var(--spiv-azul);
    padding: 0.85rem 1.25rem;
}

.spiv-access-panel .panel-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--spiv-amarelo);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--spiv-cinza-brd);
    text-decoration: none;
    color: var(--spiv-text-dark);
    transition: background 0.2s, padding-left 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.access-btn:last-child {
    border-bottom: none;
}

.access-btn:hover {
    background: #f0f4ff;
    padding-left: 1.6rem;
    color: var(--spiv-azul);
}

.access-btn .btn-icon {
    background: var(--spiv-amarelo);
    color: var(--spiv-azul);
    width: 34px;
    height: 34px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.access-btn:hover .btn-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Notícias / Avisos */
.spiv-news-panel {
    background: var(--spiv-branco);
    border: 1px solid var(--spiv-cinza-brd);
    border-radius: 12px;
    box-shadow: var(--spiv-shadow);
    overflow: hidden;
}

.news-item {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--spiv-cinza-brd);
    transition: background 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: #f8f9ff;
}

.news-item .news-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 20px;
    margin-bottom: 4px;
    display: inline-block;
}

.badge-novo {
    background: var(--spiv-amarelo);
    color: var(--spiv-azul);
}

.badge-info {
    background: #e8f0fe;
    color: var(--spiv-azul);
}

.badge-alerta {
    background: #fff3cd;
    color: #856404;
}

.news-item .news-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--spiv-text-dark);
    margin: 0 0 2px;
    line-height: 1.3;
}

.news-item .news-date {
    font-size: 0.75rem;
    color: var(--spiv-text-muted);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.spiv-footer {
    background: var(--spiv-azul);
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 0 0;
    margin-top: auto;
    border-top: 4px solid var(--spiv-amarelo);
}

.spiv-footer .footer-brand img {
    height: 50px;
    margin-bottom: 0.75rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.spiv-footer .footer-brand p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.55);
    max-width: 220px;
}

.spiv-footer h5 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--spiv-amarelo);
    margin-bottom: 1rem;
}

.spiv-footer ul {
    list-style: none;
    padding: 0;
}

.spiv-footer ul li {
    margin-bottom: 0.5rem;
}

.spiv-footer ul li a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.spiv-footer ul li a:hover {
    color: var(--spiv-amarelo);
    padding-left: 4px;
}

.spiv-footer .footer-divider {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding: 1rem 0;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}

.spiv-footer .footer-bottom-links a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.78rem;
    margin-left: 1rem;
    transition: color 0.2s;
}

.spiv-footer .footer-bottom-links a:hover {
    color: var(--spiv-amarelo);
}

/* ── Utilitários ─────────────────────────────────────────── */
.text-spiv-azul   { color: var(--spiv-azul); }
.text-spiv-amarelo { color: var(--spiv-amarelo); }
.bg-spiv-azul     { background-color: var(--spiv-azul); }
.bg-spiv-amarelo  { background-color: var(--spiv-amarelo); }

/* Animações suaves */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.45s ease both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

/* Responsividade */
@media (max-width: 768px) {
    .spiv-hero h1 { font-size: 1.6rem; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(0,48,135,0.15); }
}

/* ── Prospecção Antifraude ────────────────────────────────── */

/* Cabeçalho de página com título e ação principal */
.spiv-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.spiv-page-header h1 {
    margin-bottom: 0.15rem;
}

/* Truncamento de texto longo em tabelas */
.spiv-text-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Timeline de revisões */
.spiv-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.spiv-timeline::before {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--spiv-cinza-brd);
}

.spiv-timeline-item {
    position: relative;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.spiv-timeline-item:last-child {
    margin-bottom: 0;
}

.spiv-timeline-badge {
    position: absolute;
    left: -1.5rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #fff;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.spiv-timeline-body {
    flex: 1;
    background: var(--spiv-cinza-bg);
    border: 1px solid var(--spiv-cinza-brd);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* ── Prospecção Antifraude ────────────────────────────────── */

/* Cabeçalho de página com título e ação principal */
.spiv-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.spiv-page-header h1 {
    margin-bottom: 0.15rem;
}

/* Truncamento de texto longo em tabelas */
.spiv-text-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Timeline de revisões */
.spiv-timeline {
    position: relative;
    padding-left: 1.5rem;
}

.spiv-timeline::before {
    content: '';
    position: absolute;
    left: 0.65rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--spiv-cinza-brd);
}

.spiv-timeline-item {
    position: relative;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.spiv-timeline-item:last-child {
    margin-bottom: 0;
}

.spiv-timeline-badge {
    position: absolute;
    left: -1.5rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #fff;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.spiv-timeline-body {
    flex: 1;
    background: var(--spiv-cinza-bg);
    border: 1px solid var(--spiv-cinza-brd);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
