/* ==========================================================================
   MAPA MENTAL TRIBUTÁRIO - Estilos
   ========================================================================== */

:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3e;
    --bg-card: #1a1a3e;
    --bg-sidebar: #12122a;
    --bg-input: #1a1a3e;
    --border-color: #2d2d5a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-dark: #666666;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-pink: #f093fb;
    --accent-coral: #f5576c;
    --accent-cyan: #4facfe;
    --accent-teal: #00f2fe;
    --accent-green: #43e97b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-pink: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-cyan: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-green: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Base */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
}

a:hover {
    color: var(--accent-secondary);
}

/* ==========================================================================
   HEADER PÚBLICO
   ========================================================================== */

.site-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.site-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.site-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   FILTRO DE TAGS
   ========================================================================== */

.tags-filter {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tags-filter .tag-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    margin: 0.25rem;
}

.tags-filter .tag-pill:hover,
.tags-filter .tag-pill.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* ==========================================================================
   GRID DE CARDS
   ========================================================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.mapa-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.mapa-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.mapa-card-image {
    /*height: 140px;*/
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mapa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mapa-card-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    color: white;
}

.mapa-card-body {
    padding: 1rem;
}

.mapa-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.4rem 0;
    color: var(--text-primary);
}

.mapa-card-lei {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin: 0 0 0.75rem 0;
}

