/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #202020;
    color: #e0e0e0;
    padding: 30px;
}

.container {
    max-width: 90%;
    height: auto;
    margin: auto;
    padding: 40px;
    border-radius: 12px;
}

h1,
h2,
h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 45px;
}

a {
    color: #4da6ff;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #80c1ff;
}

hr {
    margin: 30px 0;
    border: none;
    height: 1px;
    background: #333;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1c1c1c;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

thead {
    background-color: #2a2a2a;
    color: #f1f1f1;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #333;
}

tbody tr:hover {
    background-color: #2a2a2a;
}

/* Botões */
button,
td a,
a[href="form_produto.php"] {
    display: inline-block;
    background-color: #3399ff;
    color: #fff;
    padding: 10px 16px;
    margin-top: 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.3s;
    text-decoration: none;
}

.titulo-sair {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
}

.acoes-produto a {
    color: white;
    background-color: #3399ff;
    padding: 10px 16px;
    margin-top: 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.3s;
    text-decoration: none;


}

.acoes-produto a[href="categorias.php"]:hover {
    background-color: #2c2c2c;
}

td a {
    margin-right: 8px;
}

button:hover,
td a:hover,
a[href="form_produto.php"]:hover {
    background-color: #2c2c2c;
}

/* Formulários */
label {
    display: block;
    margin-top: 20px;
    font-weight: 600;
    color: #ccc;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 1em;
    background-color: #2c2c2c;
    color: #f0f0f0;
    transition: border 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #4da6ff;
    outline: none;
    background-color: #1e1e1e;
}

textarea {
    height: 140px;
}

.imagem-atual {
    max-width: 160px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #444;
}

/* Seção de links de compra */
.secao-links {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 2px solid #333;

}

.tabela-links {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    padding: 10px;


}

.tabela-links th {
    padding: 10px 14px;
    text-align: left;

}

.tabela-links a {
    color: #ff5c5c;
    font-weight: bold;
    background: none;
    padding: 0;
    transition: 0.3s;
    text-decoration: none;
    background-color: transparent;
}

.tabela-links a:hover {
    background-color: transparent;
    text-decoration: underline;
    color: #3399ff;
    text-decoration: none;
}

/*------------*/
.tabela-links tbody {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tabela-links tr {
    width: 100%;
}


.title-tbl,
.img-tbl {
    width: 20%;

}

.nome-tbl {
    width: 25%;

}

.title2-tbl {
    width: 72%;
}

.url-tbl {
    width: 47%;


}

.acao-tbl {
    width: 150px;

}

#box-pt-1 {
    display: flex;
    width: 110px;
    border-top-left-radius: 100px;
}

#box-pt-2 {
    width: 560px;
}



#box-pt-4 {

    padding: 0px 38px 0px 15px;


}



.url-link {
    width: 560px;
    height: 60px;
    display: flex;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;


}

.remover-link {
    padding: 0px 42px 0px 15px;
}

.txt-links {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Estilo para página de login */
body.login-page {
    background-color: #121212;
    color: #f0f0f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-form {
    background-color: #1e1e1e;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 350px;
}

.login-form h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #ffffff;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #cccccc;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #444;
    background-color: #2c2c2c;
    color: #ffffff;
}

.login-form input:focus {
    outline: none;
    border-color: #4da6ff;
    background-color: #1c1c1c;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background-color: #4da6ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.login-form button:hover {
    background-color: #3399ff;
}

.login-form .error {
    color: #ff5c5c;
    margin-bottom: 15px;
    text-align: center;
    text-decoration: none;
}

.logo-login {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
    /* caso o logo seja escuro */
    opacity: 0.9;
}

/*---------INDEX.PHP--------*/
.topo-painel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;

}

.acoes-usuario {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sair {
    background-color: #ff5c5c;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    text-decoration: none;
}

.sair:hover {
    color: white;
    background-color: #2c2c2c;
    text-decoration: none;
}

.acoes-produto {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}


/*---------CATEGORIAS FORM_PRODUTOS.PHP--------*/

.checkbox-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;

}

