/* =========================================================
   RESET GERAL
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* =========================================================
   VARIÁVEIS DE TEMA
   ========================================================= */

:root {
    --bg: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #111;
    --text: #ffffff;
    --text-muted: #aaa;
    --border: #333;
    --primary: #6c5ce7;
}

body.theme-light {
    --bg: #f5f7fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #dbe1ea;
    --primary: #6c5ce7;
}


body,
.topbar,
.side-menu,
.card,
.auth-card,
.buy-card,
.card-finalizada,
.tabs a,
input,
select,
textarea,
button,
.btn-comprar,
.site-footer,
.form-padrao input,
.form-busca-pedidos input,
#qtd,
.total-box,
.menu-icon,
.side-menu a,
.side-menu .user-info {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}



/* =========================================================
   BASE GLOBAL DO SITE
   ========================================================= */
html, body {
    height: 100%;
}

body {
    margin: 0;
    padding-top: 60px;/* espaço da topbar fixa nas páginas públicas */
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container padrão usado nas páginas com header.php */
.container {
    width: 100%;
    padding: 0 20px;
    flex: 1;
}

/* =========================================================
   TIPOGRAFIA
   ========================================================= */
h1 {
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #aaa;
    margin-bottom: 20px;
    font-size: 14px;
}

/* =========================================================
   INPUTS E BOTÕES PADRÃO
   ========================================================= */
input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #6c5ce7;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #5a4bd1;
}

/* Botão/link roxo padrão do sistema */
.btn-comprar {
    display: block;
    text-align: center;
    padding: 12px;
    margin-top: 20px;
    border-radius: 8px;
    background: #6c5ce7;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-comprar:hover {
    background: #5a4bd1;
}

/* =========================================================
   LINKS DE LOGIN / CADASTRO
   ========================================================= */
.login-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.login-link a,
.login-link a:visited,
.login-link a:hover {
    color: #6c5ce7;
    text-decoration: none;
}

.btn-login {
    display: inline-block;
    padding: 10px 18px;
    background: #6c5ce7;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.3s;
}

.btn-login:hover {
    background: #5848d6;
}

/* =========================================================
   TOPBAR E MENU LATERAL PÚBLICO
   ========================================================= */
.topbar {
    width: 100%;
    height: 60px;
    background: var(--bg-card);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 18px;
}

.menu-icon {
    font-size: 24px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.2s;
	color: var(--text);
}

.menu-icon:hover {
    background: rgba(255,255,255,0.08);
}

.theme-toggle{
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s ease;
}

.theme-toggle:hover{
    background: rgba(108, 92, 231, 0.18); /* CONTROLA o hover (108,92,231 = é roxo) (0.18 é transparencia)*/
    border-color: var(--primary); /* trocar (primary) por (border) remove borda do hover*/

/*opção moderna .theme-toggle:hover{
    background: rgba(108, 92, 231, 0.08);
    border-color: rgba(108, 92, 231, 0.4);
}*/
}



.theme-icon{
    width: 20px;
    height: 20px;
    display: block;
}

/* padrão (tema escuro) → mostrar SOL */
.theme-icon-moon{
    display: none;
}

.theme-icon-sun{
    display: block;
}

body.theme-light .theme-icon-sun{
    display: none;
}

body.theme-light .theme-icon-moon{
    display: block;
}
/* ========================= */
/* MENU LATERAL MELHORADO */
/* ========================= */
.side-menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: var(--bg-secondary);
    padding-top: 60px;
    transition: 0.3s;
    z-index: 999;
    box-shadow: 5px 0 25px rgba(0,0,0,0.25);
    border-right: 1px solid var(--border);
}

