/* style.css - COGNITIVESYS THEME & CONSOLE */
:root {
    /* Fundo Escuro Profundo */
    --cs-bg-dark: #070709;
    --cs-bg-card: #121215;
    --cs-bg-surface: #1a1a1f;
    
    /* Paleta Ouro Executivo / Champagne */
    --cs-gold-primary: #d4af37;
    --cs-gold-light: #f5e2a3;
    --cs-gold-dark: #aa820a;
    --cs-gold-gradient: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
    --cs-gold-glow: rgba(212, 175, 55, 0.25);
    --cs-gold-subtle: rgba(212, 175, 55, 0.08);
    --cs-gold-border: rgba(212, 175, 55, 0.22);
    
    /* Tipografia e Status */
    --cs-text-main: #fcfcfc;
    --cs-text-muted: #9e9ea7;
    --cs-status-live: #22c55e;
}

html, body {
    width: 100%;
    max-width: 100vw; /* Trava a largura máxima na viewport real */
    overflow-x: hidden; /* Corta qualquer elemento que tente vazar para a direita */
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--cs-bg-dark);
    color: var(--cs-text-main);
    overscroll-behavior-x: none; /* Impede o efeito de arrastar para o lado no Android/iOS */
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.5px;
}

/* NAVBAR */
.navbar-cs {
    background-color: rgba(7, 7, 9, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cs-gold-border);
    padding: 15px 0;
}

/* HERO SECTION */
.hero-section {
    padding: 120px 0 80px;
    position: relative;
    background: radial-gradient(circle at 50% -20%, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
}

.badge-tech {
    background-color: var(--cs-gold-subtle);
    color: var(--cs-gold-light);
    border: 1px solid var(--cs-gold-border);
    padding: 6px 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* BOTÕES EXECUTIVOS */
.btn-primary-cs {
    background: var(--cs-gold-gradient);
    color: #070709;
    border: none;
    padding: 12px 28px;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px var(--cs-gold-glow);
}
.btn-primary-cs:hover {
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
}

.btn-outline-cs {
    background: transparent;
    color: var(--cs-text-main);
    border: 1px solid var(--cs-gold-border);
    padding: 12px 28px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-outline-cs:hover {
    background: var(--cs-gold-subtle);
    border-color: var(--cs-gold-primary);
    color: #ffffff;
}

/* CARDS E ELEMENTOS */
.card-tech {
    background-color: var(--cs-bg-card);
    border: 1px solid var(--cs-gold-border);
    border-radius: 16px;
    padding: 32px;
    height: 100%;
    transition: all 0.3s ease;
}
.card-tech:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.bg-gradient-tech {
    background: linear-gradient(135deg, rgba(18, 18, 21, 1) 0%, rgba(7, 7, 9, 1) 100%);
    border-top: 1px solid var(--cs-gold-border);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cs-gold-gradient);
    color: #070709;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Space Grotesk', sans-serif;
    margin-right: 15px;
}

/* ====================================================
   CONSOLE DE ARQUITETURA DE SOLUÇÕES (WIDGET FLUTUANTE)
   ==================================================== */
.cs-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
}
.cs-launcher button {
    background: #000000;
    color: var(--cs-gold-primary);
    border: 1px solid var(--cs-gold-border);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 15px var(--cs-gold-subtle);
    cursor: pointer;
    transition: all 0.3s ease;
}
.cs-launcher button:hover {
    border-color: var(--cs-gold-primary);
    transform: scale(1.03);
    box-shadow: 0 0 20px var(--cs-gold-glow);
}
.cs-pulse-ring {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50px;
    border: 1px solid var(--cs-gold-primary);
    animation: cs-pulse 2.2s infinite ease-out;
    pointer-events: none;
}
@keyframes cs-pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.25); opacity: 0; }
}

/* JANELA DO CONSOLE */
.cs-console-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 120px);
    background: rgba(14, 14, 18, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid var(--cs-gold-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 1060;
    overflow: hidden;
}

.cs-console-header {
    background: rgba(7, 7, 9, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cs-status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--cs-status-live);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cs-status-live);
}
.btn-icon-cs {
    background: transparent;
    color: var(--cs-text-muted);
    border: none;
    padding: 4px 8px;
    cursor: pointer;
}
.btn-icon-cs:hover {
    color: var(--cs-gold-primary);
}

.cs-console-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cs-msg {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.cs-msg-system {
    align-self: center;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.03);
    color: var(--cs-text-muted);
    font-size: 0.72rem;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}
.cs-msg-ai {
    align-self: flex-start;
    background: #17171c;
    color: #e4e4e7;
    border-left: 3px solid var(--cs-gold-primary);
}
.cs-msg-user {
    align-self: flex-end;
    background: #27272a;
    color: #ffffff;
    border-right: 3px solid #71717a;
}

.cs-status-bar {
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.05);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    color: var(--cs-gold-light);
    display: flex;
    align-items: center;
}

.cs-console-footer {
    padding: 14px;
    background: rgba(7, 7, 9, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.cs-input {
    background: #121215 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-size: 0.85rem;
}
.cs-input:focus {
    border-color: var(--cs-gold-primary) !important;
    box-shadow: 0 0 10px var(--cs-gold-subtle) !important;
}
.btn-mic-cs {
    background: #1a1a1f;
    color: var(--cs-gold-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-mic-cs.listening {
    background: #ef4444 !important;
    color: #fff !important;
    animation: cs-pulse 1s infinite;
}
.btn-send-cs {
    background: var(--cs-gold-gradient);
    color: #070709;
    border: none;
    font-weight: bold;
}

/* RESPONSIVIDADE MOBILE (Correção do Eixo X) */
@media (max-width: 768px) {
    .cs-console-window {
        bottom: 0;
        right: 0;
        width: 100%; /* Corrigido de 100vw para 100% para evitar barra horizontal */
        height: 85vh;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }
    .cs-launcher {
        bottom: 16px;
        right: 16px;
    }
}