/* --- ESTILOS DA PÁGINA INSTITUCIONAL / LOGIN --- */

/* Remove o layout flex do body para a página de login */
body:has(.landing-container) {
    display: block;
    height: auto;
}

.landing-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    min-height: 90vh;
    padding: 40px 0;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.hero-logo {
    max-width: 250px;
    margin-bottom: 25px;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 20px 0 30px;
}

.btn.hero-cta {
    width: auto;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.hero-form {
    flex: 1;
    max-width: 450px;
}

/* Ajusta o formulário de autenticação para o novo layout */
.hero-form .auth-form {
    margin-top: 0;
    width: 100%;
}

.features-section {
    padding: 60px 0;
    text-align: center;
}

.features-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.landing-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Ajustes para ecrãs menores (responsividade) */
@media (max-width: 992px) {
    .hero-section {
        flex-direction: column;
        min-height: auto;
        text-align: center;
    }
    .hero-content {
        order: 2; /* Coloca o texto depois do formulário */
    }
    .hero-form {
        order: 1; /* Coloca o formulário primeiro */
        width: 100%;
    }
}

/* public/style.css */

/* --- VARIÁVEIS GLOBAIS E RESET --- */
:root { 
    --bg-main: #f8f9fa; 
    --bg-secondary: #FFFFFF; 
    --bg-inputs: #FFFFFF; 
    --text-main: #212529; 
    --text-muted: #6c757d; 
    --accent-primary: #2d527c; 
    --border-color: #dee2e6; 
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    display: flex; 
    height: 100vh; 
    overflow-x: hidden; 
}

/* --- ESTRUTURA PRINCIPAL (LAYOUT) --- */
.sidebar { 
    width: 250px; 
    background-color: var(--bg-secondary); 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    border-right: 1px solid var(--border-color); 
    flex-shrink: 0; 
    transition: transform 0.3s ease-in-out; 
}

.main-content { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
}

.header { 
    height: 70px; 
    padding: 0 30px; 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    background-color: var(--bg-secondary); 
    border-bottom: 1px solid var(--border-color); 
}

.content-area { 
    padding: 30px; 
    flex-grow: 1; 
    overflow-y: auto; 
}

/* --- COMPONENTES DA SIDEBAR --- */
.sidebar-logo {
    padding-bottom: 20px;
}
.sidebar-logo img {
    max-width: 100%;
    height: auto;
}

.sidebar ul { 
    list-style: none; 
    padding-top: 20px; 
}

.sidebar ul li { 
    margin-bottom: 8px;
}

.sidebar ul li a { 
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted); 
    text-decoration: none; 
    font-size: 1rem;
    font-weight: 500; 
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out; 
}

.sidebar ul li a:hover { 
    background-color: var(--bg-main);
    color: var(--accent-primary);
}

.sidebar ul li a i {
    font-size: 1.2rem;
}

.sidebar ul li.admin-link a {
    background-color: #e9ecef;
    font-weight: bold;
    color: var(--accent-primary);
}
.sidebar ul li.admin-link a:hover {
    background-color: #dde2e6;
}

.sidebar form { 
    margin-top: auto; 
}

/* --- AUTENTICAÇÃO --- */
.auth-container { 
    width: 100%; 
    min-height: 100vh;
    height: auto;
    display: flex; 
    justify-content: center; 
    align-items: flex-start;
    background-color: var(--bg-main); 
    padding: 60px 20px;
    overflow-y: auto;
}

.auth-form { 
    background-color: var(--bg-secondary); 
    padding: 40px; 
    border-radius: 8px; 
    width: 100%; 
    max-width: 450px; 
    margin: 0;
    border: 1px solid var(--border-color); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
}

.auth-logo {
    text-align: center;
    margin-bottom: 25px;
}
.auth-logo img {
    max-width: 200px;
    height: auto;
}

.auth-link { 
    text-align: center; 
    margin-top: 20px; 
}

.auth-link a { 
    color: var(--accent-primary); 
    text-decoration: none; 
    font-weight: 500; 
}

/* --- ELEMENTOS DE UI GERAIS --- */
.card { 
    background-color: var(--bg-secondary); 
    padding: 20px; 
    margin-top: 30px; 
    border-radius: 8px; 
    border: 1px solid var(--border-color); 
}

.form-group { 
    margin-bottom: 20px; 
}

.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: var(--text-muted); 
    font-weight: 500; 
}

.form-control { 
    width: 100%; 
    padding: 12px; 
    background-color: var(--bg-inputs); 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    color: var(--text-main); 
    font-size: 1rem; 
}

.form-control:focus { 
    outline: none; 
    border-color: var(--accent-primary); 
    box-shadow: 0 0 0 2px rgba(45, 82, 124, 0.2); 
}

.alert { 
    padding: 15px; 
    margin-bottom: 20px; 
    border: 1px solid transparent; 
    border-radius: 4px; 
}

.alert-success { 
    color: #0f5132; 
    background-color: #d1e7dd; 
    border-color: #badbcc; 
}