/* ÁREA DO USUÁRIO */
.side-menu .user-info {
    padding: 15px;
    font-weight: bold;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

/* LINKS */
.side-menu a {
    display: block;
    padding: 14px 18px;
    color: var(--text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: 0.2s;
}

/* HOVER PREMIUM */
.side-menu a:hover {
    background: rgba(108,92,231,0.18);
    color: #fff;
    border-left: 3px solid #6c5ce7;
}

body.theme-light .side-menu a:hover {
    color: var(--text);
    background: rgba(108,92,231,0.18);
}

/* =========================================================
   CARDS GERAIS
   ========================================================= */
.auth-card,
.card {
    background: var(--bg-secondary);
    color: var(--text);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    border: 1px solid var(--border);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 30px;
	margin-bottom: 30px; /*ajuste card tela cadastro*/
}

/*========================================================================================================================== 
CARD PADRÃO
   AJUSTE AQUI o max-width SE QUISER OS CARDS MAIS LARGOS OU MAIS COMPACTOS EM 100% FICA FLEXIVEL. ESTAVA 350px FICA FIXO
   =========================================================================================================================*/
.card {
    width: 100%;
    max-width: 350px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Card clicável nas rifas públicas */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.4);
}
 /*HOVER DO CARD NAS RIFAS PUBLICAS - TEMA CLARO*/
body.theme-light .card:hover {
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.8); /* SE QUISER MAIS CLARO DIMINUI .06 OU 0.4 SE QUISER MAIS FORTE MAX. 1.0*/
}

/* Título dentro dos cards das rifas */
.card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
}

.card h2,
.buy-title,
h1 {
    color: var(--text);
}

/* =========================================================
   PÁGINAS DE AUTENTICAÇÃO
   Usar <body class="auth-page">
   ========================================================= */
body.auth-page {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

/*
   auth-container nas páginas de autenticação
   já preparado para logo em cima + card embaixo
*/
body.auth-page .auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
}

.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body.auth-page footer {
    margin-top: 0 !important;
}

/* =========================================================
   ALERTAS / MENSAGENS
   ========================================================= */
.alert-login {
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.25);
    color: #ff6b6b;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 15px;
}

.alert-success {
    background: rgba(60, 200, 120, 0.08);
    border: 1px solid rgba(60, 200, 120, 0.25);
    color: #2ecc71;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    margin-bottom: 15px;
}

.sucesso {
    color: #2ecc71;
    text-align: center;
    margin-top: 10px;
}

.erro {
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
}

/* =========================================================
   CAMPOS DE SENHA / OLHINHO
   ========================================================= */
.password-box {
    position: relative;
    margin-bottom: 12px;
}

.password-box input {
    width: 100%;
    padding-right: 45px;
}

.container-form .password-box {
    margin-bottom: 5px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 35%;
    width: 18px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    user-select: none;
    opacity: 0.7;
}

.toggle-password:hover {
    opacity: 1;
}

/* =========================================================
   ABAS DE FILTRO DA PÁGINA DE RIFAS
   ========================================================= */
.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tabs a {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: 0.3s;
    border: 1px solid var(--border);
}

.tabs a:hover {
    background: #6c5ce7;
}

.active-tab {
    background: #6c5ce7 !important;
}

/* =========================================================
   GRADE DE RIFAS
   ========================================================= */
/* GRADE DOS CARDS DA PÁGINA RIFA
   AJUSTE AQUI:
   - minmax(260px, 1fr) = permite mais cards por linha
   
*/
.rifas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /*ANTES ERA repeat(auto-fit, minmax(350px, 350px)); TAMANHO FIXO EM MINIMO E MAXIMO DO CARD*/
    gap: 30px;
    max-width: 1400px;	 /*- max-width controla a largura total da grade*/
    margin: 10px auto 0 auto;
    justify-content: center;
}

.rifas-grid .card {
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
}

.rifas-grid .card h2 {
    min-height: 48px; /* AJUSTE AQUI se quiser mais ou menos espaço no título */
    display: flex;
    align-items: center;
    justify-content: center;
}

.rifas-grid .btn-comprar {
    margin-top: 16px;
}