.checkbox-container label {
    flex-wrap: wrap;
    width: 200px;
    gap: 10px;
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
}

/* Adiciona ao final de admin/style.css */

/* --- ESTILOS PARA GRUPO DE CATEGORIAS E SUB-CATEGORIAS --- */
.category-group-container {
    background-color: #2c2c2c;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

.category-group {
    padding: 10px;
    border-bottom: 1px solid #3a3a3a;
}

.category-group:last-child {
    border-bottom: none;
}

.category-group-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.category-group-title label {
    margin-top: 0;
    /* Reseta a margem para alinhar */
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-left: 25px;
    /* Indentação para as sub-categorias */
}

.subcategory-label {
    font-weight: normal;
    color: #ccc;
}


/* =================================
   ESTILOS PARA A PÁGINA DE ANALYTICS
   ================================= */
.stat-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #333;
}

.stat-card h3 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #ccc;
    font-weight: 500;
}

.stat-card p {
    font-size: 2em;
    font-weight: bold;
    color: #4da6ff;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr;
    /* Uma coluna em mobile */
    gap: 30px;
}

.dashboard-column h2 {
    font-size: 1.5em;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

a.stat-card-link {
    text-decoration: none;
    color: inherit;
}

.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Estilos para o novo menu do admin/index.php */
.admin-main-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.nav-card {
    display: block;
    background-color: #2a2a2a;
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    color: #e0e0e0;
    border: 1px solid #333;
    transition: transform 0.2s, box-shadow 0.2s;
    border-color: #3399ff;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none;
    color: #fff;
}

.nav-card h3 {
    margin-bottom: 8px;
    color: #fff;
    font-size: 1.2rem;
}

.nav-card p {
    font-size: 0.9rem;
    color: #ccc;
}

.nav-card.analytics-card {
    border-color: #28a745;
}

.denuncias-card {
    border-color: rgb(190, 44, 44);
}

.email-card {
    border-color: rgb(219, 219, 51);
    height: 130px;
}

/* No final do ficheiro, ou junto com outros botões */
.acoes-produto a.btn-voltar {
    background-color: #e72c8a;
    height: 40px;
}

.acoes-produto a.btn-voltar:hover {
    background-color: #c42175;
    /* Um tom um pouco mais escuro para o hover */
}



/* Em telas maiores, as tabelas ficam lado a lado */
@media (min-width: 900px) {
    .dashboard-columns {
        grid-template-columns: 1fr 1fr;
    }
}


.principal-div-categorias {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.principal-div-sub-categorias {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.principal-div-analy {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.principal-div-moderacao {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Estilos para o Sino de Notificação */
.notificacao-sino {
    position: relative;
    cursor: pointer;
    margin-right: 20px;

}

/* Adicione esta nova regra no lugar */
.notificacao-sino .sino-icone {
    width: 28px;
    /* Ajuste o tamanho como preferir */
    height: 28px;
    display: block;
    /* Boa prática para imagens dentro de links/divs */
    filter: brightness(0) invert(1);
}

.notificacao-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ff5c5c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
}

.notificacao-dropdown {
    display: none;
    position: absolute;
    top: 150%;
    right: 0;
    width: 300px;
    background-color: #28a745;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.notificacao-dropdown.show {
    display: block;
}

.notificacao-header {
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid #444;
}

.notificacao-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notificacao-dropdown li a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid #444;
}

.notificacao-dropdown li a:hover {
    background-color: #3a3a3a;
}

.notificacao-dropdown li:last-child a {
    border-bottom: none;
}

.notificacao-dropdown p {
    margin: 0;
}

.notificacao-dropdown small {
    font-size: 0.8em;
    color: white;
}

.sem-notificacoes {
    padding: 20px;
    text-align: center;
    color: white;
}