/* Import da fonte */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Variáveis de Cor para fácil customização */
:root {
  --cor-fundo: #121212;
  --cor-fundo-secundario: #1e1e1e;
  --cor-card: #2a2a2a;
  --cor-borda: #444;
  --cor-primaria: #007bff; /* Azul vibrante */
  --cor-primaria-hover: #0056b3;
  --cor-texto-principal: #e0e0e0;
  --cor-texto-secundario: #a0a0a0;
  --sombra-card: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Reset Básico e Estilos Globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--cor-fundo);
  color: var(--cor-texto-principal);
  line-height: 1.6;
  user-select: none;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2, h3 {
  font-weight: 600;
  color: #fff;
}

/* ================================== */
/*          HEADER ATUALIZADO         */
/* ================================== */
header {
  /* 1. Imagem de fundo */
  background-image: url('fiveyou.png');
  background-size: cover;
  background-position: center;
  
  /* 2. Posição relativa para o overlay */
  position: relative;
  
  /* 3. Estilos visuais */
  padding: 80px 20px; /* Aumenta o espaço para a imagem aparecer */
  text-align: center;
  align-items: center;
  justify-content: center;
  color: #fff; /* Garante que o texto seja branco */
  border-bottom: 2px solid var(--cor-primaria); /* Usa a cor primária para um destaque */
  /* width: 50%; */
  height: 250px;
}

/* 4. Camada escura (overlay) para garantir a legibilidade do texto */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6); /* Preto com 60% de opacidade */
  z-index: 1; /* Fica acima da imagem de fundo */
 
}

/* 5. Garante que o conteúdo do header (h1, p, img) fique na frente do overlay */
header > * {
  position: relative;
  z-index: 2;

}

header h1 { font-size: 2.5rem; }
header p { color: var(--cor-texto-principal); } /* Cor mais clara para melhor contraste */
header .logo { display: none;width: 40% !important; } /* Esconde a logo que já está no fundo */


footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: var(--cor-texto-secundario);
  border-top: 1px solid var(--cor-borda);
}

/* Seções */
section {
  background-color: var(--cor-fundo-secundario);
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: var(--sombra-card);
}

section h2 {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--cor-primaria);
  padding-bottom: 10px;
  display: inline-block;
}

/*
  ... O RESTO DO SEU CÓDIGO CSS PERMANECE EXATAMENTE O MESMO ...
  (copie e cole todo o resto do seu CSS original a partir daqui)
*/

/* Formulários (Inputs, Selects, Buttons) */
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 12px;
  background-color: var(--cor-card);
  border: 1px solid var(--cor-borda);
  border-radius: 5px;
  color: var(--cor-texto-principal);
  font-family: 'Poppins', sans-serif;
  margin-bottom: 15px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

button {
  width: 100%;
  padding: 15px;
  background-color: var(--cor-primaria);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--cor-primaria-hover);
}

/* Layout dos Itens (Grid de Cards) */
#itens-loja h2 { margin-left: 25px; }

.categoria-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.item {
  background-color: var(--cor-card);
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: var(--sombra-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item:hover {
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
  cursor: zoom-in;
}

.item-nome {
  font-weight: 600;
  margin-bottom: 5px;
}

/* Checkbox Personalizado */
.item-selecao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.item-selecao input[type="checkbox"] {
  display: none;
}

.item-selecao label {
  cursor: pointer;
}

.item-selecao label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--cor-borda);
  border-radius: 4px;
  margin-right: 10px;
  transition: background-color 0.2s;
  vertical-align: middle;
}

.item-selecao input[type="checkbox"]:checked + label::before {
  background-color: var(--cor-primaria);
  border-color: var(--cor-primaria);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
}

/* Loading Spinner */
#loading { display: flex; justify-content: center; padding: 50px; }
.spinner {
  border: 5px solid var(--cor-borda);
  border-top: 5px solid var(--cor-primaria);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
.hidden { display: none !important; }

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estilos do Modal de Imagem */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000; padding: 20px;
}
.modal-content { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; }
.close-button {
  position: absolute; top: 20px; right: 35px;
  color: #fff; font-size: 40px; font-weight: bold;
  cursor: pointer; transition: color 0.3s;
}
.close-button:hover { color: var(--cor-texto-secundario); }