.rifas-grid .card p {
    line-height: 1.45;
}

/* BARRA DE FUNDO DA % CONCLUÍDO NOS CARDS DA RIFA
   AJUSTE AQUI se quiser deixar mais visível no tema claro/escuro */
.rifas-grid .progress-bar {
    margin-top: 12px;
    margin-bottom: 14px;
    background: rgba(255,255,255,0.10); /* tema escuro */
}

/* TEMA CLARO - FUNDO DA BARRA
   AJUSTE AQUI a cor da parte "vazia" da barra */
body.theme-light .rifas-grid .progress-bar {
    background: #d1d5db;
}

/* Cor da barra das rifas */
/* AJUSTE AQUI se quiser mudar a aparência da barra */
.rifas-grid .progress {
    background: linear-gradient(90deg, #6c5ce7 0%, #8e7cff 100%);
}

/* Espaçamento da página de rifas */
.pagina-rifas {
    padding-top: 8px;
    padding-bottom: 30px;
}



/* Ajuste opcional da imagem do card da rifa */
/*
.rifas-grid .img-overlay-box img{
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
*/

/* =========================================================
   BARRAS DE PROGRESSO GERAIS
   ========================================================= */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #ddd;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 8px;
    margin-bottom: 20px;
}

.progress {
    height: 100%;
    background: #6c5ce7;
    width: 0%;
}

.progress-fill {
    height: 100%;
    background: #2ecc71;
    transition: width 0.4s ease;
}

/* =========================================================
   PÁGINA DE COMPRA / PEDIDO
   ========================================================= */
.buy-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

/*FORMULÁRIO DO ADMIN ALTURA DOS (CARDS DO PAINEL ADMIN)*/
.admin-form-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
}

/*
   AJUSTE PRINCIPAL DO CARD DE COMPRA/PEDIDO
   ALTERE ESTES VALORES QUANDO QUISER MUDAR O TAMANHO
*/

.buy-card {
    width: 100%;
    max-width: 500px;/* AJUSTE AQUI tamanho máximo do card */
    padding: 35px;/* AJUSTE AQUI espaçamento interno */
    background: var(--bg-card);
    color: var(--text);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border: 1px solid var(--border);
}

.buy-title {
    font-size: 24px;   /* AJUSTE AQUI se quiser aumentar ou diminuir */
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    margin-bottom: 18px;
}

.buy-image {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 18px;
}

.buy-price {
    font-size: 16px;
    font-weight: bold;
    color: #2ecc71;
    background: rgba(46,204,113,0.15);
    border: 0;
    padding: 10px 18px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 5px;
}

.buy-price-box {
    text-align: center;
    margin-bottom: 15px;
}

.buy-price-label {
    font-size: 13px;
    color: #aaa;
    margin-top: 5px;
}

.buy-available {
    font-size: 14px;
    color: #bdbdbd;
    margin-top: 4px;
    margin-bottom: 18px;
}

.chance-msg {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #2ecc71;
    line-height: 1.45;
}

/* =========================================================
   CONTROLE DE QUANTIDADE
   AJUSTE AQUI cor, borda, tamanho e hover dos botões (-) e (+)
   ========================================================= */
.quantity-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px; /* AJUSTE AQUI o espaço entre -, número e + */
    font-size: 26px;
    margin-top: 8px;
    margin-bottom: 22px;
}

#qtd {
    background: transparent;                    /* AJUSTE AQUI se quiser fundo */
    color: var(--text);                               /* AJUSTE AQUI a cor do número */
    padding: 10px 22px;                        /* AJUSTE AQUI o espaçamento interno */
    border-radius: 10px;                       /* AJUSTE AQUI os cantos */
    font-size: 22px;                           /* AJUSTE AQUI tamanho do número */
    min-width: 70px;                           /* AJUSTE AQUI largura mínima */
    text-align: center;
    border: 1px solid var(--border);/* AJUSTE AQUI a cor da borda */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}



