/* --- REFORMA TOTAL VISUAL: DESIGN MODERNO E CLEAN --- */

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

/* 1. Cores e Tipografia Moderna */
:root {
    --primary: #0F172A; /* Azul marinho muito escuro para fundo */
    --accent: #1D9E75; /* Verde esmeralda para ações */
    --accent-hover: #15805d; 
    --accent-light: #ECFDF5;
    --warn: #BA7517; --warn-light: #FAEEDA;
    --danger: #dc3545; --danger-light: #FCEBEB;
    --bg-main: #F1F5F9; /* Cinza muito claro para o corpo */
    --card-bg: #FFFFFF;
    --border: rgba(0,0,0,0.06); /* Bordas quase invisíveis */
    --text-main: #1E293B; /* Preto azulado para texto */
    --text-muted: #64748B; /* Cinza para textos secundários */
    --radius-md: 10px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    
    /* Fontes do Google (Certifique-se de tê-las no HTML) */
    --font-head: 'Space Grotesk', sans-serif; 
    --font-body: 'Inter', sans-serif;
}

body { 
    font-family: var(--font-body); 
    background: var(--bg-main); 
    color: var(--text-main); 
    font-size: 15px; 
    line-height: 1.5; 
}

/* 2. Header (Corrigindo a Logo e Alinhamento) */
header { 
    background: var(--primary); 
    padding: 0 5%; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    height: 70px; 
    position: sticky; 
    top: 0; 
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo { 
    font-family: var(--font-head); 
    color: #fff; 
    font-size: 24px; 
    font-weight: 700; 
    letter-spacing: -1px; 
}
.logo span { color: #5DCAA5; } /* Detalhe na logo */

.btn-header {
    background: #fff;
    color: var(--primary);
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}
.btn-header:hover { background: #e2e8f0; }

/* 3. Hero Section (Design Limpo e Centralizado) */
.hero { 
    background: var(--primary); 
    padding: 6rem 5% 7rem; 
    text-align: center; 
    color: white; 
    position: relative;
}
.hero h1 { 
    font-family: var(--font-head); 
    font-size: 46px; 
    font-weight: 700; 
    margin-bottom: 12px; 
    letter-spacing: -1.5px; 
    line-height: 1.1;
}
.hero h1 em { color: #5DCAA5; font-style: normal; }
.hero p { 
    color: #CBD5E1; 
    font-size: 17px; 
    margin-bottom: 2rem; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto;
}

/* 4. Barra de Busca Moderna (Corrigindo o Desalinhamento) */
.search-bar { 
    display: flex; 
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    max-width: 580px; 
    margin: 0 auto; 
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.15);
}
.search-bar input { 
    flex: 1; 
    padding: 14px 20px; 
    border-radius: 8px; 
    border: none; 
    font-size: 15px; 
    background: transparent;
    color: white; 
}
.search-bar input::placeholder { color: #94A3B8; }
.search-bar button { 
    padding: 14px 28px; 
    border-radius: 8px; 
    background: var(--accent); 
    border: none; 
    color: white; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.3s;
}
.search-bar button:hover { background: var(--accent-hover); }

/* 5. Tabs (Navegação Alinhada) */
.tabs-nav { 
    display: flex; 
    gap: 10px;
    background: var(--card-bg); 
    padding: 12px 5%; 
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 70px; /* Logo abaixo do header */
    z-index: 99;
}
.tab-btn { 
    padding: 12px 24px; 
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    border: none; 
    background: none; 
    color: var(--text-muted); 
    border-radius: var(--radius-md);
    transition: 0.3s;
}
.tab-btn:hover { background: #F8FAFC; color: var(--text-main); }
.tab-btn.active { 
    color: var(--accent); 
    background: var(--accent-light);
}

/* 6. Conteúdo Principal e Cards de Estatísticas */
.main { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 3rem 5%; 
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Estatísticas Gerais */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card h4 { color: var(--text-muted); font-size: 13px; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: var(--accent); font-family: var(--font-head); }

/* Review Card (Os cards de avaliação) */
.review-grid { display: grid; gap: 15px; margin-top: 15px;}
.review-card { 
    background: var(--card-bg); 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border); 
    padding: 1.5rem; 
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}
.review-card:hover { border-color: #CBD5E1; }

/* 7. Novas Classes de Chat e Sistema de Tickets */
.chat-container { background: #f9f9fb; padding: 12px; border-radius: 10px; margin: 15px 0; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.chat-msg { padding: 8px 14px; border-radius: 12px; max-width: 85%; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.chat-msg.usuario { background: white; align-self: flex-start; border-bottom-left-radius: 2px; border: 1px solid var(--border); color: #334155;}
.chat-msg.admin { background: var(--accent); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }

.reply-box { display: flex; gap: 8px; margin-top: 15px; }
.reply-box input { flex: 1; padding: 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-main); }
.reply-box button { background: var(--accent); color: white; border: none; padding: 0 18px; border-radius: 20px; font-weight: 600; }

.status-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; }
.status-badge.aberto { background: var(--accent-light); color: var(--accent); }
.status-badge.fechado { background: #eee; color: #777; }

/* 8. Botão Flutuante (FAB) e Toasts (Sucesso/Erro) */
.fab { 
    position: fixed; 
    bottom: 2rem; 
    right: 2rem; 
    background: var(--accent); 
    color: white; 
    border: none; 
    border-radius: 50px; 
    padding: 15px 25px; 
    font-weight: 600; 
    cursor: pointer; 
    box-shadow: 0 8px 25px rgba(29, 158, 117, 0.3);
    transition: 0.3s;
    display: flex; gap: 8px; align-items: center;
}
.fab:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(29, 158, 117, 0.4); }

.toast { position: fixed; top: 80px; right: 2rem; background: #1E293B; color: white; padding: 12px 20px; border-radius: 10px; opacity: 0; transition: 0.3s; pointer-events: none; z-index: 1000;}
.toast.show { opacity: 1; transform: translateY(10px); }

/* 9. Botões de Ação e Badges */
.btn-sm { padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; }

.btn-fechar { background: var(--danger); color: white; font-weight: 600; padding: 5px 12px; font-size: 11px; margin-left: 8px; }

.badge { padding: 4px 11px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase;}
.badge-complaint { background: var(--danger-light); color: var(--danger); }
.badge-praise { background: var(--accent-light); color: var(--accent); }

/* 10. Modais Modernos */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(10,10,20,0.6); backdrop-filter: blur(2px); z-index: 200; align-items: center; justify-content: center; }
.modal-bg.open { display: flex; animation: fadeInModal 0.3s; }

@keyframes fadeInModal { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.modal { background: var(--card-bg); border-radius: var(--radius-lg); padding: 2.5rem; width: 95%; max-width: 550px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); border: none;}
.btn-close { position: absolute; top: 1.5rem; right: 1.5rem; cursor:pointer; background:none; border:none; font-size: 20px; color: var(--text-muted); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border-radius: var(--radius-md); border: 2px solid #E2E8F0; background: #F8FAFC; outline: none; transition: 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-light); }

.submit-btn { width: 100%; padding: 14px; border-radius: var(--radius-md); background: var(--accent); color: white; border: none; font-weight: 700; cursor: pointer; transition: 0.3s; margin-top: 10px; font-size: 16px;}
.submit-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* Utilitários */
.user-name { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 6px; display: block; }
.rc-title { font-weight: 700; font-size: 16px; margin: 8px 0; color: var(--primary); font-family: var(--font-head); }
.rc-text { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

@media (max-width: 768px) { .hero h1 { font-size: 32px; } .search-bar { flex-direction: column; } .hero p { font-size: 15px; } .tabs-nav { padding: 10px 3%; } .modal { padding: 1.5rem; } }