table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #3498db;
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* ✅ Ajuste crucial: força a coluna de Ações a ter largura mínima */
.actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
}

.btn {
    padding: 6px 12px;
    margin-right: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    min-width: 70px;
    text-align: center;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}








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

body {
    font-family: Arial, sans-serif;
    background: #f4f4f9;
    color: #333;
}

.container {
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

input, button, a {
    display: block;
    width: 100%;
    padding: 5px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

button {
    background: #27ae60;
    color: white;
    cursor: pointer;
    border: none;
}

button:hover {
    background: #229954;
}

a {
    text-align: center;
    text-decoration: none;
    color: #3498db;
}

.erro {
    padding: 10px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin: 10px 0;
}

.sucesso {
    padding: 10px;
    background: #d4edda;
    color: #155724;
    border-radius: 5px;
    margin: 10px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #00000;
}

header {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: center;
}

header a {
    color: #f39c12;
    display: inline;
    margin-left: 15px;
}
.dark-mode {
    background-color: #1a1a2e;
    color: #e6e6e6;
}

.dark-mode .container {
    background-color: #16213e;
    color: #e6e6e6;
}

.dark-mode input,
.dark-mode button {
    background-color: #0f3460;
    color: #e6e6e6;
    border-color: #533483;
}

.dark-mode a {
    color: #ff9d00;
}
    
.logo {
    display: block;
    margin: 0 auto 30px;       /* Centraliza horizontalmente + espaçamento inferior */
    max-width: 200px;
    height: auto;
    text-align: center;       /* Garante centralização de texto/filhos (se houver) */
    width: 100%;              /* Ocupa toda largura disponível (dentro do container) */
                              /* Mas limita ao tamanho máximo desejado */
}

/* Footer e Copyright */
.footer {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.copyright a {
    color: #3498db;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* ============= ESTILOS RESPONSIVOS PARA /master/index.php ============= */

.master-container {
    padding: 15px;
    max-width: 1200px;
    margin: 30px auto;
}

/* Estilo da tabela */
.master-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.master-table th,
.master-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
}

.master-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.master-table tr:nth-child(even) {
    background-color: #fafafa;
}

.master-table tr:hover {
    background-color: #f1f1f1;
}

/* Estilo dos botões de ação */
.master-table a {
    display: inline-block;
    margin: 4px 0;
    padding: 6px 12px;
    background: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
}

.master-table a:hover {
    background: #229954;
}

/* Botão de cadastro */
.btn-cadastrar {
    display: inline-block;
    margin: 10px 0 20px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-cadastrar:hover {
    background: #2980b9;
}

/* RESPONSIVO — ABAIXO DE 768PX */
@media (max-width: 768px) {

    .master-container {
        margin: 10px;
        padding: 10px;
    }

    .master-table,
    .master-table thead,
    .master-table tbody,
    .master-table th,
    .master-table td,
    .master-table tr {
        display: block;
    }

    /* Esconde o cabeçalho da tabela */
    .master-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    /* Cada linha vira um "cartão" */
    .master-table tr {
        border: 1px solid #ccc;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    /* Cada célula mostra o rótulo + conteúdo */
    .master-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        padding-top: 12px;
        padding-bottom: 12px;
        text-align: right;
        font-size: 15px;
    }

    .master-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #2c3e50;
        text-align: left;
        font-size: 14px;
    }

    /* Ajusta os botões de ação */
    .master-table a {
        display: block;
        margin: 6px 0;
        padding: 8px;
        font-size: 13px;
        text-align: center;
    }
}

/* RESPONSIVO — ABAIXO DE 480PX */
@media (max-width: 480px) {
    .master-table td {
        font-size: 14px;
        padding: 10px !important;
    }

    .master-table td:before {
        font-size: 13px;
        left: 5px;
        width: 40%;
    }

    .master-table a {
        padding: 7px;
        font-size: 12px;
    }

    .btn-cadastrar {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    /* ============= RESPONSIVIDADE PARA TABLET/MOBILE ============= */
@media (max-width: 768px) {

    /* Container mais apertado */
    .container {
        padding: 15px;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Tabela vira blocos verticais */
    table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
        font-size: 16px;
    }

    /* Esconde o cabeçalho da tabela */
    thead {
        display: none;
    }

    /* Cada linha vira um cartão */
    tr {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        border: 1px solid #e0e0e0;
    }

    /* Cada célula mostra o rótulo + conteúdo */
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        font-size: 15px;
        color: #333;
    }

    td:last-child {
        border-bottom: none;
    }

    /* Rótulos à esquerda */
    td span {
        font-weight: bold;
        color: #2c3e50;
        min-width: 80px;
    }

    /* Botão de ação */
    td a {
        padding: 6px 12px;
        background: #3498db;
        color: white;
        text-decoration: none;
        border-radius: 5px;
        font-size: 13px;
        transition: background 0.3s;
    }

    td a:hover {
        background: #2980b9;
    }

    /* Status com ícone e texto */
    td div.status {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    td div.status i {
        font-size: 14px;
    }
}

/* Estilo do campo de busca */
.search-box {
    margin: 20px 0;
    text-align: center;
}

#searchInput {
    width: 90%;
    max-width: 500px;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

#searchInput:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    #searchInput {
        padding: 10px 15px;
        font-size: 15px;
    }
    
    /* Estilo da notificação de pagamento pendente */
.notification-bell {
    position: relative;
    display: inline-block;
    margin-left: 20px;
    cursor: pointer;
    animation: ring 2s infinite;
}

@keyframes ring {
    0% { transform: rotate(0); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(5deg); }
    40% { transform: rotate(-5deg); }
    50% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

.notification-bell .badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #e74c3c;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.notification-bell .tooltip {
    visibility: hidden;
    width: 200px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.notification-bell:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Modo escuro */
body.dark-mode .notification-bell .tooltip {
    background: #2a2a2a;
    color: #e0e0e0;
}
/* Estilo para o gráfico de evolução */
#evolucaoChart {
    max-height: 300px;
}

.chart-container + .chart-container {
    margin-top: 20px;
}
/* Exportar para Excel*/
.btn-export {
    background: #27ae60;
    color: white;
}

.btn-export:hover {
    background: #229954;
}

/* Estilo da mensagem de logout */
.mensagem-logout {
    text-align: center;
    margin: 30px auto 20px;
    padding: 15px 25px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    max-width: 500px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modo escuro */
body.dark-mode .mensagem-logout {
    background: #2d3748;
    color: #9ae6b4;
    border-color: #4ade80;
}

/* Estilo do botão exportar PDF */
.exportar-pdf {
    display: block;
    margin: 20px auto 15px;
    padding: 12px 30px;
    background: #27ae60; /* Verde */
    color: white !important;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    text-align: center;
    box-sizing: border-box;
}

.exportar-pdf:hover {
    background: #2196f3;
    transform: translateY(-2px);
}

/* Modo escuro */
body.dark-mode .exportar-pdf {
    background: #2ecc71;
}

/* Estilo dos totais abaixo dos gráficos */
.totais-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.total-item {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
}

.total-pago {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.total-pendente {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modo escuro */
body.dark-mode .totais-container {
    background: #2d3748;
}

body.dark-mode .total-pago {
    background: #2f3b2a;
    color: #9ae6b4;
    border-color: #4ade80;
}

body.dark-mode .total-pendente {
    background: #3b2a2f;
    color: #fca5a5;
    border-color: #f87171;
}


.info-grafico {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    margin: 10px 0;
    font-size: 14px;
}