.qbtn {
    width: 42px;         /* AJUSTE AQUI largura do botão */
    height: 42px;        /* AJUSTE AQUI altura do botão */
    font-size: 24px;     /* AJUSTE AQUI tamanho do símbolo */
    font-weight: bold;
    border: none;
    border-radius: 8px;  /* AJUSTE AQUI: use 50% se quiser circular */
    cursor: pointer;
    background: #6c5ce7; /* AJUSTE AQUI cor do botão */
    color: #fff;         /* AJUSTE AQUI cor do símbolo */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s; /* hover só escurece */
}

.qbtn:hover {
    background: #5a4bd1; /* AJUSTE AQUI a cor do hover */
    /* transform: scale(1.05);  FAZ CRESCER BOTAO COM HOVER */
}

/* =========================================================
   BOTÕES GRANDES DE SELEÇÃO DE QUANTIDADE
   ========================================================= */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 22px;
}

.quick-grid button {
    background: #e5e5e5; /* AJUSTE AQUI a cor dos botões rápidos*/
    color: #333;
    border: none;
    border-radius: 10px;
    padding: 18px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.quick-grid button:hover {
    /* transform: scale(1.05); (HOVER DESATIVADO DE PROPOSITO*/
	background: #cfcfcf; /* AJUSTE AQUI a cor do hover dos botoes rápidos*/
}

.quick-number {
    font-size: 20px;
    font-weight: bold;
}

.quick-text {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
    letter-spacing: 0.3px;
}

.total-box {
    background: var(--bg-secondary);/* AJUSTE AQUI se quiser mais destaque */
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text);
}

.total-box span {
    color: #2ecc71;
}

/* Botão final da compra mais forte */
.buy-card .btn-comprar {
    margin-top: 14px;
    padding: 14px;
    font-size: 15px;
}

/* BARRA DE PROGRESSO NA TELA DE COMPRA
   AJUSTE AQUI se quiser alterar o contraste */
.buy-card .progress-bar {
    background: rgba(255,255,255,0.10); /* tema escuro */
}

/* TEMA CLARO - FUNDO DA BARRA */
body.theme-light .buy-card .progress-bar {
    background: #d1d5db; /* AJUSTE AQUI se quiser mais forte ou mais claro */
}

/* Botão mais popular */
.popular {
    background: #2ecc71 !important;
    color: white !important;
    font-weight: bold;
    position: relative;
}