/* Estilos da loja principal */
.subcategoria-titulo {
  font-size: 1.3rem;
  color: var(--cor-texto-principal);
  margin-top: 30px;
  margin-bottom: 15px;
  border-top: 1px solid var(--cor-borda);
  border-bottom: 1px solid var(--cor-borda);
  padding: 5px 0;
  margin-left: 25px;
}

/* Estilo para o Contador Flutuante */
#contador-flutuante {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

#contador-flutuante.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Estilo para o contador da subcategoria */
.subcategoria-header {
    display: flex;
    align-items: center;
    gap: 10px; /* Espaço entre o título e o contador */
    margin-bottom: 10px; /* Espaço antes da grade de itens */
}

.subcategoria-header .subcategoria-titulo {
    margin: 0; /* Remove margens padrão do h3 */
}

.subcategoria-contador {
    font-size: 0.8rem;
    font-weight: 400;
    color: #a0a0a0;
    margin-left: 10px;
    background-color: #2a2a2a;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Adicionar ao styles.css */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--cor-primaria);
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  z-index: 9999;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* Sistema de Notificações */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.notification {
  background: var(--cor-card);
  border-left: 4px solid var(--cor-primaria);
  border-radius: 8px;
  margin-bottom: 10px;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  padding: 15px;
  gap: 10px;
}

.notification-message {
  flex: 1;
  color: var(--cor-texto-principal);
  font-size: 0.9rem;
}

.notification-close {
  background: none;
  border: none;
  color: var(--cor-texto-secundario);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  width: auto;
  height: auto;
  min-width: 20px;
}

.notification-close:hover {
  color: var(--cor-texto-principal);
}

/* Tipos de notificação */
.notification-success { border-left-color: #10b981; }
.notification-error { border-left-color: #ef4444; }
.notification-warning { border-left-color: #f59e0b; }
.notification-info { border-left-color: var(--cor-primaria); }
.notification-loading { border-left-color: #6366f1; }

.notification-loading .notification-icon {
  animation: spin 1s linear infinite;
}

/* Loading state para botões */
.button-loading {
  position: relative;
  color: transparent !important;
}

.button-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

/* Adicionar ao final do styles.css */

/* Sistema de Notificações */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.notification {
  background: var(--cor-card);
  border-left: 4px solid var(--cor-primaria);
  border-radius: 8px;
  margin-bottom: 10px;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  padding: 15px;
  gap: 10px;
}

.notification-message {
  flex: 1;
  color: var(--cor-texto-principal);
  font-size: 0.9rem;
}

.notification-close {
  background: none;
  border: none;
  color: var(--cor-texto-secundario);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  width: auto;
  height: auto;
  min-width: 20px;
}

.notification-close:hover {
  color: var(--cor-texto-principal);
}

.notification-success { border-left-color: #10b981; }
.notification-error { border-left-color: #ef4444; }
.notification-warning { border-left-color: #f59e0b; }
.notification-info { border-left-color: var(--cor-primaria); }
.notification-loading { border-left-color: #6366f1; }

.notification-loading .notification-icon {
  animation: spin 1s linear infinite;
}

.button-loading {
  position: relative;
  color: transparent !important;
}

.button-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

/* Admin grid styles */
.admin-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.admin-item-card {
  background: var(--cor-card);
  border: 1px solid var(--cor-borda);
  border-radius: 8px;
  padding: 15px;
  transition: transform 0.2s;
}

.admin-item-card:hover {
  transform: translateY(-2px);
}

.admin-item-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.admin-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.admin-card-actions button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.edit-btn {
  background: var(--cor-primaria);
  color: white;
}

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

.admin-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-top: 20px;
}

.form-column, .list-column {
  background: var(--cor-fundo-secundario);
  padding: 25px;
  border-radius: 8px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
}








/* Login Page Styles */
.login-page {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Efeito de partículas animadas no fundo */
.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, #00ff87 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, #0066ff 0%, transparent 50%);
  opacity: 0.1;
  animation: float 8s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(5deg); }
}

.login-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo Section */
.logo-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-icon {
  background: linear-gradient(135deg, #00ff87 0%, #0066ff 100%);
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 30px rgba(0, 255, 135, 0.3);
  animation: pulse 2s ease-in-out infinite alternate;
  position: relative;
}

@keyframes pulse {
  0% { box-shadow: 0 10px 30px rgba(0, 255, 135, 0.3); }
  100% { box-shadow: 0 15px 40px rgba(0, 255, 135, 0.5); }
}

.logo-image {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
  position: relative;
  z-index: 1;
  border-radius: 8px;
}

.logo-icon .logo-image {
  position: static;
  left: auto;
  color: initial;
  font-size: initial;
  z-index: auto;
}

.logo-text {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #00ff87 0%, #0066ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  color: #a0a0b2;
  font-size: 0.9rem;
  font-weight: 400;
}

/* Form Styles */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: #a0a0b2;
  font-size: 1.1rem;
  z-index: 2;
  transition: color 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-input:focus {
  outline: none;
  border-color: #00ff87;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 255, 135, 0.2);
}

.form-input:focus + .input-icon {
  color: #00ff87;
}

.form-input::placeholder {
  color: #6b7280;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  color: #a0a0b2;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 2;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: #00ff87;
}

.login-button {
  width: 60% !important;
  margin: 0 auto 1.2rem auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem 1rem !important;
  background: linear-gradient(135deg, #00ff87 0%, #0066ff 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  color: #1a1a2e !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  font-family: 'Poppins', sans-serif !important;
  cursor: pointer !important;
  transition: box-shadow 0.3s ease !important;
  box-shadow: 0 8px 25px rgba(0, 255, 135, 0.3) !important;
  position: relative !important;
}

#login-btn {
  width: 60% !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 25px rgba(0, 255, 135, 0.3) !important;
  height: auto !important;
  min-height: 45px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

/* Centralizar conteúdo do botão */
#login-btn .btn-text {
  text-align: center !important;
  flex: 1 !important;
  display: block !important;
}

/* Loading posicionado absolutamente */
#login-btn .loading {
  display: none !important;
  position: absolute !important;
  left: 15px !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid rgba(26, 26, 46, 0.3) !important;
  border-radius: 50% !important;
  border-top-color: #1a1a2e !important;
  margin: 0 !important;
}

/* Quando está carregando */
.button-loading #login-btn .loading {
  display: block !important;
}

/* Remove conflitos */
button#login-btn,
button[type="submit"]#login-btn {
  width: 60% !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}





.button-loading {
  opacity: 0.8;
  cursor: not-allowed;
}



.btn-text {
  display: inline-block;
}

/* Error Message */
.error-message {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 8px;
  padding: 0.8rem;
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
  backdrop-filter: blur(10px);
}

/* Forgot Password */
.forgot-password {
  text-align: center;
  margin-top: 1.5rem;
}

.forgot-password a {
  color: #a0a0b2;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #00ff87;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #6b7280;
  font-size: 0.8rem;
  text-align: center;
  z-index: 1;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsividade */
@media (max-width: 480px) {
  .login-container {
    margin: 1rem;
    padding: 2rem;
  }
  
  .logo-text {
    font-size: 1.7rem;
  }
  
  .logo-icon {
    width: 70px;
    height: 70px;
  }

  .logo-image {
    width: 40px !important;
    height: 40px !important;
  }

  .footer {
    position: relative;
    margin-top: 2rem;
    transform: none;
    left: auto;
  }
}

/* Compatibility com estilos existentes */


#username, #password {
  /* Herda estilos de .form-input */
}

#error-message {
  /* Herda estilos de .error-message */
}
