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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #0f0f0f;
  color: #e8e8ea;
  line-height: 1.6;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: #fff;
}

.login-title .accent { color: #999; }

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form input {
  padding: 12px 16px;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: #e8e8ea;
  font-size: 0.9rem;
  font-family: inherit;
}

.login-form input:focus {
  outline: none;
  border-color: #555;
}

.login-erro {
  color: #e74c3c;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.btn-login {
  padding: 12px;
  background: #e8e8ea;
  color: #0f0f0f;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-login:hover { opacity: 0.85; }

/* Dashboard */
.dash-body {
  padding: 40px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
}

.dash-header .accent { color: #999; }

.dash-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-dash {
  padding: 10px 20px;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-dash:hover { opacity: 0.8; }

.btn-add { background: #25d366; color: #fff; }
.btn-export { background: #3483fa; color: #fff; }
.btn-import { background: #555; color: #fff; }
.btn-logout { background: transparent; color: #999; border: 1px solid #333; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-save { background: #e8e8ea; color: #0f0f0f; }
.btn-cancel { background: transparent; color: #999; border: 1px solid #333; }

.produtos-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.produto-admin-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  padding: 20px 24px;
}

.produto-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.produto-admin-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.produto-admin-info p {
  color: #888;
  font-size: 0.85rem;
}

.produto-admin-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-editar, .btn-remover {
  padding: 8px 16px;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-editar { background: #555; color: #fff; }
.btn-remover { background: #e74c3c; color: #fff; }

/* Modal / Editor */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 24px;
}

.campo {
  margin-bottom: 16px;
}

.campo label {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.campo input, .campo textarea, .campo select {
  width: 100%;
  padding: 10px 14px;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  color: #e8e8ea;
  font-size: 0.9rem;
  font-family: inherit;
}

.campo input:focus, .campo textarea:focus {
  outline: none;
  border-color: #555;
}

.campo textarea { resize: vertical; min-height: 60px; }

.campo-imagem {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.campo-imagem img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #2a2a2a;
}

.campo-imagem input {
  flex: 1;
  min-width: 140px;
}

.campo-duplo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.gerador-json {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.gerador-linha {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gerador-linha input {
  flex: 1;
  min-width: 0;
}

.gerador-linha .tier-min,
.gerador-linha .tier-max {
  flex: 0 0 80px;
}

.tier-label {
  color: #888;
  font-size: 0.8rem;
  min-width: 140px;
  white-space: nowrap;
}

.btn-remove-linha {
  background: #e74c3c;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-add-linha {
  background: #555;
  color: #fff;
  font-size: 0.8rem;
}

.presets-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #2a2a2a;
}

.presets-section h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 20px;
}

.preset-card {
  background: #151515;
  border: 1px solid #2a2a2a;
  padding: 20px;
  margin-bottom: 12px;
}

.preset-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .dash-body { padding: 24px 16px; }
  .produto-admin-header { flex-direction: column; align-items: flex-start; }
  .campo-duplo { grid-template-columns: 1fr; }
  .modal-content { padding: 24px; }
}