.popular::before {
    content: "MAIS POPULAR";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4757;
    color: white;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* =========================================================
   BLOCO DE IMAGEM COM OVERLAY
   ========================================================= */
.img-overlay-box {
    position: relative;
    width: 100%;
}

.rifa-img,
.img-overlay-box .buy-image {
    width: 100%;
    display: block;
    border-radius: 10px;
}

.img-overlay-info {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.overlay-adquira {
    background: #2ecc71;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    animation: pulseOverlay 1.2s infinite;
}

.overlay-data {
    background: rgba(0,0,0,0.65);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}

.overlay-finalizada {
    background: #494c4e;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    animation: piscando 1.5s infinite;
}

/* SELO/TIPO DE RIFA*/ /*box-shadow: 0 0 12px rgba(0,0,0,0.4), 0 0 8px rgba(255,255,255,0.2);*/
/* SELO / TIPO DE RIFA (TOPO CENTRAL) */
.overlay-selo{
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    white-space: nowrap;
    animation: pulseSeloTopo 1.2s infinite;
    box-shadow: 0 0 12px rgba(0,0,0,0.25);
}

.overlay-novidade{
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.overlay-especial{
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

@keyframes pulseSeloTopo {
    0% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.08);
    }
    100% {
        transform: translateX(-50%) scale(1);
    }
}




@keyframes pulseOverlay {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes piscando {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* =========================================================
   INFORMAÇÕES DA RIFA
   ========================================================= */
.rifa-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px;
}

.adquira {
    background: #2ecc71;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    animation: piscando 1.5s infinite;
}

.data-rifa {
    font-size: 14px;
    color: #aaa;
}

.rifa-preco-box {
    text-align: center;
    margin: 10px 0 15px 0;
}

.rifa-preco {
    font-size: 16px;
    font-weight: bold;
    color: #2ecc71;
    background: rgba(46,204,113,0.12);
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-block;
}

.rifa-info-numeros {
    font-size: 13px;
    margin-top: 6px;
    color: #ff4757;
    font-weight: bold;
}

/* =========================================================
   PÁGINA MEUS PEDIDOS / MEUS NÚMEROS
   ========================================================= */
.titulo-pagina {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-busca-pedidos {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 400px;
    margin: auto;
}

.form-busca-pedidos input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}

.botao-buscar-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.form-busca-pedidos button {
    width: 160px;
    height: 45px;
    background: #6c5ce7;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
}

.form-busca-pedidos button:hover {
    opacity: 0.9;
}

.grid-meus-pedidos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 20px auto 30px auto;
}

.grid-meus-pedidos .card {
    padding: 15px;
    max-width: 260px;
    margin: auto;
}

.pedido-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* IMAGEM DO CARD MEUS NUMEROS */
.grid-meus-pedidos .pedido-img {
    height: 120px;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
}

.numeros-box {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.numero-item {
    border: 1px solid #6c5ce7;
    background: rgba(108,92,231,0.08);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #6c5ce7;
}

.toggle-numeros {
    color: #6c5ce7;
    cursor: pointer;
    margin-top: 8px;
    font-size: 14px;
}

.toggle-numeros:hover {
    text-decoration: underline;
}

.data-pedido {
    margin-bottom: 5px;
}

/* =========================================================
   FORMULÁRIOS PADRÃO
   ========================================================= */
.container-form {
    max-width: 400px;
    margin: 30px auto 0 auto;
}

.form-padrao {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-padrao input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
}

.form-padrao button {
    height: 45px;
    background: #6c5ce7;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* =========================================================
   STATUS DOS PEDIDOS
   ========================================================= */
.status-pendente {
    border: 1px solid #f1c40f;
    color: #f1c40f;
    background: rgba(241,196,15,0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
}

.status-pago {
    border: 1px solid #2ecc71;
    color: #2ecc71;
    background: rgba(46,204,113,0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
}

.status-cancelado {
    border: 1px solid #e74c3c;
    color: #e74c3c;
    background: rgba(231,76,60,0.08);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
}

/* =========================================================
   RIFA FINALIZADA / DETALHE
   ========================================================= */
.card-finalizada {
    border: 1px solid var(--border);
    position: relative;
    background: var(--bg-secondary);
    color: var(--text);
}

.card-finalizada:hover {
    box-shadow: 0 0 25px rgba(255,255,255,0.08);
}
/*TEMA CARD FINALIZADA - TEMA CLARO*/
body.theme-light .card-finalizada:hover {
    box-shadow: 0 0 25px rgba(0,0,0,0.25);
}

.ganhador-box {
    margin-top: 12px;
    padding: 10px;
    background: rgba(46,204,113,0.08);
    border: 1px solid rgba(46,204,113,0.25);
    border-radius: 8px;
    text-align: center;
}

.ganhador-label {
    font-size: 15px;
    color: var(--text-muted);
}

.ganhador-nome {
    font-size: 15px;
    font-weight: bold;
    color: #2ecc71;
    margin-top: 3px;
}

.ganhador-label::before {
    content: "🏆 ";
}

/* ========================= */
/* LOGO TOPO */
/* ========================= */
.logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.logo-box a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    width: 250px; /* AJUSTE AQUI tamanho da logo da topbar */
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0;
}

/* ========================= */
/* LOGO ADMIN SIDEBAR */
/* ========================= */
.admin-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-logo-img {
    width: 230px; /* AJUSTE AQUI tamanho da logo do admin */
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
    object-fit: contain;
}

/* ========================= */
/* LOGO GRANDE - LOGIN / CADASTRO */
/* ========================= */
.auth-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.auth-brand a{
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo-img {
    width: 300px; /* AJUSTE AQUI tamanho da logo do login/cadastro */
    height: auto;
    display: block;
    object-fit: contain;
}

/* BOTÃO DESTACADO DO MENU (ENTRAR) */
.menu-destaque {
    margin: 15px;
    text-align: center;
    border-radius: 8px;
    background: #6c5ce7;
    color: #fff !important;
    font-weight: bold;
    transition: 0.2s;
}

.menu-destaque:hover {
    background: #5a4bd1;
}

/* ========================= */
/* BOTÃO PAINEL ADMIN NO TOPO */
/* ========================= */
.btn-admin-topo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin: 0;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: 0.2s;
}

.btn-admin-topo:hover {
    background: rgba(108, 92, 231, 0.08);
    border-color: rgba(108, 92, 231, 0.4);
}

/* =========================================================
   AJUSTES RESPONSIVOS BÁSICOS
   ========================================================= */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .topbar {
        padding: 12px 15px;
    }

    .logo {
        font-size: 16px;
    }

    .tabs {
        gap: 10px;
    }

    .tabs a {
        padding: 9px 14px;
        font-size: 14px;
    }

    .buy-card {
        max-width: 100%;
        padding: 25px 18px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rifas-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 280px));
    }

    .grid-meus-pedidos {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .btn-admin-topo {
        font-size: 12px;
        padding: 6px 10px;
    }

    .logo-img {
        width: 180px; /* diminui a logo no celular */
    }
	
	
	
	/*===========================================================*/
	
	/* OVERLAY DO MENU MOBILE
   aparece atrás do menu e bloqueia clique no conteúdo */
.menu-overlay {
    display: none;
}
	
	
	
	/* OVERLAY DO MENU MOBILE */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    display: none;
}

/* TEMA ESCURO = fundo claro suave */
.menu-overlay {
    background: rgba(255,255,255,0.10);
}

/* TEMA CLARO = fundo escuro */
body.theme-light .menu-overlay {
    background: rgba(0,0,0,0.22);
}

.menu-overlay.active {
    display: block;
}
	
	
	
	
}

@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }

    .container {
        padding: 0 12px;
    }

    .auth-card {
        padding: 24px 18px;
    }

    .card {
        padding: 16px;
    }

    .buy-card {
        padding: 20px 15px;
    }

    /* QUANTIDADE DE BOTÕES DE COMPRA NO CARD DE COMPRA NO CELULAR
       1 BOTÃO:
       .quick-grid { grid-template-columns: 1fr; }

       2 BOTÕES:
       .quick-grid { grid-template-columns: repeat(2, 1fr); }

       3 BOTÕES:
       .quick-grid { grid-template-columns: repeat(3, 1fr); }
    */

    /* BOTÕES FLEXÍVEIS, AJUSTA AUTOMÁTICO */
    .quick-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .quantity-control {
        gap: 12px;
        font-size: 22px;
    }

    #qtd {
        font-size: 18px;
        min-width: 52px;
        padding: 8px 14px;
    }

    .qbtn {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .tabs {
        flex-direction: column;
        align-items: stretch;
    }

    .tabs a {
        text-align: center;
    }

    .rifas-grid {
    grid-template-columns: 1fr;
    justify-items: center; /* CENTRALIZA OS CARDS NO MOBILE */
}

    .grid-meus-pedidos {
        grid-template-columns: 1fr;
    }

    .form-busca-pedidos button {
        width: 100%;
    }
}


