/* ═══════════════════════════════════════════════════════════════════════
   ESTEIRA OSINT — Nike Design System
   Athletic, kinetic, absolute design: Pure Nike Black (#111111), pure white (#ffffff),
   soft cloud stage gray (#f5f5f5), towering uppercase campaign headlines,
   pill-shaped 30px CTAs, 0px radius flat product cards, 8px grid.
   ═══════════════════════════════════════════════════════════════════════ */

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

/* ─── Nike Design Tokens ────────────────────────────────────────────── */
:root {
    --colors-primary: #111111;
    --colors-on-primary: #ffffff;
    --colors-canvas: #ffffff;
    --colors-soft-cloud: #f5f5f5;
    --colors-ink: #111111;
    --colors-charcoal: #39393b;
    --colors-ash: #4b4b4d;
    --colors-mute: #707072;
    --colors-stone: #9e9ea0;
    --colors-hairline: #cacacb;
    --colors-hairline-soft: #e5e5e5;
    --colors-sale: #d30005;
    --colors-sale-deep: #780700;
    --colors-success: #007d48;
    --colors-success-bright: #1eaa52;
    --colors-info: #1151ff;

    /* Rounded */
    --rounded-none: 0px;
    --rounded-sm: 18px;
    --rounded-md: 24px;
    --rounded-lg: 30px;
    --rounded-full: 9999px;

    /* Spacing (8px grid) */
    --spacing-xxs: 2px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 18px;
    --spacing-xl: 24px;
    --spacing-xxl: 30px;
    --spacing-section: 48px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--colors-canvas);
    color: var(--colors-ink);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nike Typography Hierarchy */
.display-campaign {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 72px;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--colors-ink);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--colors-ink);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 32px;
    line-height: 1.15;
    text-transform: uppercase;
}

h2 {
    font-size: 24px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 18px;
    line-height: 1.3;
}

a {
    color: var(--colors-ink);
    text-decoration: none;
}

/* ─── App Layout ────────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Nike Utility Top Bar ─────────────────────────────────────────── */
.utility-bar {
    height: 36px;
    background: var(--colors-soft-cloud);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    font-size: 12px;
    font-weight: 500;
    color: var(--colors-mute);
    border-bottom: 1px solid var(--colors-hairline-soft);
}

.utility-bar a {
    color: var(--colors-mute);
    transition: color var(--transition-fast);
}

.utility-bar a:hover {
    color: var(--colors-ink);
}

/* ─── Nike Primary Nav ──────────────────────────────────────────────── */
.primary-nav {
    height: 60px;
    background: var(--colors-canvas);
    border-bottom: 1px solid var(--colors-hairline-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 1px;
    color: var(--colors-ink);
}

.brand-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--colors-ink);
    color: var(--colors-on-primary);
    border-radius: var(--rounded-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-item {
    font-size: 15px;
    font-weight: 600;
    color: var(--colors-ink);
    padding: 8px 0;
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--colors-ink);
}

/* Search & Action Cluster */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.search-pill {
    background: var(--colors-soft-cloud);
    border: none;
    border-radius: var(--rounded-md);
    padding: 8px 16px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--colors-mute);
    width: 220px;
}

.search-pill input {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--colors-ink);
    width: 100%;
}

/* ─── Main Container ───────────────────────────────────────────────── */
.main-container {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* ─── Campaign Hero Hero Banner (Nike Signature) ─────────────────────── */
.campaign-hero {
    background: var(--colors-ink);
    color: var(--colors-on-primary);
    border-radius: var(--rounded-none);
    padding: var(--spacing-section) var(--spacing-xl);
    margin-bottom: var(--spacing-section);
    position: relative;
    overflow: hidden;
}

.campaign-hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 80px;
    line-height: 0.9;
    letter-spacing: 2px;
    color: var(--colors-on-primary);
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.campaign-hero p {
    font-size: 16px;
    color: var(--colors-stone);
    max-width: 600px;
    margin-bottom: var(--spacing-xl);
}

.campaign-hero .hero-actions {
    display: flex;
    gap: var(--spacing-md);
}

/* ─── Nike Buttons (Universal 30px / 9999px Pill Shape) ──────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    height: 48px;
    border-radius: var(--rounded-lg); /* 30px pill */
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1;
}

