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

:root {
    /* NOVA PALETA AMPARA */
    --branco: #FFFFFF;
    --rosa: #FF6DAE;
    --verde-escuro: #144F3A;
    --preto: #111111;
    
    /* Cores de apoio */
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-600: #737373;
    --gray-800: #404040;
    --danger: #E74C6F;
    --success: #144F3A;
    --warning: #F39C12;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--branco);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ========== CONTAINERS ========== */
.auth-container,
.app-container {
    max-width: 500px;
    width: 100%;
    background: var(--branco);
    border-radius: 48px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
    overflow: hidden;
    padding: 32px 24px;
}

/* ========== TÍTULOS ========== */
h1, h2, h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    color: var(--verde-escuro);
}

.logo {
    text-align: center;
    margin-bottom: 24px;
}

.logo span {
    font-size: 48px;
}

.logo h1 {
    font-size: 32px;
    background: linear-gradient(135deg, var(--verde-escuro), var(--rosa));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo p {
    font-size: 14px;
    color: var(--gray-600);
}

/* ========== FORMULÁRIOS ========== */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--preto);
    font-size: 14px;
}

.form-control,
.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 60px;
    border: 1px solid var(--gray-200);
    background: var(--branco);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.input-group textarea {
    border-radius: 24px;
    resize: vertical;
}

.form-control:focus,
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--rosa);
    box-shadow: 0 0 0 3px rgba(255, 109, 174, 0.1);
}

.btn-primary {
    width: 100%;
    background: var(--rosa);
    border: none;
    padding: 14px;
    border-radius: 60px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--verde-escuro);
    transform: scale(0.98);
}

.link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.link a {
    color: var(--rosa);
    text-decoration: none;
    font-weight: 600;
}

.link a:hover {
    color: var(--verde-escuro);
}

/* ========== APP HEADER ========== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 32px; }
.logo h1 { font-size: 24px; background: linear-gradient(135deg, var(--verde-escuro), var(--rosa)); background-clip: text; -webkit-background-clip: text; color: transparent; }
.user-area { display: flex; align-items: center; gap: 12px; }
.user-name { font-size: 14px; font-weight: 500; color: var(--verde-escuro); }
.logout-btn { background: var(--gray-100); padding: 6px 14px; border-radius: 40px; text-decoration: none; color: var(--verde-escuro); font-size: 12px; font-weight: 600; transition: 0.2s; border: 1px solid var(--gray-200); }
.logout-btn:hover { background: var(--rosa); color: white; border-color: var(--rosa); }
.status-bar { display: flex; justify-content: space-between; padding: 8px 0; font-size: 12px; color: var(--gray-600); border-bottom: 1px solid var(--gray-200); margin-bottom: 12px; }

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    background: var(--branco);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin: 16px 0;
}
.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
    flex: 1;
    transition: 0.2s;
}
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; color: var(--gray-600); }
.nav-item.active { background: rgba(255, 109, 174, 0.08); }
.nav-item.active .nav-label { color: var(--rosa); font-weight: 600; }

/* ========== PÁGINAS ========== */
.page { display: none; }
.page.active { display: block; }

/* ========== CHAT IA ========== */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.ai-status { display: flex; align-items: center; gap: 12px; }
.ai-avatar { position: relative; width: 48px; height: 48px; background: var(--rosa); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.online-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; background: var(--success); border-radius: 50%; border: 2px solid var(--branco); }
.ai-info h3 { font-size: 16px; }
.ai-info p { font-size: 11px; color: var(--verde-escuro); }
.clear-chat-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 6px; color: var(--gray-600); }
.clear-chat-btn:hover { color: var(--danger); }

.chat-messages {
    height: 50vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 4px;
}
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}
.message.usuario {
    align-self: flex-end;
}
.message.ia {
    max-width: 100% !important;
    width: 100%;
}
.message-bubble {
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
}
.message.usuario .message-bubble {
    background: var(--rosa);
    color: white;
    border-bottom-right-radius: 4px;
}
.message.ia .message-bubble {
    background: var(--branco);
    border: 1px solid var(--gray-200);
    border-bottom-left-radius: 4px;
    width: 100%;
}
.message-time {
    font-size: 10px;
    color: var(--gray-600);
    margin-top: 4px;
    margin-left: 12px;
}

/* Menu IA */
.message-text .welcome-message { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--rosa); }
.message-text .menu-divider { height: 2px; background: linear-gradient(90deg, var(--gray-200), var(--rosa), var(--gray-200)); margin: 12px 0; border-radius: 10px; }
.message-text .menu-title { font-size: 14px; margin-bottom: 12px; color: var(--preto); }
.message-text .menu-options { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.message-text .menu-options li {
    background: var(--branco);
    border-radius: 60px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
}
.message-text .menu-options li:hover { background: rgba(255, 109, 174, 0.05); border-color: var(--rosa); transform: scale(0.98); }
.message-text .menu-number {
    background: var(--rosa);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
}
.message-text .emergency-option .menu-number { background: var(--danger); }

.chat-input-container {
    display: flex;
    gap: 8px;
    background: var(--branco);
    padding: 8px 12px;
    border-radius: 60px;
    border: 1px solid var(--gray-200);
    margin-top: 8px;
}
.chat-input { flex: 1; border: none; background: transparent; padding: 12px 0; outline: none; font-size: 14px; }
.send-btn, .search-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--rosa);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.1s;
}
.send-btn:hover, .search-btn:hover {
    background: var(--verde-escuro);
}
.search-btn { background: var(--gray-600); font-size: 16px; }

