:root {
    --primary-purple: #1a0e2e; /* Mantendo para navbar/elementos escuros gerais */
    --header-purple: #271c3d; /* Cor exata do fundo do logo_v2 */
    --primary-bg: #f4ecf7; /* Roxo bem clarinho */
    --accent-yellow: #ffc107;
    --text-dark: #333333;
    --text-white: #ffffff;
    --card-shadow: 0 10px 40px rgba(0,0,0,0.1);
    --border-radius: 20px;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* Importante para não ter scroll na página */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-dark);
}

.main-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Navbar Reformulada */
.navbar {
    background-color: var(--header-purple);
    padding: 0 2rem; /* Removido padding vertical para o logo ocupar tudo */
    height: 70px; /* Altura maior para o header */
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Container de Chat (Scroll Fix) */
.chat-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* O container não rola, o filho sim */
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(0,0,0,0.2) transparent;
}

/* Custom Scrollbar */
.chat-history::-webkit-scrollbar {
    width: 6px;
}
.chat-history::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Input Area */
.chat-input-container {
    padding: 20px 0;
    background: transparent;
    flex-shrink: 0;
}

.chat-input-wrapper {
    background: white;
    padding: 8px 12px;
    border-radius: 28px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: flex-end; /* Alinha o botão de anexo e enviar ao fundo quando o texto crescer */
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    box-shadow: 0 8px 30px rgba(30, 11, 54, 0.15);
    transform: translateY(-2px);
    border-color: rgba(30, 11, 54, 0.2);
}

.chat-input {
    border: none;
    flex: 1;
    padding: 10px 15px;
    font-size: 1rem;
    outline: none;
    background: transparent;
    resize: none; /* Bloqueia o redimensionamento manual */
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
    scrollbar-width: none; /* Firefox */
}

.chat-input::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.btn-send {
    background: var(--primary-purple);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-send:hover {
    transform: scale(1.05);
    background: #2a1b3d;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    background: var(--primary-purple);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message.agent {
    background: white;
    color: var(--text-dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #eee;
}

/* Initial Screen */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    opacity: 0.8;
}

.empty-state img {
    max-width: 300px;
    margin-bottom: 30px;
}

.empty-state h2 {
    color: var(--primary-purple);
    font-weight: 700;
}

/* Login Page Refatorada */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: var(--primary-bg);
    padding: 20px;
}

.login-card-modern {
    background-color: white;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(30, 15, 60, 0.1); /* Sombra roxa suave */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.login-header {
    background-color: var(--header-purple); /* Fundo roxo escuro igual ao da imagem */
    padding: 3rem 2rem; /* Espaço para o logo */
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo {
    max-width: 250px;
    height: auto;
    display: block;
}

.login-body {
    padding: 3rem 2.5rem;
    text-align: center;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.login-welcome-text {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.login-btn-google {
    background: white;
    color: #444;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid #e0e0e0; /* Borda sutil para destacar no fundo branco */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    width: 100%;
}

.login-btn-google:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
    border-color: #d0d0d0;
}
