@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #070a13;
    --panel-bg: rgba(13, 20, 38, 0.6);
    --panel-border: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-color: hsl(208, 100%, 50%); /* Magalu Tech Blue */
    --accent-glow: rgba(0, 134, 255, 0.35);
    
    /* Cores de Destaque Cybermatic */
    --electric-violet: hsl(263, 90%, 51%);
    --electric-violet-hover: hsl(263, 90%, 58%);
    --cyber-cyan: hsl(187, 100%, 42%);
    --cyber-cyan-hover: hsl(187, 100%, 50%);
    --positive-color: hsl(142, 71%, 45%); /* Neon Emerald */
    --negative-color: hsl(346, 84%, 61%); /* Sunset Coral */
    --warning-color: hsl(43, 96%, 56%); /* Gold Warning */
    
    --glass-blur: blur(12px);
    --font-heading: 'Space Grotesk', 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--electric-violet);
}

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

html { font-size: 85%; }

html, body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    height: auto;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    position: relative;
}

h1, h2, h3, h4, h5, h6, .logo h1, .section-header h2 {
    font-family: var(--font-heading);
}

.font-mono, 
.kpi-value,
.font-monospace,
.monospace-data {
    font-family: var(--font-mono) !important;
}

/* Background Glows Container */
.background-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Background Animated Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(0,0,0,0) 70%);
}

.shape-2 {
    bottom: -10%;
    right: -5%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(245,158,11,0.05) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.1); }
}

/* Common Classes */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    height: auto;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    color: var(--accent-color);
    font-size: 28px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .divider {
    color: var(--text-secondary);
    font-weight: 300;
}

.logo .subtitle {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 1rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.refresh-indicator span.material-symbols-outlined {
    font-size: 18px;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hamburger-menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.04);
}

.hamburger-menu-btn:hover {
    background: var(--electric-violet);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* Sidebar Drawer Nav */
.sidebar-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(7, 10, 19, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.sidebar-drawer.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

.menu-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.menu-item-link span {
    font-size: 20px;
}

.menu-item-link:hover, .menu-item-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
}

.menu-item-link.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(139, 92, 246, 0.2);
    color: var(--cyber-cyan);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Dashboard Metrics Grid (KPIs) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.metric-card {
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
}

.metric-card.card-violet::before { background: var(--electric-violet); }
.metric-card.card-cyan::before { background: var(--cyber-cyan); }
.metric-card.card-emerald::before { background: var(--positive-color); }
.metric-card.card-amber::before { background: var(--warning-color); }

.metric-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.metric-footer {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Main layouts and Sections */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 1024px) {
    .main-grid.columns-2 {
        grid-template-columns: 1.2fr 1fr;
    }
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.panel-title span {
    color: var(--accent-color);
}

/* Interactive Elements (Forms, Buttons) */
.ia-marketing-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--electric-violet));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.ia-marketing-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.ia-marketing-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.ia-marketing-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.input-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ia-marketing-input, .ia-marketing-textarea, .ia-marketing-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.ia-marketing-input:focus, .ia-marketing-textarea:focus, .ia-marketing-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 134, 255, 0.15);
    background: rgba(0, 0, 0, 0.5);
}

/* Badges */
.ia-marketing-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue { background: rgba(59, 130, 246, 0.12); color: var(--accent-color); border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-emerald { background: rgba(16, 185, 129, 0.12); color: var(--positive-color); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-coral { background: rgba(239, 68, 68, 0.12); color: var(--negative-color); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-amber { background: rgba(245, 158, 11, 0.12); color: var(--warning-color); border: 1px solid rgba(245, 158, 11, 0.2); }

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
}

.footer-signature {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

/* Header Bar Universal */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(13, 20, 38, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-btn, .hamburger-menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.hamburger-btn:hover, .hamburger-menu-btn:hover {
    background: var(--electric-violet);
    border-color: var(--electric-violet-hover);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