/* Botões de navegação do chat */
.chat-nav-buttons {
    display: flex;
    gap: 12px;
    margin: 12px 0 8px 0;
    justify-content: center;
}
.nav-btn {
    background: var(--rosa);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.nav-btn:hover {
    background: var(--verde-escuro);
}

/* ========== CENTRAL ========== */
.page-header { text-align: center; margin-bottom: 32px; }
.page-header h2 { font-size: 24px; margin-bottom: 8px; color: var(--verde-escuro); }
.page-header p { font-size: 14px; color: var(--gray-600); }
.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-item {
    background: var(--branco);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: 0.2s;
}
.info-item:hover { background: rgba(255, 109, 174, 0.03); transform: translateX(4px); border-color: var(--rosa); }
.info-icon { font-size: 32px; }
.info-content h3 { font-size: 15px; margin-bottom: 4px; color: var(--verde-escuro); }
.info-content p { font-size: 12px; color: var(--gray-600); }
.arrow { font-size: 18px; color: var(--rosa); }

/* ========== FAMÍLIA ========== */
.family-cards { display: flex; flex-direction: column; gap: 20px; }
.family-card {
    background: var(--branco);
    padding: 28px 20px 20px 20px;
    border-radius: 20px;
    position: relative;
    transition: transform 0.2s;
    border: 1px solid var(--gray-200);
}
.family-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: var(--rosa);
}
.card-number {
    position: absolute;
    top: -14px;
    left: 20px;
    background: var(--rosa);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
}
.family-card h3 { font-size: 18px; margin-bottom: 12px; color: var(--verde-escuro); }
.family-card p { font-size: 14px; line-height: 1.4; color: var(--preto); }
.family-card ul { margin-left: 20px; margin-top: 6px; font-size: 13px; color: var(--preto); }

/* ========== DENÚNCIA ========== */
.report-form { background: var(--branco); padding: 20px; border-radius: 24px; margin-bottom: 20px; border: 1px solid var(--gray-200); }
.submit-btn {
    width: 100%;
    background: var(--rosa);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 60px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}
.submit-btn:hover {
    background: var(--verde-escuro);
}
.help-tips {
    background: var(--branco);
    padding: 16px;
    border-radius: 24px;
    margin: 20px 0;
    border: 1px solid var(--gray-200);
}
.emergency-note { margin-top: 16px; padding: 12px; background: rgba(255, 109, 174, 0.05); border-radius: 16px; text-align: center; display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; border: 1px solid var(--gray-200); }

/* ========== APOIO ========== */
.support-list { display: flex; flex-direction: column; gap: 12px; }
.support-card {
    background: var(--branco);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--gray-200);
    transition: 0.2s;
}
.support-card:hover {
    border-color: var(--rosa);
    transform: translateX(4px);
}
.support-icon { font-size: 32px; }
.support-details { flex: 1; }
.support-details h3 { font-size: 16px; margin-bottom: 4px; color: var(--verde-escuro); }
.support-number { font-weight: 700; color: var(--rosa); font-size: 14px; }
.call-btn {
    background: var(--rosa);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.call-btn:hover {
    background: var(--verde-escuro);
}

/* ========== COMUNIDADE (CHAT SOCIAL) ========== */
.social-chat-container {
    background: var(--branco);
    border-radius: 24px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--gray-200);
}

.social-messages {
    height: 30vh;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px;
    background: var(--branco);
    border-radius: 20px;
    border: 1px solid var(--gray-200);
}

.social-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--branco);
    padding: 8px 12px;
    border-radius: 60px;
    border: 1px solid var(--gray-200);
}

.social-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
}

.social-send-btn {
    background: var(--rosa);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}
.social-send-btn:hover {
    background: var(--verde-escuro);
}

.social-note {
    font-size: 11px;
    color: var(--gray-600);
    text-align: center;
    background: var(--gray-100);
    padding: 8px;
    border-radius: 20px;
    border: 1px solid var(--gray-200);
}

.social-loading {
    text-align: center;
    color: var(--gray-600);
    padding: 20px;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--branco);
    max-width: 340px;
    width: 90%;
    border-radius: 48px;
    padding: 24px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { color: var(--verde-escuro); }
.close-modal { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--gray-600); }
.close-modal:hover { color: var(--danger); }

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    body { padding: 0; }
    .auth-container, .app-container { border-radius: 0; min-height: 100vh; box-shadow: none; }
    .chat-messages { height: 55vh; }
    .social-messages { height: 55vh; }
}

/* ========== TYPOGRAPHY UPDATES ========== */
h1, h2, h3, .logo h1 {
    font-family: 'Jost', sans-serif;
}

body, button, input, textarea, .message-text {
    font-family: 'Inter', sans-serif;
}

/* Nova mensagem de boas-vindas */
.welcome-message {
    font-family: 'Jost', sans-serif;
}