.alert-danger { 
    color: #842029; 
    background-color: #f8d7da; 
    border-color: #f5c2c7; 
}

.form-section-title {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 20px;
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.auth-form h3:first-of-type {
    margin-top: 0;
}

.form-row {
    display: flex;
    gap: 15px;
}

/* --- BOTÕES (BASE E MODIFICADORES) --- */
.btn { 
    width: auto; 
    padding: 12px 20px; 
    border: none; 
    border-radius: 6px; 
    background-color: var(--accent-primary); 
    color: #FFFFFF; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background-color 0.2s; 
}

.btn:hover { 
    background-color: #244363; 
}

.quick-msg-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
    color: #fff;
}

.quick-msg-btn i {
    margin-right: 12px;
    font-size: 1.1em;
    width: 20px;
    text-align: center;
}

.quick-msg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    filter: brightness(90%);
}

/* --- CORES DOS BOTÕES --- */
.btn-dark { background-color: #343a40; }
.btn-green { background-color: #28a745; }
.btn-red { background-color: #dc3545; }
.btn-yellow { background-color: #ffc107; color: #212529; }
.btn-blue { background-color: #0d6efd; }
.btn-gray { background-color: #6c757d; }
.btn-dark-blue { background-color: #1e3a8a; }
.btn-dark-red { background-color: #991b1b; }
.btn-dark-green { background-color: #166534; }
.btn-dark-gray { background-color: #4b5563; }
.btn-light-red { background-color: #bb2d3b; }

.btn-outline-red { background-color: #f8f9fa; border-color: #dc3545; color: #dc3545; }
.btn-outline-red:hover { background-color: #dc3545; color: #fff; }

.btn-outline-green { background-color: #f8f9fa; border-color: #28a745; color: #28a745; }
.btn-outline-green:hover { background-color: #28a745; color: #fff; }

.btn-outline-dark { background-color: #f8f9fa; border-color: #212529; color: #212529; }
.btn-outline-dark:hover { background-color: #212529; color: #fff; }


/* --- COMPONENTES ESPECÍFICOS --- */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 20px; 
    margin-top: 15px; 
}

.stats-grid > div { 
    background-color: var(--bg-main); 
    padding: 15px; 
    border-radius: 5px; 
    text-align: center; 
}

.stats-grid h4 { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    margin-bottom: 10px; 
}

.stats-grid p { 
    font-size: 1.8rem; 
    font-weight: 700; 
    color: var(--accent-primary); 
}

.table-responsive { 
    width: 100%; 
    overflow-x: auto; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
}

th, td { 
    padding: 12px 15px; 
    text-align: left; 
    border-bottom: 1px solid var(--border-color); 
}

th { 
    background-color: var(--bg-main); 
}

tbody tr:hover { 
    background-color: var(--bg-main); 
}

.commands-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px; 
}
.command-group h3 { 
    color: var(--text-muted); 
    margin-bottom: 10px; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 5px; 
    font-size: 1rem; 
    text-transform: uppercase; 
}
.button-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 8px; 
}

.command-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease-in-out;
}

.tab-link.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.user-menu {
    position: relative;
    margin-left: 20px;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.user-menu-trigger:hover {
    background-color: var(--bg-main);
}

.user-menu-trigger i {
    font-size: 1.2rem;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 200px;
    overflow: hidden;
    z-index: 100;
}

.user-menu-dropdown.active {
    display: block;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    background: none;
    border: none;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
    background-color: var(--bg-main);
}

.history-cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
}

.history-card {
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-primary);
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-card-header, .history-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.history-card .recipient {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-card .date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-card-body p {
    margin: 0;
    font-size: 0.95rem;
    word-break: break-word;
}

.history-card-body strong {
    color: var(--text-main);
}

.history-card-body .message-content {
    color: var(--text-muted);
}

.history-card .status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.status-badge.status-delivered { background-color: #198754; }
.status-badge.status-undeliverable, 
.status-badge.status-rejected, 
.status-badge.status-expired,
.status-badge.status-failed_api { background-color: #dc3545; }
.status-badge.status-pending,
.status-badge.status-submitted { background-color: #ffc107; color: #000; }

.history-card .cost {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.balance-progress-container {
    width: 150px;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.balance-progress-bar {
    height: 100%;
    background-color: var(--accent-primary);
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.toast-alert {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    color: #fff;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: top 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.toast-alert.show {
    top: 20px;
    opacity: 1;
}

.toast-alert.success {
    background-color: #198754;
}

.toast-alert.danger {
    background-color: #dc3545;
}

.toast-alert #toast-alert-icon i {
    font-size: 1.5rem;
}

.command-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.command-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.command-panel {
    position: fixed;
    top: 0;
    right: 0; /* Mantém o painel ancorado à direita */
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: var(--bg-secondary);
    box-shadow: -5px 0 15px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%); /* Esconde o painel movendo-o 100% da sua própria largura para a direita */
    transition: transform 0.4s ease-in-out; /* Anima a propriedade transform */
}

.command-panel.active {
    transform: translateX(0); /* Traz o painel de volta à sua posição original */
}

.command-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.command-panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.command-panel-close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.command-panel-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.icon-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.icon-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.icon-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: var(--bg-secondary);
    box-shadow: -5px 0 15px rgba(0,0,0,0.15);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
}

.icon-panel.active {
    transform: translateX(0);
}

.icon-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.icon-panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.icon-panel-close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.icon-panel-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 15px;
    padding-top: 20px;
}
.icon-grid i {
    font-size: 2rem;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.icon-grid i:hover {
    background-color: var(--bg-main);
    color: var(--accent-primary);
}

.wire-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wire-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-main);
    transition: box-shadow 0.3s ease;
}

.wire-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.wire-card a {
    display: block;
    width: 100%;
    height: 200px;
    background-color: #e9ecef;
}

.wire-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wire-card-info {
    padding: 15px;
}

.wire-card-info h5 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.wire-card-info small {
    color: var(--text-muted);
}


/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    body { 
        display: block; 
        height: auto;
    }
    .sidebar { 
        position: fixed; 
        left: 0; 
        top: 0; 
        height: 100%; 
        z-index: 1000; 
        transform: translateX(-100%); 
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); 
    }
    .sidebar.active { 
        transform: translateX(0); 
    }
    .main-content { 
        width: 100%; 
    }
    .content-area { 
        padding: 20px; 
    }
    .header { 
        justify-content: space-between; 
    }
    .menu-toggle { 
        display: block; 
        font-size: 24px; 
        cursor: pointer; 
        background: none; 
        border: none; 
        color: var(--text-main); 
        z-index: 1001; 
    }
    .overlay { 
        display: none; 
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        background-color: rgba(0, 0, 0, 0.5); 
        z-index: 999; 
    }
    .overlay.active { 
        display: block; 
    }

    .history-card-header, .history-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-form {
        padding: 25px;
    }

    /* --- ESTILOS RESPONSIVOS PARA AS TABELAS DO ADMIN --- */
    .admin-table thead {
        display: none; /* Esconde o cabeçalho da tabela em ecrãs pequenos */
    }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td {
        display: block;
        width: 100%;
    }
    .admin-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }
    .admin-table td {
        display: flex;
        justify-content: space-between; /* Alinha o rótulo e o valor */
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    .admin-table td:last-child {
        border-bottom: none;
    }
    .admin-table td::before {
        content: attr(data-label); /* Usa o data-label como rótulo */
        font-weight: bold;
        margin-right: 10px;
        color: var(--text-main);
    }
}


/* --- ESTILOS DO CHATBOT --- */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

#chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    color: white;
    font-size: 2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#chatbot-toggle-btn:hover {
    transform: scale(1.1);
}

#chatbot-window {
    width: 350px;
    height: 500px;
    background-color: var(--bg-secondary);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#chatbot-window.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

#chatbot-header {
    background-color: var(--accent-primary);
    color: white;
    padding: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#chatbot-header i {
    font-size: 1.5rem;
}

#chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-message, .user-message {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 80%;
    line-height: 1.4;
}

.bot-message {
    background-color: #e9ecef;
    color: var(--text-main);
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}
.bot-message a {
    color: var(--accent-primary);
    font-weight: 600;
}

.user-message {
    background-color: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

#chatbot-input-container {
    display: flex;
    border-top: 1px solid var(--border-color);
    padding: 10px;
}

#chatbot-input {
    flex-grow: 1;
    border: none;
    padding: 10px;
    background-color: transparent;
}
#chatbot-input:focus {
    outline: none;
}

#chatbot-send-btn {
    border: none;
    background-color: transparent;
    color: var(--accent-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 10px;
}

/* --- ESTILOS RESPONSIVOS PARA A PÁGINA DE CHAT --- */

.chat-header-mobile {
    display: none; /* Escondido por defeito em ecrãs grandes */
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    gap: 15px;
    background-color: var(--bg-secondary);
    flex-shrink: 0;
}

#back-to-list-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 0 10px 0 0;
}

/* Media Query para ecrãs de telemóvel */
@media (max-width: 768px) {
    .conversation-list {
        width: 100%;
        height: 100%;
    }

    .chat-window {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: translateX(100%); /* Começa fora do ecrã */
        transition: transform 0.3s ease-in-out;
        z-index: 10;
        background-color: var(--bg-secondary);
    }
    
    /* Classe que ativa a visualização da janela de chat */
    .chat-window.mobile-active {
        transform: translateX(0); /* Traz a janela para o ecrã */
    }

    .chat-header-mobile {
        display: flex; /* Mostra o cabeçalho no telemóvel */
    }

    /* Esconde o menu principal do site quando uma conversa está ativa no telemóvel */
    body.chat-active-mobile .sidebar,
    body.chat-active-mobile .header {
        display: none;
    }
}