.mapa-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mapa-card-tag {
    background: var(--border-color);
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* ==========================================================================
   VISUALIZAÇÃO DO MAPA
   ========================================================================== */

.mapa-header {
    background: var(--bg-secondary);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.mapa-header-info h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.mapa-header-info p {
    font-size: 0.75rem;
    color: var(--text-dark);
    margin: 0.2rem 0 0 0;
}

.mapa-layout {
    display: flex;
    height: calc(100vh - 60px);
}

/* Sidebar */
.mapa-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-search {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-search input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.sidebar-tree {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.tree-item {
    margin-bottom: 0.3rem;
}

.tree-titulo,
.tree-capitulo,
.tree-secao,
.tree-artigo {
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.15s;
}

.tree-titulo {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 500;
}

.tree-capitulo {
    background: var(--bg-input);
    color: var(--text-secondary);
    margin-left: 0.75rem;
}

.tree-secao {
    background: transparent;
    color: var(--text-muted);
    margin-left: 1.5rem;
}

.tree-secao {
    background: transparent;
    color: var(--text-muted);
    margin-left: 1.5rem;
    font-size: 0.75rem;
}

.tree-artigo {
    background: var(--border-color);
    color: var(--text-muted);
    margin-left: 1.5rem;
}

.tree-artigo:hover,
.tree-artigo.active {
    background: var(--accent-primary);
    color: white;
}

.tree-mapa-link {
    background: var(--gradient-primary);
    color: white;
    padding: 0.6rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: opacity 0.15s;
}

.tree-mapa-link:hover,
.tree-mapa-link.active {
    opacity: 0.9;
}

/* Artigo expansível */
.tree-artigo-wrapper {
    margin-left: 1.5rem;
    margin-bottom: 0.3rem;
}

.tree-artigo-toggle {
    display: inline-block;
    width: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.tree-artigo.active .tree-artigo-toggle {
    color: white;
}

.tree-artigo-resumo {
    font-weight: normal;
    font-size: 0.75rem;
    opacity: 0.8;
}

.tree-artigo-detalhe {
    margin-top: 0.5rem;
    margin-left: 1rem;
}

.artigo-detalhe-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-cyan);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 300px;
    overflow-y: auto;
}

.artigo-caput {
    margin-bottom: 0.75rem;
}

.artigo-paragrafos {
    margin-top: 0.75rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border-color);
}

.artigo-paragrafo {
    margin-bottom: 0.5rem;
}

.artigo-paragrafo strong {
    color: var(--accent-pink);
}

.artigo-incisos {
    margin-top: 0.75rem;
    padding-left: 0.5rem;
}

.artigo-inciso {
    margin-bottom: 0.25rem;
}

.artigo-inciso strong {
    color: var(--accent-cyan);
}

/* Painel de leitura */
.mapa-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

/* Visão geral do mapa */
.mapa-visao-geral {
    text-align: center;
    padding: 1rem 0;
}

.mapa-visao-geral h2 {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.mapa-descricao {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.mapa-imagem-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    display: inline-block;
    max-width: 100%;
}

.mapa-imagem {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.content-breadcrumb {
    font-size: 0.75rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.content-titulo {
    color: var(--accent-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
}

.content-resumo {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.content-resumo strong {
    color: var(--accent-green);
}

.content-caput {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    padding: 1.25rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
}

.content-caput p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

.content-paragrafo {
    margin-bottom: 1rem;
}

.content-paragrafo-numero {
    color: var(--accent-pink);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.content-paragrafo-texto {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.content-incisos {
    background: var(--bg-sidebar);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-top: 1.25rem;
}

.content-incisos-titulo {
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.content-inciso {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.content-inciso span {
    color: var(--accent-cyan);
}

/* ==========================================================================
   CHAT LEX
   ========================================================================== */

.lex-panel {
    width: 340px;
    background: #0d0d1a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.lex-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lex-avatar {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    min-width: 45px;
    min-height: 45px;
    max-width: 45px;
    max-height: 45px;
}

.lex-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.lex-info p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--text-dark);
}

.lex-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lex-message {
    display: flex;
    gap: 0.6rem;
    max-width: 90%;
}

.lex-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.lex-message-avatar {
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.lex-message.user .lex-message-avatar {
    background: var(--border-color);
}

.lex-message-content {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 12px 12px 12px 4px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.lex-message.user .lex-message-content {
    background: var(--accent-primary);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.lex-message-ref {
    color: var(--text-dark);
    font-size: 0.7rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.lex-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.lex-input-wrapper {
    display: flex;
    gap: 0.6rem;
}

.lex-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.lex-input button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

.lex-input-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-dark);
    margin-top: 0.5rem;
}

/* ==========================================================================
   ADMIN
   ========================================================================== */

.admin-body {
    background: var(--bg-primary);
}

.admin-header {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-logo {
    font-size: 1.5rem;
}

.admin-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.admin-nav {
    display: flex;
    gap: 1.5rem;
}

.admin-link {
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.admin-content {
    padding: 1.5rem;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.stat-value.primary { color: var(--accent-primary); }
.stat-value.cyan { color: var(--accent-cyan); }
.stat-value.green { color: var(--accent-green); }
.stat-value.coral { color: var(--accent-coral); }

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Admin sections */
.admin-section {
    margin-bottom: 2rem;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Admin lists */
.admin-list {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.admin-list-item {
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.admin-list-item:last-child {
    border-bottom: none;
}

.admin-list-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-list-icon {
    font-size: 1.25rem;
}

.admin-list-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.admin-list-meta {
    font-size: 0.75rem;
    color: var(--text-dark);
}

.admin-list-actions {
    display: flex;
    gap: 0.5rem;
}

/* Error section */
.admin-list.error {
    background: rgba(245, 87, 108, 0.1);
    border: 1px solid rgba(245, 87, 108, 0.3);
}

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-sidebar);
}

.admin-table td {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    border: 1px solid var(--border-color);
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.login-title p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary-gradient:hover {
    opacity: 0.9;
    color: white;
}

.btn-secondary {
    background: var(--border-color);
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.btn-danger {
    background: rgba(245, 87, 108, 0.2);
    border: none;
    color: var(--accent-coral);
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */

.form-control-dark {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.form-control-dark:focus {
    background: var(--bg-input);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.site-footer p {
    color: var(--text-dark);
    font-size: 0.75rem;
    margin: 0;
}

/* ==========================================================================
   SCROLLBARS (Map View)
   ========================================================================== */

/* Webkit (Chrome, Safari, Edge) */
.mapa-layout ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.mapa-layout ::-webkit-scrollbar-track {
    background: var(--bg-sidebar);
    border-radius: 4px;
}

.mapa-layout ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
    transition: background 0.2s;
}

.mapa-layout ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.mapa-layout ::-webkit-scrollbar-corner {
    background: var(--bg-sidebar);
}

/* Firefox */
.sidebar-tree,
.mapa-content,
.lex-messages,
.artigo-detalhe-box {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-sidebar);
}

.sidebar-tree:hover,
.mapa-content:hover,
.lex-messages:hover,
.artigo-detalhe-box:hover {
    scrollbar-color: var(--accent-primary) var(--bg-sidebar);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent-primary) !important; }
.text-danger { color: var(--accent-coral) !important; }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .mapa-layout {
        flex-direction: column;
        height: auto;
    }

    .mapa-sidebar,
    .lex-panel {
        width: 100%;
        max-height: 300px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Header structure - desktop defaults */
.mapa-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mapa-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.mapa-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Elementos mobile - escondidos no desktop */
.btn-mobile-menu,
.btn-mobile-chat,
.btn-mobile-download,
.btn-chat-close,
.sidebar-header-mobile,
.mobile-overlay {
    display: none;
}

/* ==========================================================================
   MOBILE LAYOUT (<768px)
   ========================================================================== */

@media (max-width: 767px) {
    /* Header mobile ajustes */
    .mapa-header {
        padding: 0.5rem 1rem;
        flex-wrap: nowrap;
    }

    .mapa-header h1 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .mapa-header p {
        display: none;
    }

    /* Esconde sidebar e chat por padrão */
    .mapa-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 101;
        max-height: none;
        height: 100vh;
    }

    .lex-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        max-height: none;
        display: none;
        z-index: 102;
        flex-direction: column;
    }

    /* Conteúdo ocupa tela toda */
    .mapa-layout {
        flex-direction: column;
        height: auto;
    }

    .mapa-content {
        width: 100%;
        min-height: calc(100vh - 60px);
    }

    /* Overlay */
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 100;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    /* Estado: sidebar aberto */
    body.sidebar-open .mapa-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .mobile-overlay {
        display: block;
        opacity: 1;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    /* Estado: chat aberto */
    body.chat-open .lex-panel {
        display: flex;
    }

    body.chat-open {
        overflow: hidden;
    }

    /* Botões mobile */
    .btn-mobile-menu,
    .btn-mobile-chat,
    .btn-mobile-download {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        padding: 0.5rem;
        cursor: pointer;
        transition: color 0.2s;
    }

    .btn-mobile-menu:hover,
    .btn-mobile-chat:hover,
    .btn-mobile-download:hover {
        color: var(--accent-primary);
    }

    /* Botão fechar chat */
    .btn-chat-close {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-secondary);
        font-size: 1.5rem;
        padding: 0.5rem;
        cursor: pointer;
        margin-left: auto;
    }

    .btn-chat-close:hover {
        color: var(--text-primary);
    }

    /* Header mobile estrutura */
    .mapa-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .mapa-header-left {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mapa-header-left .btn-voltar {
        display: none;
    }

    .mapa-header-info {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
        min-width: 0;
    }

    .mapa-header-actions {
        display: flex;
        align-items: center;
    }

    /* Sidebar header mobile - botão voltar */
    .sidebar-header-mobile {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-sidebar);
    }

    .sidebar-back-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--accent-primary);
        text-decoration: none;
        font-weight: 500;
    }

    .sidebar-back-link:hover {
        color: var(--accent-secondary);
    }

    /* Esconde botão download texto, mostra só ícone */
    .mapa-header .btn-secondary {
        display: none;
    }
}