/* FOOTER NÃO PODE SUBIR SOBRE CONTEÚDO */
.site-footer{
    flex-shrink: 0;
}

/* AUTH EM TELAS BAIXAS */
@media (max-height: 740px) {
    body.auth-page .auth-container {
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-container {
        min-height: auto;
    }
}




/* =========================================================
   FOOTER (RODAPÉ)
   ========================================================= */

.site-footer{
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 18px 20px;
}

.footer-inner{
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.site-footer p{
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}



/* =========================================
   AJUSTE DE CONTRASTE - TEMA CLARO
   - Melhora a cor da % concluída e 'Quandidades' disponiveis no card de compra.
   - Melhora a cor da data e hora no card Rifa Finalizada
   ========================================= */

/* (body.theme-light .rifa-info-numeros) - Este código ALTERA A COR da frase  "🚨 Rifa contém X números!" */
body.theme-light .buy-available,
body.theme-light .buy-price-label {
    color: #4b5563;
}


.data-finalizada{
    text-align: center;
    margin-top: 5px;
    color: var(--text-muted);
}

body.theme-light .data-finalizada{
    color: #374151;
}


/* BOTÃO VOLTAR AUTH (cadastro/login/esqueci)
   fica alinhado à esquerda, na mesma largura visual do card/logo */
.auth-back-btn{
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-left: max(0px, calc(50% - 600px)); /* 200 = metade do auth-card (400px) AJUSTE DA POSIÇÃO DO BOTAO VOLTAR NO DESTKTOP */
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.25s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.auth-back-btn img{
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.75;
}

/* tema escuro */
body:not(.theme-light) .auth-back-btn img{
    filter: invert(1) grayscale(100%);
}

/* tema claro */
body.theme-light .auth-back-btn img{
    filter: grayscale(100%);
}

.auth-back-btn:hover{
    background: rgba(108, 92, 231, 0.18);
    border-color: var(--primary);
}

@media (max-width: 480px){
    .auth-back-btn{
        margin-left: 0;
    }
}


/* MODAL LOGIN COMPRA */
.modal-login-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-login-box{
    background: #1a1a1a;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.45);
}

.modal-login-box p{
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-login-actions{
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.modal-login-close{
    width: 140px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    box-sizing: border-box;
}

.modal-login-close:hover{
    background: #444;
}

/* TEMA LIGHT */
.theme-light .modal-login-box,
body.theme-light .modal-login-box{
    background: #ffffff;
    box-shadow: 0 0 30px rgba(0,0,0,0.12);
}

.theme-light .modal-login-box p,
body.theme-light .modal-login-box p{
    color: #222;
}

.theme-light .modal-login-close,
body.theme-light .modal-login-close{
    background: #e9e9e9;
    color: #222;
}

.theme-light .modal-login-close:hover,
body.theme-light .modal-login-close:hover{
    background: #dcdcdc;
}


/* =====================================
	LINKS DO RODAPÉ (DISCRETOS) 
	====================================*/
.footer-links{
    margin-top:10px;
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
}

.footer-links a{
    font-size:13px;
    color: var(--text-muted);
    text-decoration:none;
    transition:0.2s;
}

.footer-links a:hover{
    color: var(--primary);
}


/* ================================
	CHECKBOX TERMOS NO CADASTRO 
=====================================*/
.auth-checkbox-terms{
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:15px 0 18px;
    font-size:14px;
    line-height:1.5;
    color:var(--text-muted);
    cursor:pointer;
}

.auth-checkbox-terms input[type="checkbox"]{
    width:auto;
    margin-top:3px;
    flex-shrink:0;
}

.auth-checkbox-terms a{
    color:var(--primary);
    text-decoration:none;
}

.auth-checkbox-terms a:hover{
    text-decoration:underline;
}


/* =========================================================
   SELECT E TEXTAREA DAS NOVAS PÁGINAS (SUPORTE / FORMULÁRIOS)
   AJUSTADO PARA RESPEITAR O TEMA ESCURO / CLARO
   ========================================================= */
.auth-card select,
.auth-card textarea,
.buy-card select,
.buy-card textarea{
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    box-sizing: border-box;
    outline: none;
}

/* SELECT COM ALTURA MAIS PRÓXIMA DOS INPUTS */
.auth-card select,
.buy-card select{
    min-height: 46px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* TEXTAREA */
.auth-card textarea,
.buy-card textarea{
    min-height: 140px;
    resize: vertical;
}

/* PLACEHOLDER DA TEXTAREA */
.auth-card textarea::placeholder,
.buy-card textarea::placeholder{
    color: var(--text-muted);
    opacity: 1;
}

/* OPÇÕES INTERNAS DO SELECT
   OBS: muitos navegadores usam o visual próprio,
   mas este ajuste ajuda no contraste */
.auth-card select option,
.buy-card select option{
    background: var(--bg-card);
    color: var(--text);
}


/* ===================== 
PIX - COPIA E COLA
========================*/
.pix-box{
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.pix-title{
    margin-bottom: 15px;
}

.pix-qrcode{
    max-width: 280px;
    width: 100%;
    border-radius: 12px;
}

.pix-label{
    margin-top: 15px;
    margin-bottom: 8px;
}

.pix-copy-wrap{
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.pix-copy-input{
    width: 100%;
    height: 46px;
    padding: 0 58px 0 12px;
    border-radius: 10px;
    border: 1px solid #d9d9d9;
    font-size: 14px;
    box-sizing: border-box;
    background: transparent;
    color: inherit;
}

.pix-copy-input:focus{
    outline: none;
    box-shadow: none;
}

.pix-copy-btn{
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    border-left: 1px solid #ccc;
    color: #fff;
    background: transparent;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

body.theme-light .pix-copy-btn{
    border-left: 1px solid #ddd;
    color: #111;
}

.pix-copy-svg{
    display: block;
    pointer-events: none;
}


/* ===============================
 TOAST - MENSAGEM PIX COPIADO
================================*/

#toastPixCopiado{
    display:none;
    position:fixed;
    left:50%;
    bottom:50%;		/* POSIÇÃO DA MENSAGEM CENTRALIZADA NA TELA */
    transform:translateX(-50%);
    padding:14px 20px; /* TAMANHO MAIOR*/
    border-radius:10px;
    font-size:15px; /* MAIOR MAIS LEGÍVEL*/
    z-index:9999;
    box-shadow:0 8px 24px rgba(0,0,0,0.25);
    white-space:nowrap;
	
	

    background:#fff;
	
    color:#111;
}

/* tema escuro */
body:not(.theme-light) #toastPixCopiado{
    background:rgba(255,255,255,0.9);
    color:#111;
}

/* tema claro */
body.theme-light #toastPixCopiado{
    background:#111;
    color:#fff;
}



/* =========================================================
   DESCRIÇÃO DA RIFA - TELA DE COMPRA
   botão abre/fecha caixa com rolagem
   ========================================================= */
.btn-descricao-rifa{
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    font-weight: bold;
    cursor: pointer;
}

.btn-descricao-rifa:hover{
    background: rgba(108, 92, 231, 0.12);
    border-color: var(--primary);
}

.descricao-rifa-box{
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    padding: 12px;
}

.descricao-rifa-conteudo{
    max-height: 120px; /* AJUSTE AQUI a altura fixa da descrição */
    overflow-y: auto;
    text-align: left;
    line-height: 1.6;
    color: var(--text);
    padding-right: 4px;
}


/* ===== PAGAMENTO CONFIRMADO ===== */
/* ================================
   PAGAMENTO CONFIRMADO (VERSÃO ELEGANTE)
================================ */
.pagamento-confirmado{
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 16px;
    border-radius: 12px;
    text-align: center;
    margin: 15px 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Título dentro do bloco */
.pagamento-confirmado strong{
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary);
}

/* texto secundário */
.pagamento-confirmado p{
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* tema claro ajuste fino */
body.theme-light .pagamento-confirmado{
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
}