:root {
    --fundo: #1e1e1e;
    --texto: #ccc;
    --fundo-sec: #252526;
    --borda: #333;
    --verde: #25D366;
}

:root.claro {
    --fundo: #f2f2f2;
    --texto: #222;
    --fundo-sec: #fff;
    --borda: #ddd;
    --verde: #25D366;
}


/* Estilo Geral */
body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

header {
    background: var(--fundo-sec);
    padding: 15px;
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--verde);
    flex-wrap: wrap;
    gap: 10px;
}

/* Conteúdo Central */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

h1,
h2 {
    margin: 0;
    color: #34495e;
}

button {
    cursor: pointer;
}

/* === MENU NAV SUPERIOR === */
nav a {
    color: var(--texto);
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    padding-bottom: 5px;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}

nav a:hover,
nav a.ativo {
    color: var(--verde);
    border-color: var(--verde);
}

/* === DASHBOARD (gráficos e colunas) === */
.main-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 20px;
}

.news,
.alerts {
    width: 22%;
    min-width: 250px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

/* Cards de Estatísticas */
.cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--fundo-sec);
    border: 1px solid var(--borda);
    border-left: 5px solid var(--verde);
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 250px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--borda);
}

.card h3 {
    color: var(--verde);
    margin-bottom: 15px;
}

.card .valor {
    font-size: 28px;
    font-weight: bold;
}

/* Avisos e Novidades */
.flex-infos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.info-box {
    flex: 1;
    min-width: 300px;
    background: var(--fundo-sec);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--borda);
}

.info-box h3 {
    color: var(--verde);
    margin-top: 0;
}

/* Botão Tema */
#btn-tema {
    background: var(--verde);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#btn-tema:hover {
    background: #128C7E;
}

/* === TABELAS === */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fundo-sec);
    color: var(--texto);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

thead {
    background-color: var(--borda);
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--borda);
}

tbody tr:nth-child(even) {
    background-color: #2d2d2d;
}

body.claro table {
    background: white;
    color: #222;
}

body.claro thead {
    background: #ecf0f1;
}

body.claro tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/* === STATUS TAGS === */
.status {
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
}

.ativo {
    background-color: #2ecc71;
    color: white;
}

.inativo {
    background-color: #e74c3c;
    color: white;
}

.status-pago {
    color: green;
    font-weight: bold;
}

.status-pendente {
    color: red;
    font-weight: bold;
}

.connected {
    color: green;
    font-weight: bold;
}

.disconnected {
    color: red;
    font-weight: bold;
}

/* === BOTÕES === */
.btn-add,
.btn-novo,
.btn-save,
.btn-detalhes,
.btn-acao,
.btn-ver,
.actions button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s;
    color: white;
}

.btn-add,
.btn-detalhes,
.btn-acao,
.actions button {
    background-color: #3498db;
}

.btn-add:hover,
.btn-detalhes:hover,
.btn-acao:hover,
.actions button:hover {
    background-color: #2980b9;
}

.btn-novo {
    background-color: #27ae60;
}

.btn-novo:hover {
    background-color: #219150;
}

.btn-save {
    background-color: #2ecc71;
}

.btn-save:hover {
    background-color: #27ae60;
}

.btn-add {
    background-color: #27ae60;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add:hover {
    background-color: #219150;
}

.btn-ver {
    background-color: #3498db;
}

.btn-bloquear {
    background-color: #e67e22;
}

.btn-excluir {
    background-color: #e74c3c;
}

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

.btn-bloquear:hover {
    background-color: #ca6f1e;
}

.btn-excluir:hover {
    background-color: #c0392b;
}

/* === DETALHES DO NÚMERO === */
.info {
    margin-bottom: 20px;
}

.info label {
    font-weight: bold;
    color: #333;
}

.info p {
    margin: 4px 0 12px 0;
    font-size: 16px;
    color: #555;
}

.info input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

/* === SEÇÃO DE STATUS CONEXÃO === */
.status-section {
    margin-top: 50px;
    background: var(--borda);
    padding: 20px;
    border-radius: 10px;
}