/* Nike Primary: Pure Black Pill */
.btn-primary {
    background: var(--colors-ink);
    color: var(--colors-on-primary);
    border-color: var(--colors-ink);
}

.btn-primary:hover {
    background: var(--colors-charcoal);
    border-color: var(--colors-charcoal);
}

.btn-primary:active {
    transform: scale(0.97);
    opacity: 0.8;
}

/* Nike Secondary: Soft Cloud Gray Pill */
.btn-secondary, .btn-ghost {
    background: var(--colors-soft-cloud);
    color: var(--colors-ink);
    border-color: var(--colors-soft-cloud);
}

.btn-secondary:hover, .btn-ghost:hover {
    background: #e8e8e8;
}

/* On Image White Pill */
.btn-on-image {
    background: var(--colors-canvas);
    color: var(--colors-ink);
    border-radius: var(--rounded-lg);
}

.btn-danger {
    background: var(--colors-sale);
    color: white;
}

.btn-danger:hover {
    background: var(--colors-sale-deep);
}

.btn-sm {
    height: 36px;
    padding: 8px 18px;
    font-size: 13px;
    border-radius: var(--rounded-full);
}

.btn-lg {
    height: 52px;
    padding: 16px 36px;
    font-size: 16px;
    border-radius: var(--rounded-full);
}

/* ─── Nike Filter / Category Chips (Pills) ───────────────────────────── */
.filter-chip-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: var(--rounded-full);
    font-size: 14px;
    font-weight: 600;
    background: var(--colors-canvas);
    color: var(--colors-ink);
    border: 1px solid var(--colors-hairline);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip:hover {
    border-color: var(--colors-ink);
}

.chip.active {
    background: var(--colors-ink);
    color: var(--colors-on-primary);
    border-color: var(--colors-ink);
}

/* ─── Stats Grid (Nike Soft Cloud 0px Radius Stage) ─────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-section);
}

.stat-card {
    background: var(--colors-soft-cloud);
    border-radius: var(--rounded-none); /* Nike 0px radius cards */
    padding: var(--spacing-xl);
    border: 1px solid var(--colors-hairline-soft);
    position: relative;
}

.stat-card .stat-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--colors-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
}

.stat-card .stat-value {
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 48px;
    line-height: 1;
    color: var(--colors-ink);
    letter-spacing: 1px;
}

.stat-card .stat-desc {
    font-size: 13px;
    color: var(--colors-ash);
    margin-top: var(--spacing-xs);
}

/* ─── Product / Retail Cards (Nike 0px Radius Stage) ───────────────── */
.card {
    background: var(--colors-canvas);
    border-radius: var(--rounded-none);
    border: 1px solid var(--colors-hairline-soft);
    margin-bottom: var(--spacing-section);
}

.card-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--colors-hairline-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--colors-canvas);
}

.card-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

.card-body {
    padding: var(--spacing-xl);
}

/* ─── Nike Data Table ───────────────────────────────────────────────── */
.nike-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.nike-table thead th {
    background: var(--colors-soft-cloud);
    color: var(--colors-ink);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--colors-hairline);
}

.nike-table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--colors-hairline-soft);
    color: var(--colors-ink);
    vertical-align: middle;
}

.nike-table tbody tr {
    transition: background var(--transition-fast);
}

.nike-table tbody tr:hover {
    background: var(--colors-soft-cloud);
    cursor: pointer;
}

