/* Fonte geral */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", Arial, sans-serif;
}

body {
    background: #f5f7fb;
    color: #333;
    padding-bottom: 40px;
}

/* HEADER */
.topbar {
    background: #ffffff;
    padding: 15px 25px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 55px;
}

.title-group h1 {
    font-size: 22px;
    font-weight: 700;
    color: #062a4f;
}

.title-group p {
    font-size: 13px;
    color: #555;
}

/* BOTÕES HEADER */
.actions {
    display: flex;
    gap: 10px;
}

.csv-btn {
    background: #0059d6;
    padding: 8px 14px;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.csv-btn:hover {
    background: #0048b1;
}

.btn {
    background: #ddd;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: #c8c8c8;
}

.btn.danger {
    background: #e74c3c;
    color: #fff;
}

.btn.danger:hover {
    background: #c0392b;
}

/* DASHBOARD / KPIs */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    padding: 20px 25px;
}

.kpi-card {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.05);
}

.kpi-card h3 {
    font-size: 16px;
    color: #444;
}

.kpi-card span {
    font-size: 26px;
    font-weight: 700;
    color: #062a4f;
}

.kpi-card p {
    font-size: 12px;
    color: #777;
}

.kpi-card.critical span {
    color: #d60000;
}

/* FILTROS */
.filters {
    padding: 10px 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

#turmaFiltro {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.filter-btns {
    display: flex;
    gap: 6px;
}

.btn.tag {
    background: #eee;
    font-size: 13px;
}

.btn.tag.active {
    background: #0059d6;
    color: white;
}

/* NOVOS ESTILOS DE FILTRO */
.filter-btns .btn.tag[data-filter="mensagem_enviada"] {
    background: #3498db;
}

.filter-btns .btn.tag[data-filter="acordo"] {
    background: #27ae60;
}
/* FIM NOVOS ESTILOS DE FILTRO */

/* LISTA DE CARDS */
.card-list {
    padding: 20px 25px;
    display: grid;
    gap: 15px;
}

/* CARD */
.card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    box-shadow: 0px 3px 10px rgba(0,0,0,0.05);
}

.card-left {
    max-width: 70%;
}

.card h3 {
    font-size: 18px;
    color: #062a4f;
    font-weight: 700;
}

.card .info {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

.card .telefone {
    font-size: 14px;
    color: #333;
    margin-top: 4px;
}

.card .vencimento {
    font-size: 13px;
    color: #666;
}

.badges {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500; /* Ajuste o peso da fonte para consistência */
}

.badge.atraso {
    background: #ffe0e0;
    color: #d60000;
}

.badge.critico {
    background: #ffb3b3;
    color: #8a0000;
}

/* NOVOS ESTILOS DE BADGE */
.badge.status {
    font-weight: bold;
    color: white;
}

.badge.mensagem_enviada {
    background: #3498db; /* Azul */
}

.badge.acordo {
    background: #27ae60; /* Verde */
}
/* FIM NOVOS ESTILOS DE BADGE */

.card-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-right button {
    padding: 6px 10px;
    font-size: 13px;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    padding: 25px;
    border-radius: 12px;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

.modal-content h2 {
    color: #062a4f;
}

.detail-tags {
    margin: 10px 0;
    display: flex;
    gap: 6px;
}

.detail-tags .tag {
    background: #eee;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.section-title {
    margin-top: 20px;
    font-size: 16px;
    font-weight: bold;
    color: #062a4f;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Telefone lista */
.telefone-list p {
    margin-bottom: 5px;
}

/* ENDEREÇO */
#detEndereco {
    line-height: 1.4rem;
}