body.claro .status-section {
    background: #ecf0f1;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--texto);
}

.label {
    font-weight: bold;
    color: var(--texto);
}


footer {
    bottom: 0;
    position: fixed;
    width: 100%;
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 0.8rem;
}

/* MODAL ADICIONAR NUMERO PAGINA NUMEROS */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #2c3e50;
}

.modal label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.modal input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 10px;
}

.modal .btn-save {
    background-color: #2ecc71;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
}

.modal .btn-save:hover {
    background-color: #27ae60;
}

.modal .btn-cancelar {
    background-color: #e74c3c;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
}

.modal .btn-cancelar:hover {
    background-color: #c0392b;
}

.modal,
.info-content {
    background: var(--fundo-sec);
    color: var(--texto);
    border-radius: 10px;
    border: 1px solid var(--borda);
}

body.claro .modal,
body.claro .info-content {
    background: white;
    color: #222;
    border: 1px solid #ccc;
}

.modal select {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-size: 15px;
    background: var(--fundo-sec);
    color: var(--texto);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg fill="%23ccc" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

.modal select:focus {
    outline: none;
    border-color: var(--verde);
    box-shadow: 0 0 5px var(--verde);
}

body.claro .modal select {
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
}

.modal option {
    background: var(--fundo-sec);
    color: var(--texto);
}

body.claro .modal option {
    background: #fff;
    color: #222;
}




/*   ADMIN */

.admin-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.top-bar h2 {
    margin: 0;
    font-size: 24px;
}


.acoes button {
    margin-right: 5px;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.info-content {
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.info-content img {
    width: 250px;
    margin-top: 10px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

#infoContentArea {
    margin-top: 20px;
    font-size: 16px;
}

/* === CAMPOS COPIAR === */
.campo-copiar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.campo-copiar input[readonly] {
    background: var(--borda);
    color: var(--texto);
    border: 1px solid var(--borda);
    padding: 8px;
    border-radius: 6px;
    flex: 1;
}

body.claro .campo-copiar input[readonly] {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
}

.icone-copiar {
    cursor: pointer;
    color: #3498db;
    font-size: 18px;
    transition: color 0.3s;
}

.icone-copiar:hover {
    color: #2980b9;
}

/* === FORMULÁRIOS === */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-size: 15px;
    background: var(--fundo-sec);
    color: var(--texto);
}

body.claro input[type="text"],
body.claro input[type="email"],
body.claro input[type="password"],
body.claro textarea {
    background: white;
    color: #222;
    border: 1px solid #ccc;
}

/* PAGINA ENVIAR MENSAGENS */

.file-drop {
    background: var(--fundo-sec);
    border: 2px dashed var(--borda);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border-radius: 10px;
    margin-top: 10px;
    transition: background 0.3s;
    color: var(--texto);
}

.file-drop.dragover {
    background-color: #3498db33;
    border-color: var(--verde);
}

.mensagens {
    margin-top: 30px;
}

.mensagens select {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid var(--borda);
    border-radius: 6px;
    font-size: 15px;
    background: var(--fundo-sec);
    color: var(--texto);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg fill="%23ccc" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

.mensagens select:focus {
    outline: none;
    border-color: var(--verde);
    box-shadow: 0 0 5px var(--verde);
}

body.claro .mensagens select {
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
}

.mensagens option {
    background: var(--fundo-sec);
    color: var(--texto);
}

body.claro .mensagens option {
    background: #fff;
    color: #222;
}

.mensagens select {
    margin-bottom: 20px;
}

/* === RESPONSIVO === */
@media (max-width: 1000px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }

    .charts {
        flex-direction: column;
        align-items: center;
    }

    .news,
    .alerts {
        width: 90%;
        margin-bottom: 20px;
    }

    .card {
        max-width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {

    .cards,
    .flex-infos {
        flex-direction: column;
    }

    header {
        flex-direction: column;
    }

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

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
    }

    td {
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #eee;
    }

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

    .actions {
        flex-direction: column;
    }

    .status-item {
        flex-direction: column;
        align-items: flex-start;
    }
}