/* ─── Badges & Status Pills ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--rounded-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-critical {
    background: #ffe6e6;
    color: var(--colors-sale);
}

.badge-high {
    background: #fff0e6;
    color: #c2410c;
}

.badge-medium {
    background: #fffbe6;
    color: #b45309;
}

.badge-low {
    background: #e6f4ea;
    color: var(--colors-success);
}

.badge-none {
    background: #e6edff;
    color: var(--colors-info);
}

.badge-status-pending { background: #fffbe6; color: #b45309; }
.badge-status-running { background: #e6edff; color: var(--colors-info); }
.badge-status-completed { background: #e6f4ea; color: var(--colors-success); }
.badge-status-error { background: #ffe6e6; color: var(--colors-sale); }

/* ─── Detail Grid (Nike Product Layout) ─────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-section);
}

.company-card-detail {
    background: var(--colors-soft-cloud);
    border-radius: var(--rounded-none);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    position: relative;
    border: 1px solid var(--colors-hairline-soft);
}

.company-card-detail h4 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.company-card-detail .company-cnpj {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--colors-mute);
    margin-bottom: 16px;
}

.company-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

.company-meta-item strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--colors-mute);
    margin-bottom: 2px;
}

.company-risks-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--colors-hairline);
    list-style: none;
}

.company-risks-list li {
    font-size: 13px;
    color: var(--colors-sale);
    font-weight: 500;
    margin-bottom: 4px;
}

/* ─── Profiles Grid ─────────────────────────────────────────────────── */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.profile-card-item {
    background: var(--colors-soft-cloud);
    border-radius: var(--rounded-none);
    padding: var(--spacing-lg);
    border: 1px solid var(--colors-hairline-soft);
}

.profile-card-item .profile-platform {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-card-item .profile-username {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--colors-mute);
    margin-bottom: 12px;
}

/* ─── Interactive Graph Container ────────────────────────────────────── */
.graph-embed {
    width: 100%;
    height: 550px;
    border-radius: var(--rounded-none);
    overflow: hidden;
    background: var(--colors-ink);
}

.graph-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── Nike Footer (Clean Canvas + 1px Hairline + Utility Row) ────────── */
.footer {
    background: var(--colors-canvas);
    color: var(--colors-mute);
    padding: var(--spacing-section) var(--spacing-xl);
    border-top: 1px solid var(--colors-hairline);
    margin-top: auto;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-section);
}

.footer-brand .brand-logo {
    margin-bottom: var(--spacing-sm);
}

.footer-brand p {
    font-size: 14px;
    color: var(--colors-mute);
    max-width: 340px;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--colors-ink);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--spacing-xs);
}

.footer-col a {
    color: var(--colors-mute);
    font-size: 13px;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--colors-ink);
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1440px;
    margin: var(--spacing-section) auto 0;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--colors-hairline-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--colors-mute);
}

/* ─── Forms ─────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--colors-ink);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 10px 16px;
    background: var(--colors-soft-cloud);
    border: 1px solid var(--colors-hairline);
    border-radius: var(--rounded-md); /* 24px pill shape search/input */
    color: var(--colors-ink);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.form-control:focus {
    background: var(--colors-canvas);
    border-color: var(--colors-ink);
    box-shadow: 0 0 0 2px var(--colors-ink);
}

.form-hint {
    font-size: 12px;
    color: var(--colors-mute);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* ─── Modal (Nike Pill Floating Box) ────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--colors-canvas);
    border-radius: var(--rounded-none);
    width: 600px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--colors-ink);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--colors-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.modal-close {
    background: none;
    border: none;
    color: var(--colors-ink);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--colors-hairline);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    background: var(--colors-soft-cloud);
}

/* ─── Loading Overlay ───────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--colors-soft-cloud);
    border-top-color: var(--colors-ink);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto var(--spacing-md);
}

.loading-spinner p {
    color: var(--colors-ink);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Toast Notifications ───────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--colors-ink);
    color: var(--colors-on-primary);
    border-radius: var(--rounded-full);
    padding: 14px 24px;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ─── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .primary-nav, .utility-bar {
        padding: 0 var(--spacing-md);
    }

    .main-container {
        padding: var(--spacing-md);
    }

    .form-row, .detail-grid, .footer-container {
        grid-template-columns: 1fr;
    }

    .campaign-hero h1 {
        font-size: 48px;
    }
}
